Index: trunk/extensions/WikimediaIncubator/WikimediaIncubator.php |
— | — | @@ -1,7 +1,9 @@ |
2 | 2 | <?php |
3 | 3 | if ( !defined( 'MEDIAWIKI' ) ) { die( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" ); } |
4 | 4 | /** |
5 | | - * An extension that adds test wiki features (such as a preference, recent changes for a test wiki, ...) specifically for the Wikimedia Incubator |
| 5 | + * An extension that adds features (such as a preference, recent changes, ...) |
| 6 | + * for a test wiki system (i.e. incubated wikis inside one actual wiki) |
| 7 | + * mainly intended for the Wikimedia Incubator |
6 | 8 | * |
7 | 9 | * @file |
8 | 10 | * @ingroup Extensions |
— | — | @@ -11,7 +13,7 @@ |
12 | 14 | 'path' => __FILE__, |
13 | 15 | 'name' => 'Wikimedia Incubator', |
14 | 16 | 'author' => 'SPQRobin', |
15 | | - 'version' => '3.0', |
| 17 | + 'version' => '3.0.1', |
16 | 18 | 'url' => 'http://www.mediawiki.org/wiki/Extension:WikimediaIncubator', |
17 | 19 | 'descriptionmsg' => 'wminc-desc', |
18 | 20 | ); |
Index: trunk/extensions/WikimediaIncubator/TestWikiRC.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | global $wgUser, $wgRequest, $wmincPref, $wmincProjectSite, $wmincTestWikiNamespaces; |
10 | 10 | $projectvalue = strtolower( $wgRequest->getVal( 'rc-testwiki-project', $wgUser->getOption($wmincPref . '-project') ) ); |
11 | 11 | $codevalue = strtolower( $wgRequest->getVal( 'rc-testwiki-code', $wgUser->getOption($wmincPref . '-code') ) ); |
12 | | - $fullprefix = IncubatorTest::displayPrefix( $projectvalue, $codevalue ); |
| 12 | + $prefix = IncubatorTest::displayPrefix( $projectvalue, $codevalue ); |
13 | 13 | $opts->add( 'rc-testwiki-project', false ); |
14 | 14 | $opts->setValue( 'rc-testwiki-project', $projectvalue ); |
15 | 15 | $opts->add( 'rc-testwiki-code', false ); |
— | — | @@ -18,16 +18,16 @@ |
19 | 19 | return true; |
20 | 20 | } elseif ( $projectvalue == $wmincProjectSite['short'] ) { |
21 | 21 | // If project site is selected, display all changes except test wiki changes |
22 | | - $conds[] = 'rc_title not like \'W_/%%\' OR \'W_/%%/%%\''; |
23 | | - return true; |
| 22 | + $dbr = wfGetDB( DB_SLAVE ); |
| 23 | + $conds[] = 'rc_title NOT ' . $dbr->buildLike( 'W', $dbr->anyChar(), '/', $dbr->anyString() ); |
24 | 24 | } else { |
25 | | - // Else, display changes to the selected test wiki (in main, template and category namespace) |
| 25 | + // Else, display changes to the selected test wiki in the appropriate namespaces |
26 | 26 | $dbr = wfGetDB( DB_SLAVE ); |
27 | 27 | $conds['rc_namespace'] = $wmincTestWikiNamespaces; |
28 | | - $conds[] = 'rc_title ' . $dbr->buildLike( $fullprefix . '/', $dbr->anyString() ) . |
29 | | - ' OR rc_title = ' . $dbr->addQuotes( $fullprefix ); |
30 | | - return true; |
| 28 | + $conds[] = 'rc_title ' . $dbr->buildLike( $prefix . '/', $dbr->anyString() ) . |
| 29 | + ' OR rc_title = ' . $dbr->addQuotes( $prefix ); |
31 | 30 | } |
| 31 | + return true; |
32 | 32 | } |
33 | 33 | |
34 | 34 | static function onRcForm( &$items, $opts ) { |