Merge "Protect WAN cache sets() against uncommitted data"
[lhc/web/wiklou.git] / includes / specials / SpecialUnusedcategories.php
index b686a5b..0d3216c 100644 (file)
  * @ingroup SpecialPage
  */
 class UnusedCategoriesPage extends QueryPage {
-
-       function isExpensive() {
-               return true;
-       }
-
        function __construct( $name = 'Unusedcategories' ) {
                parent::__construct( $name );
        }
 
+       public function isExpensive() {
+               return true;
+       }
+
        function getPageHeader() {
                return $this->msg( 'unusedcategoriestext' )->parseAsBlock();
        }
 
-       function getQueryInfo() {
+       public function getQueryInfo() {
                return array(
                        'tables' => array( 'page', 'categorylinks' ),
-                       'fields' => array( 'namespace' => 'page_namespace',
-                                       'title' => 'page_title',
-                                       'value' => 'page_title' ),
-                       'conds' => array( 'cl_from IS NULL',
-                                       'page_namespace' => NS_CATEGORY,
-                                       'page_is_redirect' => 0 ),
-                       'join_conds' => array( 'categorylinks' => array(
-                                       'LEFT JOIN', 'cl_to = page_title' ) )
+                       'fields' => array(
+                               'namespace' => 'page_namespace',
+                               'title' => 'page_title',
+                               'value' => 'page_title'
+                       ),
+                       'conds' => array(
+                               'cl_from IS NULL',
+                               'page_namespace' => NS_CATEGORY,
+                               'page_is_redirect' => 0
+                       ),
+                       'join_conds' => array( 'categorylinks' => array( 'LEFT JOIN', 'cl_to = page_title' ) )
                );
        }
 
@@ -67,6 +69,7 @@ class UnusedCategoriesPage extends QueryPage {
         */
        function formatResult( $skin, $result ) {
                $title = Title::makeTitle( NS_CATEGORY, $result->title );
+
                return Linker::link( $title, htmlspecialchars( $title->getText() ) );
        }