From 06278e5bcfd591bb975c8ffe8efb39f1fcd0da67 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sat, 31 Mar 2007 23:36:58 +0000 Subject: [PATCH] Move PageQueryPage class into own file --- includes/AutoLoader.php | 2 +- includes/PageQueryPage.php | 25 +++++++++++++++++++++++++ includes/QueryPage.php | 17 +---------------- 3 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 includes/PageQueryPage.php diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index b4b8ef8093..ca9d92e636 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -134,7 +134,7 @@ function __autoload($className) { 'ProxyTools' => 'includes/ProxyTools.php', 'ProtectionForm' => 'includes/ProtectionForm.php', 'QueryPage' => 'includes/QueryPage.php', - 'PageQueryPage' => 'includes/QueryPage.php', + 'PageQueryPage' => 'includes/PageQueryPage.php', 'ImageQueryPage' => 'includes/ImageQueryPage.php', 'RawPage' => 'includes/RawPage.php', 'RecentChange' => 'includes/RecentChange.php', diff --git a/includes/PageQueryPage.php b/includes/PageQueryPage.php new file mode 100644 index 0000000000..17ed57f136 --- /dev/null +++ b/includes/PageQueryPage.php @@ -0,0 +1,25 @@ +namespace, $row->title ); + return $skin->makeKnownLinkObj( $title, + htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) ) ); + } +} + +?> \ No newline at end of file diff --git a/includes/QueryPage.php b/includes/QueryPage.php index 957182719f..409a9c4bb4 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -524,19 +524,4 @@ class QueryPage { } } -/** - * This is a subclass for very simple queries that are just looking for page - * titles that match some criteria. It formats each result item as a link to - * that page. - * - */ -class PageQueryPage extends QueryPage { - - function formatResult( $skin, $result ) { - global $wgContLang; - $nt = Title::makeTitle( $result->namespace, $result->title ); - return $skin->makeKnownLinkObj( $nt, htmlspecialchars( $wgContLang->convert( $nt->getPrefixedText() ) ) ); - } -} - -?> +?> \ No newline at end of file -- 2.20.1