if(1260 != $thearticle->getValue('id')){ //Selbstauflistung unterbinden
//Startartikel
if($withstartpage == '1' || $thearticle->getValue('startpage') != '1'){
//Teaser
if(($onlyteaser != '1' && $onlyteaser != '3') || $thearticle->getValue('teaser') == '1'){
//Datum: online_from / online_to
if($metatime != '1' || ($thearticle->getValue('online_from') <= date('U') && $thearticle->getValue('online_to') >= date('U'))){
$show_articles[] = $thearticle;
}
}
}
}
}
return $show_articles;
}
}
// Sortierfunktion
if(!function_exists("sortArticlesBy" . /* REX_VALUE[5] */ '' . "" . /* REX_VALUE[6] */ '0')){
function sortArticlesBy/* REX_VALUE[5] */ ''()/* REX_VALUE[6] */ '0'( $artA, $artB) {
$sortby = /* REX_VALUE[5] */ '';
//name, createdate, updatedate, online_from, online_to, prior
$createA = $artA->getValue($sortby);
$createB = $artB->getValue($sortby);
if ( $createA == $createB) {
return 0;
}
if(/* REX_VALUE[6] */ '0') return $createA > $createB ? -1 : 1;
else return $createA < $createB ? -1 : 1;
}
}
if(!function_exists("generatePagination")){
function generatePagination($articles, $listpage='0', $itemsperpage, $listnum){
Arguments
"syntax error, unexpected '''' (T_CONSTANT_ENCAPSED_STRING), expecting '('"
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/lib/article_content.php
// bc
if ($this->viasql) {
return parent::getArticle($curctype);
}
$this->ctype = $curctype;
if (!$this->getSlice && 0 != $this->article_id) {
// article caching
ob_start();
try {
ob_implicit_flush(0);
$articleContentFile = rex_path::addonCache('structure', $this->article_id . '.' . $this->clang . '.content');
if (!is_file($articleContentFile)) {
rex_content_service::generateArticleContent($this->article_id, $this->clang);
}
require $articleContentFile;
} finally {
$CONTENT = ob_get_clean();
assert(is_string($CONTENT));
}
} else {
// Inhalt ueber sql generierens
$CONTENT = parent::getArticle($curctype);
}
return rex_extension::registerPoint(new rex_extension_point('ART_CONTENT', $CONTENT, [
'ctype' => $curctype,
'article' => $this,
]));
}
public function getCurrentSlice(): rex_article_slice
{
if ($this->viasql) {
return parent::getCurrentSlice();
}
<?= /* REX_TEMPLATE[14] */ rex_var_template::getTemplateOutput(14, new rex_timer(), require rex_var_template::getTemplateStream(14, $this)), "\r\n" ?>
<aside>
<?php
print $this->getArticle(2);
?>
<?= /* REX_TEMPLATE[15] */ rex_var_template::getTemplateOutput(15, new rex_timer(), require rex_var_template::getTemplateStream(15, $this)) ?>
Arguments
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php
}
// ----- Template inklusive Artikel zurückgeben
/**
* @return string
*/
public function getArticleTemplate()
{
if (0 != $this->template_id && 0 != $this->article_id) {
ob_start();
try {
ob_implicit_flush(0);
$TEMPLATE = new rex_template($this->template_id);
rex_timer::measure('Template: '.($TEMPLATE->getKey() ?? $TEMPLATE->getId()), function () use ($TEMPLATE) {
$tplContent = $this->replaceCommonVars($TEMPLATE->getTemplate());
require rex_stream::factory('template/' . $this->template_id, $tplContent);
});
} finally {
$CONTENT = ob_get_clean();
}
return $this->replaceLinks($CONTENT);
}
return 'no template';
}
/**
* @param string $path
* @param string $content
* @return string
*/
protected function getStreamOutput($path, $content)
{
if (!$this->eval) {
$key = 'EOD_' . strtoupper(sha1((string) time()));
Arguments
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/util/timer.php
*
* On sufficient user permissions - or in debug mode - this timings will be sent over the wire to the browser via server timing api http headers.
*
* @template T
*
* @param string $label
* @param callable():T $callable
*
* @return T result of callable
*/
public static function measure($label, callable $callable)
{
if (!rex::isDebugMode()) {
return $callable();
}
$timer = new self();
try {
return $callable();
} finally {
$timer->stop();
self::measured($label, $timer);
}
}
/**
* Saves the measurement of the given timer.
*
* This method should be used only if the measured code can not be wrapped inside a callable, otherwise use `measure()`.
*/
public static function measured(string $label, self $timer): void
{
$duration = self::$serverTimings[$label]['sum'] ?? 0;
$duration += $timer->getDelta(self::MILLISEC);
self::$serverTimings[$label]['sum'] = $duration;
self::$serverTimings[$label]['timings'][] = [
'start' => $timer->start,
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/lib/article_content_base.php
// ----- Template inklusive Artikel zurückgeben
/**
* @return string
*/
public function getArticleTemplate()
{
if (0 != $this->template_id && 0 != $this->article_id) {
ob_start();
try {
ob_implicit_flush(0);
$TEMPLATE = new rex_template($this->template_id);
rex_timer::measure('Template: '.($TEMPLATE->getKey() ?? $TEMPLATE->getId()), function () use ($TEMPLATE) {
$tplContent = $this->replaceCommonVars($TEMPLATE->getTemplate());
require rex_stream::factory('template/' . $this->template_id, $tplContent);
});
} finally {
$CONTENT = ob_get_clean();
}
return $this->replaceLinks($CONTENT);
}
return 'no template';
}
/**
* @param string $path
* @param string $content
* @return string
*/
protected function getStreamOutput($path, $content)
{
if (!$this->eval) {
$key = 'EOD_' . strtoupper(sha1((string) time()));
return "require rex_stream::factory('$path', <<<'$key'\n$content\n$key);\n";
Arguments
"Template: 8"
Closure() {#92 …4}
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/addons/structure/plugins/content/boot.php
$content = $ep->getSubject();
$article = new rex_article_content();
$article->setCLang(rex_clang::getCurrentId());
if (!$article->setArticleId(rex_article::getCurrentId())) {
if (!rex::isDebugMode() && !rex_backend_login::hasSession()) {
throw new rex_exception('Article with id '.rex_article::getCurrentId().' does not exist');
}
$fragment = new rex_fragment([
'content' => '<p><b>Article with ID '.rex_article::getCurrentId().' not found.</b><br />If this is a fresh setup, an article must be created first.<br />Enter <a href="' . rex_url::backendController() . '">REDAXO</a>.</p>',
]);
$content .= $fragment->parse('core/fe_ooops.php');
rex_response::sendPage($content);
exit;
}
try {
$content .= $article->getArticleTemplate();
} catch (rex_article_not_found_exception $exception) {
$article = new rex_article_content();
$article->setCLang(rex_clang::getCurrentId());
$article->setArticleId(rex_article::getNotfoundArticleId());
$content .= $article->getArticleTemplate();
}
$artId = $article->getArticleId();
if ($artId == rex_article::getNotfoundArticleId() && $artId != rex_article::getSiteStartArticleId()) {
rex_response::setStatus(rex_response::HTTP_NOT_FOUND);
}
// ----- inhalt ausgeben
rex_response::sendPage($content, $article->getValue('updatedate'));
});
}
rex_extension::register('EDITOR_URL', static function (rex_extension_point $ep) {
static $urls = [
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/extension.php
*/
public static function registerPoint(rex_extension_point $extensionPoint)
{
if ($factoryClass = static::getExplicitFactoryClass()) {
return $factoryClass::registerPoint($extensionPoint);
}
$name = $extensionPoint->getName();
rex_timer::measure('EP: '.$name, static function () use ($extensionPoint, $name) {
foreach ([self::EARLY, self::NORMAL, self::LATE] as $level) {
if (!isset(self::$extensions[$name][$level]) || !is_array(self::$extensions[$name][$level])) {
continue;
}
foreach (self::$extensions[$name][$level] as $extensionAndParams) {
[$extension, $params] = $extensionAndParams;
$extensionPoint->setExtensionParams($params);
/** @var T|null $subject */
$subject = call_user_func($extension, $extensionPoint);
// Update subject only if the EP is not readonly and the extension has returned something
if ($extensionPoint->isReadonly()) {
continue;
}
if (null === $subject) {
continue;
}
$extensionPoint->setSubject($subject);
}
}
});
return $extensionPoint->getSubject();
}
/**
* Registers an extension for an extension point.
*
* @param string|string[] $extensionPoint Name(s) of extension point(s)
* @param callable $extension Callback extension
Arguments
rex_extension_point {#74}
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/util/timer.php
*
* On sufficient user permissions - or in debug mode - this timings will be sent over the wire to the browser via server timing api http headers.
*
* @template T
*
* @param string $label
* @param callable():T $callable
*
* @return T result of callable
*/
public static function measure($label, callable $callable)
{
if (!rex::isDebugMode()) {
return $callable();
}
$timer = new self();
try {
return $callable();
} finally {
$timer->stop();
self::measured($label, $timer);
}
}
/**
* Saves the measurement of the given timer.
*
* This method should be used only if the measured code can not be wrapped inside a callable, otherwise use `measure()`.
*/
public static function measured(string $label, self $timer): void
{
$duration = self::$serverTimings[$label]['sum'] ?? 0;
$duration += $timer->getDelta(self::MILLISEC);
self::$serverTimings[$label]['sum'] = $duration;
self::$serverTimings[$label]['timings'][] = [
'start' => $timer->start,
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/lib/extension.php
if (!isset(self::$extensions[$name][$level]) || !is_array(self::$extensions[$name][$level])) {
continue;
}
foreach (self::$extensions[$name][$level] as $extensionAndParams) {
[$extension, $params] = $extensionAndParams;
$extensionPoint->setExtensionParams($params);
/** @var T|null $subject */
$subject = call_user_func($extension, $extensionPoint);
// Update subject only if the EP is not readonly and the extension has returned something
if ($extensionPoint->isReadonly()) {
continue;
}
if (null === $subject) {
continue;
}
$extensionPoint->setSubject($subject);
}
}
});
return $extensionPoint->getSubject();
}
/**
* Registers an extension for an extension point.
*
* @param string|string[] $extensionPoint Name(s) of extension point(s)
* @param callable $extension Callback extension
* @param self::* $level Runlevel (`rex_extension::EARLY`, `rex_extension::NORMAL` or `rex_extension::LATE`)
* @param array $params Additional params
* @return void
*
* @template T as rex_extension_point
* @psalm-param callable(T):mixed $extension
*/
public static function register($extensionPoint, callable $extension, $level = self::NORMAL, array $params = [])
{
if ($factoryClass = static::getExplicitFactoryClass()) {
$factoryClass::register($extensionPoint, $extension, $level, $params);
Arguments
"EP: FE_OUTPUT"
Closure() {#75 …3}
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/frontend.php
if (rex::isSetup()) {
rex_response::sendRedirect(rex_url::backendController());
}
if (rex::isDebugMode()) {
header('X-Robots-Tag: noindex, nofollow, noarchive');
}
// ----- INCLUDE ADDONS
include_once rex_path::core('packages.php');
// ----- caching end für output filter
$CONTENT = ob_get_clean();
// trigger api functions. the api function is responsible for checking permissions.
rex_api_function::handleCall();
if (rex_extension::isRegistered('FE_OUTPUT')) {
// ----- EXTENSION POINT
rex_extension::registerPoint(new rex_extension_point('FE_OUTPUT', $CONTENT));
} else {
// ----- inhalt ausgeben
rex_response::sendPage($CONTENT);
}
Arguments
rex_extension_point {#74}
/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/boot.php
$clangId = rex_request('clang', 'int', rex_clang::getStartId());
if (rex::isBackend() || rex_clang::exists($clangId)) {
rex_clang::setCurrentId($clangId);
}
}
// ----------------- HTTPS REDIRECT
if ('cli' !== PHP_SAPI && !rex::isSetup()) {
if ((true === rex::getProperty('use_https') || rex::getEnvironment() === rex::getProperty('use_https')) && !rex_request::isHttps()) {
rex_response::enforceHttps();
}
if (true === rex::getProperty('use_hsts') && rex_request::isHttps()) {
rex_response::setHeader('Strict-Transport-Security', 'max-age='.rex::getProperty('hsts_max_age', 31536000)); // default 1 year
}
}
if (isset($REX['LOAD_PAGE']) && $REX['LOAD_PAGE']) {
unset($REX);
require rex_path::core(rex::isBackend() ? 'backend.php' : 'frontend.php');
}
Arguments
"/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/frontend.php"
/home/httpd/vhosts/kommunisten.ch/httpdocs/index.php
<?php
unset($REX);
$REX['REDAXO'] = false;
$REX['HTDOCS_PATH'] = './';
$REX['BACKEND_FOLDER'] = 'redaxo';
$REX['LOAD_PAGE'] = true;
require $REX['BACKEND_FOLDER'] . '/src/core/boot.php';
Arguments
"/home/httpd/vhosts/kommunisten.ch/httpdocs/redaxo/src/core/boot.php"