Skip to content

Commit

Permalink
history-boot optimiert (#6028)
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan committed Mar 11, 2024
1 parent bce9955 commit 46693e7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions redaxo/src/addons/structure/plugins/history/boot.php
Expand Up @@ -62,8 +62,6 @@
$articleLimit = ' AND ' . rex::getTablePrefix() . 'article_slice.article_id=' . $article->getArticleId();
}

$sliceLimit = '';

rex_article_slice_history::checkTables();

$escapeSql = rex_sql::factory();
Expand All @@ -80,7 +78,6 @@
" . rex::getTablePrefix() . "article.clang_id='" . $article->getClangId() . "' AND
" . rex::getTablePrefix() . 'article_slice.revision=0
' . $articleLimit . '
' . $sliceLimit . '
' . $sliceDate . '
ORDER BY ' . rex::getTablePrefix() . 'article_slice.priority';
}
Expand Down Expand Up @@ -169,14 +166,14 @@ static function (rex_extension_point $ep) {
$historyValidTime = new DateTime();
$historyValidTime = $historyValidTime->modify('+10 Minutes')->format('YmdHis'); // 10 minutes valid key
$userHistorySession = rex_history_login::createSessionKey($userLogin, $user->getValue('session_id'), $historyValidTime);
$articleLink = rex_getUrl(rex_article::getCurrentId(), rex_clang::getCurrentId(), [rex_history_login::class => $userLogin, 'rex_history_session' => $userHistorySession, 'rex_history_validtime' => $historyValidTime], '&');
$articleLink = rex_getUrl(rex_article::getCurrentId(), rex_clang::getCurrentId(), ['rex_history_login' => $userLogin, 'rex_history_session' => $userHistorySession, 'rex_history_validtime' => $historyValidTime], '&');
}

echo '<script nonce="' . rex_response::getNonce() . '">
var history_article_id = ' . rex_article::getCurrentId() . ';
var history_clang_id = ' . rex_clang::getCurrentId() . ';
var history_ctype_id = ' . rex_request('ctype', 'int', 0) . ';
var history_article_link = "' . $articleLink . '";
var history_article_link = "' . rex_escape($articleLink, 'js') . '";
</script>';
}
},
Expand Down

0 comments on commit 46693e7

Please sign in to comment.