Beispiel #1
0
 public function getArticle($curctype = -1)
 {
     // bc
     if ($this->viasql) {
         return parent::getArticle($curctype);
     }
     $this->ctype = $curctype;
     if (!$this->getSlice && $this->article_id != 0) {
         // ----- start: article caching
         ob_start();
         ob_implicit_flush(0);
         $article_content_file = rex_path::addonCache('structure', $this->article_id . '.' . $this->clang . '.content');
         if (!file_exists($article_content_file)) {
             $generated = rex_content_service::generateArticleContent($this->article_id, $this->clang);
             if ($generated !== true) {
                 // fehlermeldung ausgeben
                 echo $generated;
             }
         }
         if (file_exists($article_content_file)) {
             require $article_content_file;
         }
         // ----- end: article caching
         $CONTENT = ob_get_contents();
         ob_end_clean();
     } else {
         // Inhalt ueber sql generierens
         $CONTENT = parent::getArticle($curctype);
     }
     $CONTENT = rex_extension::registerPoint(new rex_extension_point('ART_CONTENT', $CONTENT, ['ctype' => $curctype, 'article' => $this]));
     return $CONTENT;
 }