diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-09-21 21:21:30 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-09-21 21:30:57 +0200 |
commit | 7f4159ac258c501f9666efc465a78cb2aec9d177 (patch) | |
tree | 298b4943fb5cd7ecf5f6959bf1b6f47fbc6e557a /ratatoeskr/frontend.php | |
parent | 9834bfc4dc7f0bbf4020cebb43b03069592bc687 (diff) | |
download | ratatoeskr-cms-7f4159ac258c501f9666efc465a78cb2aec9d177.tar.gz ratatoeskr-cms-7f4159ac258c501f9666efc465a78cb2aec9d177.tar.bz2 ratatoeskr-cms-7f4159ac258c501f9666efc465a78cb2aec9d177.zip |
Code cleanup
- Remove unused variables
- Remove unused utility functions
- Asserting presence and typehinting global variables
- Remove unused variables
- Add missing global
- Add parameter type constraint
- Fix some references to nonexisting variables
Diffstat (limited to 'ratatoeskr/frontend.php')
-rw-r--r-- | ratatoeskr/frontend.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ratatoeskr/frontend.php b/ratatoeskr/frontend.php index 51e13f7..de017dc 100644 --- a/ratatoeskr/frontend.php +++ b/ratatoeskr/frontend.php @@ -15,6 +15,9 @@ require_once(dirname(__FILE__) . "/sys/models.php"); require_once(dirname(__FILE__) . "/sys/textprocessors.php"); require_once(dirname(__FILE__) . "/libs/kses.php"); +/** @var \ste\STECore $ste */ +assert(isset($ste)); + /* * Function: section_transform_ste * Transforms an <Section> object to an array, so it can be accessed via a STE template. @@ -140,8 +143,6 @@ function article_transform_ste($article, $lang) */ function comment_transform_ste($comment) { - global $rel_path_to_root, $ratatoeskr_settings; - return [ "id" => $comment->get_id(), "text" => $comment->create_html(), @@ -747,7 +748,7 @@ $on_comment_store = []; */ function frontend_url_handler(&$data, $url_now, &$url_next) { - global $ste, $ratatoeskr_settings, $languages, $metasections, $comment_validators, $on_comment_store; + global $ste, $ratatoeskr_settings, $languages, $comment_validators, $on_comment_store; $path = array_merge([$url_now], $url_next); $url_next = []; |