Index: trunk/extensions/ProofreadPage/ProofreadPage_body.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | if ( $namespace !== null ) { |
37 | 37 | return $namespace; |
38 | 38 | } |
39 | | - $namespaceText = strtolower( wfMsgForContent( 'proofreadpage_namespace' ) ); |
| 39 | + $namespaceText = strtolower( str_replace( ' ', '_', wfMsgForContent( 'proofreadpage_namespace' ) ) ); |
40 | 40 | $namespace = MWNamespace::getCanonicalIndex( $namespaceText ); |
41 | 41 | return $namespace; |
42 | 42 | } |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | if ( $namespace !== null ) { |
52 | 52 | return $namespace; |
53 | 53 | } |
54 | | - $namespaceText = strtolower( wfMsgForContent( 'proofreadpage_index_namespace' ) ); |
| 54 | + $namespaceText = strtolower( str_replace( ' ', '_', wfMsgForContent( 'proofreadpage_index_namespace' ) ) ); |
55 | 55 | $namespace = MWNamespace::getCanonicalIndex( $namespaceText ); |
56 | 56 | return $namespace; |
57 | 57 | } |
— | — | @@ -841,7 +841,7 @@ |
842 | 842 | list( $page, $pagenum ) = $item; |
843 | 843 | $pp[] = $page; |
844 | 844 | } |
845 | | - $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( $page_namespace ) ); |
| 845 | + $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( str_replace( ' ', '_', $page_namespace ) ) ); |
846 | 846 | $dbr = wfGetDB( DB_SLAVE ); |
847 | 847 | $cat = str_replace( ' ' , '_' , wfMsgForContent( 'proofreadpage_quality0_category' ) ); |
848 | 848 | $res = $dbr->select( |
— | — | @@ -1352,7 +1352,7 @@ |
1353 | 1353 | */ |
1354 | 1354 | private static function update_pr_index( $index, $deletedpage = null ) { |
1355 | 1355 | list( $page_namespace, $index_namespace ) = self::getPageAndIndexNamespace(); |
1356 | | - $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( $page_namespace ) ); |
| 1356 | + $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( str_replace( ' ', '_', $page_namespace ) ) ); |
1357 | 1357 | if ( $page_ns_index == null ) { |
1358 | 1358 | return; |
1359 | 1359 | } |
— | — | @@ -1442,8 +1442,8 @@ |
1443 | 1443 | return true; |
1444 | 1444 | } |
1445 | 1445 | list( $page_namespace, $index_namespace ) = self::getPageAndIndexNamespace(); |
1446 | | - $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( $page_namespace ) ); |
1447 | | - $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( $index_namespace ) ); |
| 1446 | + $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( str_replace( ' ', '_', $page_namespace ) ) ); |
| 1447 | + $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( str_replace( ' ', '_', $index_namespace ) ) ); |
1448 | 1448 | if( $page_ns_index == null || $index_ns_index == null ) { |
1449 | 1449 | return true; |
1450 | 1450 | } |
Index: trunk/extensions/ProofreadPage/SpecialProofreadPages.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | ); |
37 | 37 | if( $this->searchTerm ) { |
38 | 38 | $index_namespace = $this->index_namespace; |
39 | | - $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( $index_namespace ) ); |
| 39 | + $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( str_replace( ' ', '_', $index_namespace ) ) ); |
40 | 40 | $searchEngine = SearchEngine::create(); |
41 | 41 | $searchEngine->setLimitOffset( $limit, $offset ); |
42 | 42 | $searchEngine->setNamespaces( array( $index_ns_index ) ); |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | if ( $this->searchTerm ) { |
91 | 91 | if ( $this->searchList !== null ) { |
92 | 92 | $index_namespace = $this->index_namespace; |
93 | | - $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( $index_namespace ) ); |
| 93 | + $index_ns_index = MWNamespace::getCanonicalIndex( strtolower( str_replace( ' ', '_', $index_namespace ) ) ); |
94 | 94 | $conds = array( 'page_namespace' => $index_ns_index ); |
95 | 95 | if ( $this->searchList ) { |
96 | 96 | $conds['page_title'] = $this->searchList; |
Index: trunk/extensions/ProofreadPage/SpecialPagesWithoutScans.php |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | |
78 | 78 | function getQueryInfo() { |
79 | 79 | $dbr = wfGetDB( DB_SLAVE ); |
80 | | - $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( $this->page_namespace ) ); |
| 80 | + $page_ns_index = MWNamespace::getCanonicalIndex( strtolower( str_replace( ' ', '_', $this->page_namespace ) ) ); |
81 | 81 | |
82 | 82 | // Construct subqueries |
83 | 83 | $pagesWithScansSubquery = $dbr->selectSQLText( |