Index: trunk/extensions/WikimediaIncubator/SpecialRandomByTest.php |
— | — | @@ -13,8 +13,12 @@ |
14 | 14 | $this->extra[] = 'page_title' . |
15 | 15 | $dbr->buildLike( IncubatorTest::displayPrefix() . '/', $dbr->anyString() ); |
16 | 16 | } elseif($wgUser->getOption($wmincPref . '-project') == $wmincProjectSite['short'] ) { |
17 | | - // project or help namespace |
18 | | - $this->extra['page_namespace'] = array( 4, 12 ); |
| 17 | + global $wgVersion; |
| 18 | + // only works above MW 1.17 |
| 19 | + if( version_compare($wgVersion, '1.17', '>') ) { |
| 20 | + // project or help namespace |
| 21 | + $this->extra['page_namespace'] = array( 4, 12 ); |
| 22 | + } |
19 | 23 | } |
20 | 24 | parent::__construct( 'RandomByTest' ); |
21 | 25 | } |
Index: trunk/extensions/WikimediaIncubator/SpecialViewUserLang.php |
— | — | @@ -67,8 +67,8 @@ |
68 | 68 | * @param $target Mixed: user whose language and test wiki we're looking up |
69 | 69 | */ |
70 | 70 | function showInfo( $target ) { |
71 | | - global $wgOut, $wmincPref, $wmincProjectSite; |
72 | | - $sk = $this->getSkin(); |
| 71 | + global $wgOut, $wmincPref, $wmincProjectSite, $wgUser; |
| 72 | + $sk = $wgUser->getSkin(); |
73 | 73 | $user = User::newFromName( $target ); |
74 | 74 | $langNames = Language::getLanguageNames(); |
75 | 75 | if ( $user == null || $user->getId() == 0 ) { |