Index: trunk/phase3/includes/SpecialPage.php |
— | — | @@ -17,11 +17,6 @@ |
18 | 18 | |
19 | 19 | |
20 | 20 | /** |
21 | | - * |
22 | | - */ |
23 | | -global $wgSpecialPages, $wgUser; |
24 | | - |
25 | | -/** |
26 | 21 | * @access private |
27 | 22 | */ |
28 | 23 | $wgSpecialPages = array( |
— | — | @@ -47,6 +42,7 @@ |
48 | 43 | 'Unusedcategories' => new SpecialPage( 'Unusedcategories' ), |
49 | 44 | 'Unusedimages' => new SpecialPage( 'Unusedimages' ), |
50 | 45 | 'Wantedpages' => new SpecialPage( 'Wantedpages' ), |
| 46 | + 'Mostlinked' => new SpecialPage( 'Mostlinked' ), |
51 | 47 | 'Shortpages' => new SpecialPage( 'Shortpages' ), |
52 | 48 | 'Longpages' => new SpecialPage( 'Longpages' ), |
53 | 49 | 'Newpages' => new IncludableSpecialPage( 'Newpages' ), |
— | — | @@ -76,21 +72,17 @@ |
77 | 73 | 'Userrights' => new SpecialPage( 'Userrights', 'userrights' ), |
78 | 74 | ); |
79 | 75 | |
80 | | -global $wgUseValidation ; |
81 | 76 | if ( $wgUseValidation ) |
82 | 77 | $wgSpecialPages['Validate'] = new SpecialPage( 'Validate' ); |
83 | 78 | |
84 | | -global $wgDisableCounters; |
85 | 79 | if( !$wgDisableCounters ) { |
86 | 80 | $wgSpecialPages['Popularpages'] = new SpecialPage( 'Popularpages' ); |
87 | 81 | } |
88 | 82 | |
89 | | -global $wgDisableInternalSearch; |
90 | 83 | if( !$wgDisableInternalSearch ) { |
91 | 84 | $wgSpecialPages['Search'] = new UnlistedSpecialPage( 'Search' ); |
92 | 85 | } |
93 | 86 | |
94 | | -global $wgEmailAuthentication; |
95 | 87 | if( $wgEmailAuthentication ) { |
96 | 88 | $wgSpecialPages['Confirmemail'] = new UnlistedSpecialPage( 'Confirmemail' ); |
97 | 89 | } |
— | — | @@ -166,7 +158,7 @@ |
167 | 159 | * @static |
168 | 160 | * @param string $name |
169 | 161 | */ |
170 | | - function &getPage( $name ) { |
| 162 | + function getPage( $name ) { |
171 | 163 | global $wgSpecialPages; |
172 | 164 | if ( array_key_exists( $name, $wgSpecialPages ) ) { |
173 | 165 | return $wgSpecialPages[$name]; |
— | — | @@ -180,7 +172,7 @@ |
181 | 173 | * @param string $name |
182 | 174 | * @return mixed Title object if the redirect exists, otherwise NULL |
183 | 175 | */ |
184 | | - function &getRedirect( $name ) { |
| 176 | + function getRedirect( $name ) { |
185 | 177 | global $wgUser; |
186 | 178 | switch ( $name ) { |
187 | 179 | case 'Mypage': |
— | — | @@ -241,12 +233,12 @@ |
242 | 234 | $par = $bits[1]; |
243 | 235 | } |
244 | 236 | |
245 | | - $page =& SpecialPage::getPage( $name ); |
| 237 | + $page = SpecialPage::getPage( $name ); |
246 | 238 | if ( is_null( $page ) ) { |
247 | 239 | if ( $including ) { |
248 | 240 | return false; |
249 | 241 | } else { |
250 | | - $redir =& SpecialPage::getRedirect( $name ); |
| 242 | + $redir = SpecialPage::getRedirect( $name ); |
251 | 243 | if ( isset( $redir ) ) { |
252 | 244 | if ( isset( $par ) ) |
253 | 245 | $wgOut->redirect( $redir->getFullURL() . '/' . $par ); |