Index: branches/REL1_5/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' ), |
— | — | @@ -75,21 +71,17 @@ |
76 | 72 | 'Userrights' => new SpecialPage( 'Userrights', 'userrights' ), |
77 | 73 | ); |
78 | 74 | |
79 | | -global $wgUseValidation ; |
80 | 75 | if ( $wgUseValidation ) |
81 | 76 | $wgSpecialPages['Validate'] = new SpecialPage( 'Validate' ); |
82 | 77 | |
83 | | -global $wgDisableCounters; |
84 | 78 | if( !$wgDisableCounters ) { |
85 | 79 | $wgSpecialPages['Popularpages'] = new SpecialPage( 'Popularpages' ); |
86 | 80 | } |
87 | 81 | |
88 | | -global $wgDisableInternalSearch; |
89 | 82 | if( !$wgDisableInternalSearch ) { |
90 | 83 | $wgSpecialPages['Search'] = new UnlistedSpecialPage( 'Search' ); |
91 | 84 | } |
92 | 85 | |
93 | | -global $wgEmailAuthentication; |
94 | 86 | if( $wgEmailAuthentication ) { |
95 | 87 | $wgSpecialPages['Confirmemail'] = new UnlistedSpecialPage( 'Confirmemail' ); |
96 | 88 | } |
— | — | @@ -165,7 +157,7 @@ |
166 | 158 | * @static |
167 | 159 | * @param string $name |
168 | 160 | */ |
169 | | - function &getPage( $name ) { |
| 161 | + function getPage( $name ) { |
170 | 162 | global $wgSpecialPages; |
171 | 163 | if ( array_key_exists( $name, $wgSpecialPages ) ) { |
172 | 164 | return $wgSpecialPages[$name]; |
— | — | @@ -179,7 +171,7 @@ |
180 | 172 | * @param string $name |
181 | 173 | * @return mixed Title object if the redirect exists, otherwise NULL |
182 | 174 | */ |
183 | | - function &getRedirect( $name ) { |
| 175 | + function getRedirect( $name ) { |
184 | 176 | global $wgUser; |
185 | 177 | switch ( $name ) { |
186 | 178 | case 'Mypage': |
— | — | @@ -240,12 +232,12 @@ |
241 | 233 | $par = $bits[1]; |
242 | 234 | } |
243 | 235 | |
244 | | - $page =& SpecialPage::getPage( $name ); |
| 236 | + $page = SpecialPage::getPage( $name ); |
245 | 237 | if ( is_null( $page ) ) { |
246 | 238 | if ( $including ) { |
247 | 239 | return false; |
248 | 240 | } else { |
249 | | - $redir =& SpecialPage::getRedirect( $name ); |
| 241 | + $redir = SpecialPage::getRedirect( $name ); |
250 | 242 | if ( isset( $redir ) ) { |
251 | 243 | if ( isset( $par ) ) |
252 | 244 | $wgOut->redirect( $redir->getFullURL() . '/' . $par ); |