From ecec65566a4ec77edf2054984663d97df55b877a Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Fri, 25 Sep 2020 21:24:53 +0200 Subject: Fix some broken references to the \ste namespace Should be \r7r\ste now --- ratatoeskr/frontend.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'ratatoeskr/frontend.php') diff --git a/ratatoeskr/frontend.php b/ratatoeskr/frontend.php index 696d446..6484796 100644 --- a/ratatoeskr/frontend.php +++ b/ratatoeskr/frontend.php @@ -9,6 +9,7 @@ * See "ratatoeskr/licenses/ratatoeskr" for more information. */ +use r7r\ste; use r7r\cms\sys\Env; use r7r\cms\sys\Esc; @@ -18,7 +19,7 @@ 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 */ +/** @var ste\STECore $ste */ assert(isset($ste)); /* @@ -189,7 +190,7 @@ $ste->register_tag("articles_get", function ($ste, $params, $sub) { $lang = $ste->vars["language"]; if (!isset($params["var"])) { - throw new \ste\RuntimeError("Parameter var is needed in article_get!"); + throw new ste\RuntimeError("Parameter var is needed in article_get!"); } $criterias = ["langavail" => $lang, "onlyvisible" => true]; @@ -273,7 +274,7 @@ $ste->register_tag("section_list", function ($ste, $params, $sub) { $default_section = $ratatoeskr_settings["default_section"]; if (!isset($params["var"])) { - throw new \ste\RuntimeException("Parameter var is needed in article_get!"); + throw new ste\RuntimeException("Parameter var is needed in article_get!"); } $result = Section::all(); @@ -318,7 +319,7 @@ $ste->register_tag("section_list", function ($ste, $params, $sub) { */ $ste->register_tag("article_comments_count", function ($ste, $params, $sub) { if (!isset($params["article"])) { - throw new \ste\RuntimeException("Need parameter 'article' in ste:article_comments_count."); + throw new ste\RuntimeException("Need parameter 'article' in ste:article_comments_count."); } $tpl_article = $ste->get_var_reference($params["article"], false); $lang = $ste->vars["language"]; @@ -355,10 +356,10 @@ $ste->register_tag("article_comments_count", function ($ste, $params, $sub) { */ $ste->register_tag("article_comments", function ($ste, $params, $sub) { if (!isset($params["var"])) { - throw new \ste\RuntimeException("Need parameter 'var' in ste:article_comments."); + throw new ste\RuntimeException("Need parameter 'var' in ste:article_comments."); } if (!isset($params["article"])) { - throw new \ste\RuntimeException("Need parameter 'article' in ste:article_comments."); + throw new ste\RuntimeException("Need parameter 'article' in ste:article_comments."); } $tpl_article = $ste->get_var_reference($params["article"], false); $lang = $ste->vars["language"]; @@ -427,7 +428,7 @@ $ste->register_tag("article_comments", function ($ste, $params, $sub) { $ste->register_tag("comment_form", function ($ste, $params, $sub) { global $translation; if (!isset($params["article"])) { - throw new \ste\RuntimeException("Need parameter 'article' in ste:comment_form."); + throw new ste\RuntimeException("Need parameter 'article' in ste:comment_form."); } $tpl_article = $ste->get_var_reference($params["article"], false); @@ -493,10 +494,10 @@ $ste->register_tag("comment_form", function ($ste, $params, $sub) { $ste->register_tag("page_prev", function ($ste, $params, $sub) { global $translation; if (!isset($params["current"])) { - throw new \ste\RuntimeException("Need parameter 'current' in ste:page_prev."); + throw new ste\RuntimeException("Need parameter 'current' in ste:page_prev."); } if (!isset($params["maxpage"])) { - throw new \ste\RuntimeException("Need parameter 'maxpage' in ste:page_prev."); + throw new ste\RuntimeException("Need parameter 'maxpage' in ste:page_prev."); } if ($params["current"] == 1) { @@ -512,10 +513,10 @@ $ste->register_tag("page_prev", function ($ste, $params, $sub) { $ste->register_tag("page_next", function ($ste, $params, $sub) { global $translation; if (!isset($params["current"])) { - throw new \ste\RuntimeException("Need parameter 'current' in ste:page_next."); + throw new ste\RuntimeException("Need parameter 'current' in ste:page_next."); } if (!isset($params["maxpage"])) { - throw new \ste\RuntimeException("Need parameter 'maxpage' in ste:page_next."); + throw new ste\RuntimeException("Need parameter 'maxpage' in ste:page_next."); } if ($params["current"] == $params["maxpage"]) { -- cgit v1.2.3-70-g09d2