Ejemplo n.º 1
0
 function actionInitial()
 {
     $this->_oView->pageStart();
     $aLangs = BxDolInstallLang::getInstance()->getAvailableLanguages();
     $oAudit = new BxDolStudioToolsAudit();
     $aErrors = $oAudit->checkRequirements(BX_DOL_AUDIT_FAIL);
     $aWarnings = $oAudit->checkRequirements(BX_DOL_AUDIT_WARN);
     $oAudit->generateStyles();
     if (empty($aErrors)) {
         $this->_oView->out('initial.php', compact('aLangs', 'aWarnings'));
     } else {
         $this->_oView->out('initial_fail.php', compact('aLangs', 'aErrors'));
     }
     $this->_oView->pageEnd($this->_getTitle());
 }
Ejemplo n.º 2
0
 public function serviceGetBlockHostTools($bDynamic = true)
 {
     $sJsObject = $this->getPageJsObject();
     $aMenu = array(array('name' => 'audit', 'title' => _t('_sys_inst_server_audit'), 'link' => 'javascript:void(0)', 'onclick' => $sJsObject . '.serverAudit()'), array('name' => 'permissions', 'title' => _t('_sys_audit_permissions'), 'link' => 'javascript:void(0)', 'onclick' => $sJsObject . '.permissions()'));
     bx_import('BxDolStudioToolsAudit');
     $oAudit = new BxDolStudioToolsAudit();
     $aTmplVarsItems = array();
     if (!$bDynamic) {
         bx_import('BxTemplFunctions');
         $oFunc = BxTemplFunctions::getInstance();
         $aLevels = array(BX_DOL_AUDIT_FAIL, BX_DOL_AUDIT_WARN, BX_DOL_AUDIT_UNDEF);
         $aTmplVarsItems = array();
         foreach ($this->aItemsHTools as $sTitle => $sFunc) {
             $sStatus = BX_DOL_AUDIT_OK;
             foreach ($aLevels as $sLevel) {
                 $a = $oAudit->checkRequirements($sLevel, $sFunc);
                 if (!empty($a)) {
                     $sStatus = $sLevel;
                     break;
                 }
             }
             $aTmplVarsItems[] = array('status' => $oFunc->statusOnOff($sStatus), 'msg' => _t('_adm_dbd_txt_htools_status', $sTitle, $oAudit->typeToTitle($sStatus)));
         }
     }
     $sContent = BxDolStudioTemplate::getInstance()->parseHtmlByName('dbd_htools.html', array('bx_if:show_content' => array('condition' => !$bDynamic, 'content' => array('bx_repeat:items' => $aTmplVarsItems)), 'bx_if:show_loader' => array('condition' => $bDynamic, 'content' => array('js_object' => $sJsObject))));
     return array('content' => $sContent, 'menu' => $aMenu);
 }
Ejemplo n.º 3
0
 public function checkRequirements()
 {
     $oAudit = new BxDolStudioToolsAudit();
     $aErrors = $oAudit->checkRequirements(BX_DOL_AUDIT_FAIL);
     if (!empty($aErrors)) {
         $this->finish($this->_aReturnCodes['requirements failed']['code'], $this->_aReturnCodes['requirements failed']['msg']);
     }
 }