Index: trunk/extensions/WikimediaIncubator/WikimediaIncubator.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | 'path' => __FILE__, |
12 | 12 | 'name' => 'Wikimedia Incubator', |
13 | 13 | 'author' => 'SPQRobin', |
14 | | - 'version' => '2.3.0', |
| 14 | + 'version' => '2.3.1', |
15 | 15 | 'url' => 'http://www.mediawiki.org/wiki/Extension:WikimediaIncubator', |
16 | 16 | 'description' => 'Test wiki features for Wikimedia Incubator', |
17 | 17 | 'descriptionmsg' => 'wminc-desc', |
Index: trunk/extensions/WikimediaIncubator/SpecialRandomByTest.php |
— | — | @@ -7,13 +7,15 @@ |
8 | 8 | class SpecialRandomByTest extends RandomPage |
9 | 9 | { |
10 | 10 | public function __construct() { |
11 | | - global $wgExtraRandompageSQL, $wgUser, $wmincPref; |
| 11 | + parent::__construct( 'RandomByTest' ); |
| 12 | + } |
| 13 | + |
| 14 | + public function addExtraSQL() { |
| 15 | + global $wgUser, $wmincPref; |
12 | 16 | if(IncubatorTest::isNormalPrefix()) { |
13 | | - $wgExtraRandompageSQL = 'page_title like "W'.$wgUser->getOption($wmincPref . '-project').'/'.$wgUser->getOption($wmincPref . '-code').'/%%"'; |
| 17 | + return 'page_title like "W'.$wgUser->getOption($wmincPref . '-project').'/'.$wgUser->getOption($wmincPref . '-code').'/%%"'; |
14 | 18 | } elseif($wgUser->getOption($wmincPref . '-project') == 'inc') { |
15 | | - $wgExtraRandompageSQL = 'page_title not like "W_/%%" OR "W_/%%/%%"'; |
| 19 | + return 'page_title not like "W_/%%" OR "W_/%%/%%"'; |
16 | 20 | } |
17 | | - |
18 | | - parent::__construct( 'RandomByTest' ); |
19 | 21 | } |
20 | 22 | } |