/** * Sendet einen rex_article zum Client, * fügt ggf. HTTP1.1 cache headers hinzu * * @param $REX_ARTICLE rex_article Den zu sendenen Artikel * @param $content string Inhalt des Artikels * @param $environment string Die Umgebung aus der der Inhalt gesendet wird * (frontend/backend) */ function rex_send_article($REX_ARTICLE, $content, $environment) { // ----- EXTENSION POINT $content = rex_register_extension_point('OUTPUT_FILTER', $content); // ----- EXTENSION POINT - keine Manipulation der Ausgaben ab hier (read only) rex_register_extension_point('OUTPUT_FILTER_CACHE', $content, '', true); $contentMd5 = md5($content); if ($REX_ARTICLE) { $lastModified = $REX_ARTICLE->getValue('updatedate'); $contentMd5 .= $REX_ARTICLE->getValue('pid'); } else { $lastModified = time(); } rex_send_content($content, $lastModified, $contentMd5, $environment); }
/** * Sendet einen rex_article zum Client, * fügt ggf. HTTP1.1 cache headers hinzu * * @param $REX_ARTICLE rex_article Den zu sendenen Artikel * @param $content string Inhalt des Artikels * @param $environment string Die Umgebung aus der der Inhalt gesendet wird * (frontend/backend) */ function rex_send_article($REX_ARTICLE, $content, $environment, $sendcharset = FALSE) { global $REX; // ----- EXTENSION POINT $content = rex_register_extension_point('OUTPUT_FILTER', $content, array('environment' => $environment, 'sendcharset' => $sendcharset)); // ----- EXTENSION POINT - keine Manipulation der Ausgaben ab hier (read only) rex_register_extension_point('OUTPUT_FILTER_CACHE', $content, '', true); // dynamische teile sollen die md5 summe nicht beeinflussen $etag = md5(preg_replace('@<!--DYN-->.*<!--/DYN-->@', '', $content)); if ($REX_ARTICLE) { $lastModified = $REX_ARTICLE->getValue('updatedate'); $etag .= $REX_ARTICLE->getValue('pid'); if ($REX_ARTICLE->getArticleId() == $REX['NOTFOUND_ARTICLE_ID'] && $REX_ARTICLE->getArticleId() != $REX['START_ARTICLE_ID']) { header("HTTP/1.0 404 Not Found"); } } else { $lastModified = time(); } rex_send_content($content, $lastModified, $etag, $environment, $sendcharset); }
$open_header_only = true; } elseif ($REX['PAGEPATH'] == '' && $page == 'linkmap') { $open_header_only = true; } elseif ($REX['PAGEPATH'] == '' && $page == 'content') { $page_name = $I18N->msg('content'); } elseif ($REX['PAGEPATH'] == '' && $page == 'credits') { $page_name = $I18N->msg('credits'); } elseif ($REX['PAGEPATH'] == '') { $page = 'structure'; $page_name = $I18N->msg('structure'); } } } // ----- kein pagepath -> kein addon -> path setzen if ($REX['PAGEPATH'] == '') { $REX['PAGEPATH'] = $REX['INCLUDE_PATH'] . '/pages/' . $page . '.inc.php'; } // ----- ausgabe des includes if ($withheader) { include $REX['INCLUDE_PATH'] . '/layout/top.php'; } include $REX['PAGEPATH']; if ($withheader) { include $REX['INCLUDE_PATH'] . '/layout/bottom.php'; } // ----- caching end für output filter $CONTENT = ob_get_contents(); ob_end_clean(); // ----- inhalt ausgeben rex_send_content(null, $CONTENT, 'backend');
// Sollte immer false bleiben $REX['REDAXO'] = false; // Wenn $REX[GG] = true; dann wird der // Content aus den redaxo/include/generated/ // genommen $REX['GG'] = true; // setzte pfad und includiere klassen und funktionen $REX['HTDOCS_PATH'] = './'; include './redaxo/include/master.inc.php'; // Starte einen neuen Artikel und setzte die aktuelle // artikel id. wenn nicht vorhanden, nimm einen // speziellen artikel. z.b. fehler seite oder home seite $REX_ARTICLE = new rex_article(); $REX_ARTICLE->setCLang($clang); if ($REX['SETUP']) { header('Location: redaxo/index.php'); exit; } elseif ($REX_ARTICLE->setArticleId($article_id)) { echo $REX_ARTICLE->getArticleTemplate(); } elseif ($REX_ARTICLE->setArticleId($REX['NOTFOUND_ARTICLE_ID'])) { echo $REX_ARTICLE->getArticleTemplate(); } else { echo 'Kein Startartikel selektiert / No starting Article selected. Please click here to enter <a href="redaxo/index.php">redaxo</a>'; $REX['STATS'] = 0; } // ----- caching end für output filter $CONTENT = ob_get_contents(); ob_end_clean(); // ----- inhalt ausgeben rex_send_content($REX_ARTICLE, $CONTENT, 'frontend');