Index: trunk/phase3/includes/SpecialShortpages.php |
— | — | @@ -27,18 +27,26 @@ |
28 | 28 | } |
29 | 29 | |
30 | 30 | function getSQL() { |
| 31 | + global $wgContentNamespaces; |
| 32 | + |
31 | 33 | $dbr = wfGetDB( DB_SLAVE ); |
32 | 34 | $page = $dbr->tableName( 'page' ); |
33 | 35 | $name = $dbr->addQuotes( $this->getName() ); |
34 | 36 | |
35 | 37 | $forceindex = $dbr->useIndexClause("page_len"); |
| 38 | + |
| 39 | + if ($wgContentNamespaces) |
| 40 | + $nsclause = "page_namespace IN (" . implode(',', $wgContentNamespaces) . ")"; |
| 41 | + else |
| 42 | + $nsclause = "page_namespace = " . NS_MAIN; |
| 43 | + |
36 | 44 | return |
37 | 45 | "SELECT $name as type, |
38 | 46 | page_namespace as namespace, |
39 | 47 | page_title as title, |
40 | 48 | page_len AS value |
41 | 49 | FROM $page $forceindex |
42 | | - WHERE page_namespace=".NS_MAIN." AND page_is_redirect=0"; |
| 50 | + WHERE $nsclause AND page_is_redirect=0"; |
43 | 51 | } |
44 | 52 | |
45 | 53 | function preprocessResults( $db, $res ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -90,6 +90,7 @@ |
91 | 91 | text from Special:UserLogin title (new message 'nav-login-createaccount') |
92 | 92 | * Say "log in / create account" if an anonymous user can create an account, |
93 | 93 | otherwise just "log in", consistently across skins |
| 94 | +* Special:Shortpages returns pages in all content namespaces, not just NS_MAIN. |
94 | 95 | |
95 | 96 | === Bug fixes in 1.13 === |
96 | 97 | |