コード例 #1
0
ファイル: event.php プロジェクト: sea75300/fanpresscm3
 /**
  * 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();
     }
 }
コード例 #2
0
ファイル: template.php プロジェクト: sea75300/fanpresscm3
 /**
  * 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;
 }
コード例 #3
0
ファイル: model.php プロジェクト: sea75300/fanpresscm3
 /**
  * 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;
 }