From: Erik Moeller Date: Sat, 26 Nov 2005 17:39:59 +0000 (+0000) Subject: hack support for into preload parameter so that categories can X-Git-Tag: 1.6.0~1127 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=21f72801d83f353713b344ba8b690c9277e4029d;p=lhc%2Fweb%2Fwiklou.git hack support for into preload parameter so that categories can be removed from new article templates. --- diff --git a/includes/Article.php b/includes/Article.php index 35a23f5e58..f4b5f75547 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -142,7 +142,8 @@ class Article { /** This function accepts a title string as parameter ($preload). If this string is non-empty, it attempts - to fetch the current revision text. + to fetch the current revision text. It respects + . */ function getPreloadedText($preload) { if($preload) { @@ -150,7 +151,9 @@ class Article { if(isset($preloadTitle) && $preloadTitle->userCanRead()) { $rev=Revision::newFromTitle($preloadTitle); if($rev) { - return $rev->getText(); + $text=$rev->getText(); + $text=preg_replace('/<\/?includeonly>/i','',$text); + return $text; } } }