Example #1
0
     $oShortcut->Set("name", $aValues['name']);
     $oShortcut->Set("oql", $aValues['oql']);
     $iAutoReload = (int) $aValues['auto_reload_sec'];
     if ($aValues['auto_reload'] && $iAutoReload > 0) {
         $oShortcut->Set("auto_reload_sec", max(5, $iAutoReload));
         $oShortcut->Set("auto_reload", 'custom');
     }
     $iId = $oShortcut->DBInsertNoReload();
     $oShortcut->CloneTableSettings($aValues['table_settings']);
     // Add the menu node in the right place
     //
     // Mmmm... already done because the newly created menu is read from the DB
     //         as soon as we invoke DisplayMenu
     // Refresh the menu pane
     $aExtraParams = array();
     ApplicationMenu::DisplayMenu($oPage, $aExtraParams);
     break;
 case 'shortcut_rename_dlg':
     $oSearch = new DBObjectSearch('Shortcut');
     $aShortcuts = utils::ReadMultipleSelection($oSearch);
     $iShortcut = $aShortcuts[0];
     $oShortcut = MetaModel::GetObject('Shortcut', $iShortcut);
     $oShortcut->StartRenameDialog($oPage);
     break;
 case 'shortcut_rename_go':
     $iShortcut = utils::ReadParam('id', 0);
     $oShortcut = MetaModel::GetObject('Shortcut', $iShortcut);
     $sName = utils::ReadParam('attr_name', '', false, 'raw_data');
     if (strlen($sName) > 0) {
         $oShortcut->Set('name', $sName);
         $oShortcut->DBUpdate();
 public function DisplayMenu()
 {
     // Display the menu
     $oAppContext = new ApplicationContext();
     $iAccordionIndex = 0;
     ApplicationMenu::DisplayMenu($this, $oAppContext->GetAsHash());
 }