From ad27388f5e66c544063ac7e86ceacaf0d093ef32 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Tue, 15 Nov 2011 21:03:35 +0100 Subject: Fixed bug in article_transform_ste. Used object on str_replace. Now fixed. --- ratatoeskr/frontend.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ratatoeskr') diff --git a/ratatoeskr/frontend.php b/ratatoeskr/frontend.php index a2f1f8d..50f0473 100644 --- a/ratatoeskr/frontend.php +++ b/ratatoeskr/frontend.php @@ -93,12 +93,12 @@ function article_transform_ste($article, $lang) $languages[$language] = "$rel_path_to_root/$language/{$article->section->name}/{$article->urlname}"; return array( - "id" => $article->get_id(), + "id" => $article->get_id(), "urlname" => $article->urlname, "fullurl" => htmlesc("$rel_path_to_root/$lang/{$article->section->name}/{$article->urlname}"), "title" => htmlesc($article->title[$lang]->text), - "text" => textprocessor_apply_translation(str_replace("%root%", $rel_path_to_root, $article->text[$lang])), - "excerpt" => textprocessor_apply_translation(str_replace("%root%", $rel_path_to_root, $article->excerpt[$lang])), + "text" => textprocessor_apply(str_replace("%root%", $rel_path_to_root, $article->text[$lang]->text), $article->text[$lang]->texttype), + "excerpt" => textprocessor_apply(str_replace("%root%", $rel_path_to_root, $article->excerpt[$lang]->text), $article->excerpt[$lang]->texttype), "custom" => $article->custom, "status" => $article->status, "section" => section_transform_ste($article->section, $lang), @@ -213,7 +213,6 @@ $ste->register_tag("articles_get", function($ste, $params, $sub) if(!isset($params["var"])) throw new Exception("Parameter var is needed in article_get!"); - if(isset($params["section"])) { try -- cgit v1.2.3-54-g00ecf