Index: branches/wmf/1.17wmf1/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 | } |