From 21f72801d83f353713b344ba8b690c9277e4029d Mon Sep 17 00:00:00 2001 From: Erik Moeller Date: Sat, 26 Nov 2005 17:39:59 +0000 Subject: [PATCH] hack support for into preload parameter so that categories can be removed from new article templates. --- includes/Article.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } } } -- 2.20.1