* (bug 12938) Fix template expansion and 404 returns for action=raw with section
[lhc/web/wiklou.git] / includes / Parser.php
index 1549069..41eabe4 100644 (file)
@@ -516,7 +516,7 @@ class Parser
 
        /**
         * Replaces all occurrences of HTML-style comments and the given tags
-        * in the text with a random marker and returns teh next text. The output
+        * in the text with a random marker and returns the next text. The output
         * parameter $matches will be an associative array filled with data in
         * the form:
         *   'UNIQ-xxxxx' => array(
@@ -4015,9 +4015,9 @@ class Parser
                                        # Not in the link cache, add it to the query
                                        if ( !isset( $current ) ) {
                                                $current = $ns;
-                                               $query =  "SELECT page_id, page_namespace, page_title";
+                                               $query =  "SELECT page_id, page_namespace, page_title, page_is_redirect";
                                                if ( $threshold > 0 ) {
-                                                       $query .= ', page_len, page_is_redirect';
+                                                       $query .= ', page_len';
                                                }
                                                $query .= " FROM $page WHERE (page_namespace=$ns AND page_title IN(";
                                        } elseif ( $current != $ns ) {
@@ -4106,9 +4106,9 @@ class Parser
                                        // construct query
                                        $titleClause = $linkBatch->constructSet('page', $dbr);
 
-                                       $variantQuery =  "SELECT page_id, page_namespace, page_title";
+                                       $variantQuery =  "SELECT page_id, page_namespace, page_title, page_is_redirect";
                                        if ( $threshold > 0 ) {
-                                               $variantQuery .= ', page_len, page_is_redirect';
+                                               $variantQuery .= ', page_len';
                                        }
 
                                        $variantQuery .= " FROM $page WHERE $titleClause";