some useless calls / unitialized $matches arrays
[lhc/web/wiklou.git] / includes / SpecialUncategorizedpages.php
index 4487c3c..c8fd40d 100755 (executable)
@@ -34,10 +34,19 @@ class UncategorizedPagesPage extends PageQueryPage {
        function getSQL() {
                $dbr =& wfGetDB( DB_SLAVE );
                extract( $dbr->tableNames( 'page', 'categorylinks' ) );
+               $name = $dbr->addQuotes( $this->getName() );
 
-               return "SELECT 'Uncategorizedpages' as type, page_namespace AS namespace, page_title AS title, page_title AS value " .
-                       "FROM $page LEFT JOIN $categorylinks ON page_id=cl_from ".
-                       "WHERE cl_from IS NULL AND page_namespace=$this->requestedNamespace AND page_is_redirect=0";
+               return 
+                       "
+                       SELECT
+                               $name as type,
+                               page_namespace AS namespace,
+                               page_title AS title,
+                               page_title AS value
+                       FROM $page
+                       LEFT JOIN $categorylinks ON page_id=cl_from
+                       WHERE cl_from IS NULL AND page_namespace={$this->requestedNamespace} AND page_is_redirect=0
+                       ";
        }
 }