compile() public method

public compile ( )
Beispiel #1
0
     header('Content-Type: text/html; charset=utf-8');
     $aItem = db_assoc_arr("SELECT * FROM `sys_menu_top` WHERE `ID` = '{$id}'", 0);
     if ($aItem) {
         echo showEditForm($aItem);
     } else {
         echoMenuEditMsg(_t('_Error occured'), 'red');
     }
     exit;
 case 'create_item':
     $newID = createNewElement($_POST['type'], (int) $_POST['source']);
     echo $newID;
     exit;
 case 'deactivate_item':
     $res = db_res("UPDATE `sys_menu_top` SET `Active`=0 WHERE `ID`=" . (int) bx_get('id'));
     echo db_affected_rows();
     $oMenu->compile();
     exit;
 case 'save_item':
     $id = (int) $_POST['id'];
     if (!$id) {
         $aResult = array('code' => 1, 'message' => _t('_Error occured'));
     } else {
         $aItemFields = array('Name', 'Caption', 'Link', 'Picture', 'Icon');
         $aItem = array();
         foreach ($aItemFields as $field) {
             $aItem[$field] = $_POST[$field];
         }
         $aVis = array();
         if ((int) $_POST['Visible_non']) {
             $aVis[] = 'non';
         }
 function actionRecompilePermalinks($bInstall = true)
 {
     $bResult = true;
     ob_start();
     $oPermalinks = new BxDolPermalinks();
     $bResult = $bResult && $oPermalinks->cache();
     $oMenu = new BxDolMenu();
     $bResult = $bResult && $oMenu->compile();
     $bResult = $bResult && $GLOBALS['MySQL']->cleanCache('sys_menu_member');
     ob_get_clean();
     return $bResult ? BX_DOL_INSTALLER_SUCCESS : BX_DOL_INSTALLER_FAILED;
 }
 function _onSavePermalinks()
 {
     $oPermalinks = new BxDolPermalinks();
     $oPermalinks->cache();
     $oMenu = new BxDolMenu();
     $oMenu->compile();
     $GLOBALS['MySQL']->cleanCache('sys_menu_member');
 }