Ejemplo n.º 1
0
 /**
  * Konstruktor
  * @param array $modules
  * @return boolean
  */
 public function __construct()
 {
     $moduleList = new \fpcm\model\modules\modulelist();
     $this->cache = new \fpcm\classes\cache('activeeventscache', 'modules');
     if (\fpcm\classes\baseconfig::installerEnabled()) {
         return false;
     }
     $config = \fpcm\classes\baseconfig::$fpcmConfig;
     $config->setUserSettings();
     if ($this->cache->isExpired()) {
         $this->activeModules = $moduleList->getEnabledInstalledModules();
         $this->cache->write($this->activeModules, $config->system_cache_timeout);
     } else {
         $this->activeModules = $this->cache->read();
     }
 }
Ejemplo n.º 2
0
 /**
  * Konstruktor
  */
 public function __construct()
 {
     if (\fpcm\classes\baseconfig::installerEnabled() && !\fpcm\classes\baseconfig::dbConfigExists()) {
         $this->redirect('installer');
     }
     if (\fpcm\classes\baseconfig::installerEnabled()) {
         return false;
     }
     $this->events = \fpcm\classes\baseconfig::$fpcmEvents;
     $this->cache = new \fpcm\classes\cache($this->cacheName ? $this->cacheName : md5(microtime(false)), $this->cacheModule);
     $this->config = \fpcm\classes\baseconfig::$fpcmConfig;
     $this->session = \fpcm\classes\baseconfig::$fpcmSession;
     $this->crons = new \fpcm\model\crons\cronlist();
     $moduleList = new \fpcm\model\modules\modulelist();
     $this->enabledModules = $moduleList->getEnabledInstalledModules();
     if ($this->session->getCurrentUser()) {
         $this->permissions = new \fpcm\model\system\permissions($this->session->currentUser->getRoll());
     }
     $this->config->setUserSettings();
     $this->lang = \fpcm\classes\baseconfig::$fpcmLanguage;
 }