예제 #1
0
 /**
  * Loads article Mercators info, passes it to Smarty engine and
  * returns name of template file "Mercator_main.tpl".
  *
  * @return string
  */
 public function render()
 {
     parent::render();
     $oSysReq = new oxSysRequirements();
     $this->_aViewData['aInfo'] = $oSysReq->getSystemInfo();
     $this->_aViewData['aCollations'] = $oSysReq->checkCollation();
     return "sysreq_main.tpl";
 }
예제 #2
0
 /**
  * Performs main system diagnostic.
  * Shop and module details, database health, php parameters, server information
  *
  * @return array
  */
 protected function _runBasicDiagnostics()
 {
     $aViewData = array();
     $oDiagnostics = oxNew('oxDiagnostics');
     $oDiagnostics->setShopLink(oxRegistry::getConfig()->getConfigParam('sShopURL'));
     $oDiagnostics->setEdition(oxRegistry::getConfig()->getFullEdition());
     $oDiagnostics->setVersion(oxRegistry::getConfig()->getVersion());
     $oDiagnostics->setRevision(oxRegistry::getConfig()->getRevision());
     /**
      * Shop
      */
     if ($this->getParam('runAnalysis')) {
         $aViewData['runAnalysis'] = true;
         $aViewData['aShopDetails'] = $oDiagnostics->getShopDetails();
     }
     /**
      * Modules
      */
     if ($this->getParam('oxdiag_frm_modules')) {
         $sModulesDir = $this->getConfig()->getModulesDir();
         $oModuleList = oxNew('oxModuleList');
         $aModules = $oModuleList->getModulesFromDir($sModulesDir);
         $aViewData['oxdiag_frm_modules'] = true;
         $aViewData['mylist'] = $aModules;
     }
     /**
      * Health
      */
     if ($this->getParam('oxdiag_frm_health')) {
         $oSysReq = new oxSysRequirements();
         $aViewData['oxdiag_frm_health'] = true;
         $aViewData['aInfo'] = $oSysReq->getSystemInfo();
         $aViewData['aCollations'] = $oSysReq->checkCollation();
     }
     /**
      * PHP info
      * Fetches a hand full of php configuration parameters and collects their values.
      */
     if ($this->getParam('oxdiag_frm_php')) {
         $aViewData['oxdiag_frm_php'] = true;
         $aViewData['aPhpConfigparams'] = $oDiagnostics->getPhpSelection();
         $aViewData['sPhpDecoder'] = $oDiagnostics->getPhpDecoder();
     }
     /**
      * Server info
      */
     if ($this->getParam('oxdiag_frm_server')) {
         $aViewData['isExecAllowed'] = $oDiagnostics->isExecAllowed();
         $aViewData['oxdiag_frm_server'] = true;
         $aViewData['aServerInfo'] = $oDiagnostics->getServerInfo();
     }
     if ($this->getParam('oxdiag_frm_chkvers')) {
         $aViewData['oxdiag_frm_chkvers'] = true;
     }
     return $aViewData;
 }