Change default on $wgSysopUserBans and $wgSysopRangeBans to true
[lhc/web/wiklou.git] / includes / SpecialCategories.php
index 34ebc6a..977484b 100644 (file)
@@ -1,7 +1,20 @@
 <?php
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
 
+/**
+ *
+ */
 require_once("QueryPage.php");
 
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
 class CategoriesPage extends QueryPage {
 
        function getName() {
@@ -12,13 +25,20 @@ class CategoriesPage extends QueryPage {
                return false;
        }
 
+       function isSyndicated() { return false; }
+
+       function getPageHeader() {
+               return '<p>'.wfMsg('categoriespagetext')."</p><br />\n";
+       }
        function getSQL() {
-               $NScat = Namespace::getCategory();
+               $NScat = NS_CATEGORY;
+               $dbr =& wfGetDB( DB_SLAVE );
+               $categorylinks = $dbr->tableName( 'categorylinks' );
                return "SELECT DISTINCT 'Categories' as type, 
                                {$NScat} as namespace,
                                cl_to as title,
                                1 as value
-                          FROM categorylinks";
+                          FROM $categorylinks";
        }
        
        function sortDescending() {
@@ -27,12 +47,15 @@ class CategoriesPage extends QueryPage {
 
        function formatResult( $skin, $result ) {
                global $wgLang;
-               return $skin->makeLink( $wgLang->getNsText( NS_CATEGORY ).":".$result->title, $result->title );
+               $title = Title::makeTitle( NS_CATEGORY, $result->title );
+               return $skin->makeLinkObj( $title, $title->getText() );
        }
 }
 
-function wfSpecialCategories()
-{
+/**
+ *
+ */
+function wfSpecialCategories() {
        list( $limit, $offset ) = wfCheckLimits();
 
        $cap = new CategoriesPage();