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
 /**
  * Parst Smileys in Artikeln und Kommentaren
  * @param string $content
  * @return string
  */
 protected function parseSmileys($content)
 {
     if ($this->smileyCache->isExpired()) {
         $smileysList = new \fpcm\model\files\smileylist();
         $smileys = $smileysList->getDatabaseList();
         $this->smileyCache->write($smileys, $this->config->system_cache_timeout);
     } else {
         $smileys = $this->smileyCache->read();
     }
     foreach ($smileys as $smiley) {
         $content = str_replace($smiley->getSmileyCode(), $this->parseSmileyFilePath($smiley), $content);
     }
     return $content;
 }
Ejemplo n.º 3
0
 /**
  * Löscht ein Objekt in der Datenbank
  * @return bool
  */
 public function delete()
 {
     $this->dbcon->delete($this->table, 'id = ?', array($this->id));
     $this->cache->cleanup();
     return true;
 }