Browse Source

Archive: fix shortcut creation/renaming/deletion when archive mode is on

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4781 a333f486-631f-4898-b8df-5754b55c2be0
romainq 8 năm trước cách đây
mục cha
commit
4c3b018c16
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      pages/ajax.render.php

+ 6 - 0
pages/ajax.render.php

@@ -1022,7 +1022,9 @@ EOF
 			$oShortcut->Set("auto_reload_sec", max(MetaModel::GetConfig()->Get('min_reload_interval'), $iAutoReload));
 			$oShortcut->Set("auto_reload", 'custom');
 		}
+		utils::PushArchiveMode(false);
 		$iId = $oShortcut->DBInsertNoReload();
+		utils::PopArchiveMode();
 
 		$oShortcut->CloneTableSettings($aValues['table_settings']);
 
@@ -1052,7 +1054,9 @@ EOF
 		if (strlen($sName) > 0)
 		{
 			$oShortcut->Set('name', $sName);
+			utils::PushArchiveMode(false);
 			$oShortcut->DBUpdate();
+			utils::PopArchiveMode();
 			$oPage->add_ready_script('window.location.reload();');
 		}
 		
@@ -1065,7 +1069,9 @@ EOF
 		foreach ($aShortcuts as $iShortcut)
 		{
 			$oShortcut = MetaModel::GetObject('Shortcut', $iShortcut);
+			utils::PushArchiveMode(false);
 			$oShortcut->DBDelete();
+			utils::PopArchiveMode();
 			$oPage->add_ready_script('window.location.reload();');
 		}
 		break;