Index: trunk/extensions/HelpCommons/HelpCommons.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | $page = $dbr->select( |
62 | 62 | 'page', |
63 | 63 | array( 'page_title', 'page_namespace', 'page_latest' ), |
64 | | - array( 'page_namespace' => 12, 'page_title' => $title ), |
| 64 | + array( 'page_namespace' => constant( 'NS_HELP' ), 'page_title' => $title ), |
65 | 65 | __METHOD__ |
66 | 66 | ); |
67 | 67 | $page = $dbr->fetchObject( $page ); |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | $page = $dbr->select( |
116 | 116 | 'page', |
117 | 117 | array( 'page_title', 'page_namespace', 'page_latest' ), |
118 | | - array( 'page_namespace' => 12, 'page_title' => $title ), |
| 118 | + array( 'page_namespace' => constant( 'NS_HELP' ), 'page_title' => $title ), |
119 | 119 | __METHOD__ |
120 | 120 | ); |
121 | 121 | $page = $dbr->fetchObject( $page ); |
— | — | @@ -218,7 +218,7 @@ |
219 | 219 | $res = $dbr->select( |
220 | 220 | 'page', |
221 | 221 | array( 'page_title', 'page_namespace', 'page_latest' ), |
222 | | - array( 'page_namespace' => 12, 'page_title' => str_replace( ' ', '_', $title->getText() ) ), |
| 222 | + array( 'page_namespace' => constant( 'NS_HELP' ), 'page_title' => str_replace( ' ', '_', $title->getText() ) ), |
223 | 223 | __METHOD__ |
224 | 224 | ); |
225 | 225 | |
— | — | @@ -229,7 +229,7 @@ |
230 | 230 | $ns = $title->getNamespace(); |
231 | 231 | |
232 | 232 | // check namespaces |
233 | | - if( $ns == 12 || $ns == 13 ) { |
| 233 | + if( $ns == constant( 'NS_HELP' ) || $ns == constant( 'NS_HELP_TALK' ) ) { |
234 | 234 | // error message if action is blocked |
235 | 235 | $result = array( 'protectedpagetext' ); |
236 | 236 | |