Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -302,7 +302,7 @@ |
303 | 303 | /** |
304 | 304 | * Get visiblity restrictions on page |
305 | 305 | * @param int $flags, FR_MASTER |
306 | | - * @return array (select,override) |
| 306 | + * @return Array (select,override) |
307 | 307 | */ |
308 | 308 | public function getStabilitySettings( $flags = 0 ) { |
309 | 309 | $this->loadFlaggedRevsData( $flags ); |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -471,7 +471,7 @@ |
472 | 472 | * @param Title $title |
473 | 473 | * @param string $text wikitext |
474 | 474 | * @param int $id Source revision Id |
475 | | - * @return array( string wikitext, array of template versions ) |
| 475 | + * @return Array( string wikitext, array of template versions ) |
476 | 476 | */ |
477 | 477 | public static function expandText( Title $title, $text, $id ) { |
478 | 478 | global $wgParser; |
— | — | @@ -1075,7 +1075,7 @@ |
1076 | 1076 | /** |
1077 | 1077 | * Get minimum level tags for a tier |
1078 | 1078 | * @param int $tier FR_PRISTINE/FR_QUALITY/FR_CHECKED |
1079 | | - * @return array |
| 1079 | + * @return Array |
1080 | 1080 | */ |
1081 | 1081 | public static function quickTags( $tier ) { |
1082 | 1082 | self::load(); |
— | — | @@ -1117,7 +1117,7 @@ |
1118 | 1118 | |
1119 | 1119 | /** |
1120 | 1120 | * Get the list of reviewable namespaces |
1121 | | - * @return array |
| 1121 | + * @return Array |
1122 | 1122 | */ |
1123 | 1123 | public static function getReviewNamespaces() { |
1124 | 1124 | self::load(); // validates namespaces |
— | — | @@ -1126,7 +1126,7 @@ |
1127 | 1127 | |
1128 | 1128 | /** |
1129 | 1129 | * Get the list of patrollable namespaces |
1130 | | - * @return array |
| 1130 | + * @return Array |
1131 | 1131 | */ |
1132 | 1132 | public static function getPatrolNamespaces() { |
1133 | 1133 | self::load(); // validates namespaces |
Index: trunk/extensions/FlaggedRevs/business/RevisionReviewForm.php |
— | — | @@ -1,9 +1,4 @@ |
2 | 2 | <?php |
3 | | -# (c) Aaron Schulz 2010 GPL |
4 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
5 | | - echo "FlaggedRevs extension\n"; |
6 | | - exit( 1 ); |
7 | | -} |
8 | 3 | /** |
9 | 4 | * Class containing revision review form business logic |
10 | 5 | * Note: edit tokens are the responsibility of caller |
— | — | @@ -11,8 +6,7 @@ |
12 | 7 | * (b) call ready() when all params are set |
13 | 8 | * (c) call submit() as needed |
14 | 9 | */ |
15 | | -class RevisionReviewForm |
16 | | -{ |
| 10 | +class RevisionReviewForm { |
17 | 11 | /* Form parameters which can be user given */ |
18 | 12 | protected $page = null; |
19 | 13 | protected $approve = false; |
— | — | @@ -37,7 +31,7 @@ |
38 | 32 | public function __construct( User $user ) { |
39 | 33 | $this->user = $user; |
40 | 34 | foreach ( FlaggedRevs::getTags() as $tag ) { |
41 | | - $this->dims[$tag] = 0; |
| 35 | + $this->dims[$tag] = 0; // default to "inadequate" |
42 | 36 | } |
43 | 37 | } |
44 | 38 | |
— | — | @@ -339,9 +333,7 @@ |
340 | 334 | } |
341 | 335 | # Watch page if set to do so |
342 | 336 | if ( $status === true ) { |
343 | | - if ( $this->user->getOption( 'flaggedrevswatch' ) |
344 | | - && !$this->page->userIsWatching() ) |
345 | | - { |
| 337 | + if ( $this->user->getOption( 'flaggedrevswatch' ) && !$this->page->userIsWatching() ) { |
346 | 338 | $this->user->addWatch( $this->page ); |
347 | 339 | } |
348 | 340 | } |
Index: trunk/extensions/FlaggedRevs/business/PageStabilityForm.php |
— | — | @@ -1,9 +1,4 @@ |
2 | 2 | <?php |
3 | | -# (c) Aaron Schulz 2010 GPL |
4 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
5 | | - echo "FlaggedRevs extension\n"; |
6 | | - exit( 1 ); |
7 | | -} |
8 | 3 | /** |
9 | 4 | * Class containing stability settings form business logic |
10 | 5 | * Note: edit tokens are the responsibility of caller |
— | — | @@ -11,8 +6,7 @@ |
12 | 7 | * (b) call ready() when all params are set |
13 | 8 | * (c) call preloadSettings() or submit() as needed |
14 | 9 | */ |
15 | | -abstract class PageStabilityForm |
16 | | -{ |
| 10 | +abstract class PageStabilityForm { |
17 | 11 | /* Form parameters which can be user given */ |
18 | 12 | protected $page = false; # Target page obj |
19 | 13 | protected $watchThis = null; # Watch checkbox |
— | — | @@ -33,6 +27,10 @@ |
34 | 28 | $this->user = $user; |
35 | 29 | } |
36 | 30 | |
| 31 | + public function getUser() { |
| 32 | + return $this->user; |
| 33 | + } |
| 34 | + |
37 | 35 | public function getPage() { |
38 | 36 | return $this->page; |
39 | 37 | } |
— | — | @@ -377,7 +375,7 @@ |
378 | 376 | |
379 | 377 | /* |
380 | 378 | * Get assoc. array of log params |
381 | | - * @return array |
| 379 | + * @return Array |
382 | 380 | */ |
383 | 381 | protected function getLogParams() { |
384 | 382 | return array(); |
Index: trunk/extensions/FlaggedRevs/FRDependencyUpdate.php |
— | — | @@ -76,7 +76,7 @@ |
77 | 77 | /* |
78 | 78 | * Get existing cache dependancies |
79 | 79 | * @param int $flags FR_MASTER |
80 | | - * @return array (ns => dbKey => 1) |
| 80 | + * @return Array (ns => dbKey => 1) |
81 | 81 | */ |
82 | 82 | protected function getExistingDeps( $flags = 0 ) { |
83 | 83 | $db = ( $flags & FR_MASTER ) ? |
— | — | @@ -98,7 +98,7 @@ |
99 | 99 | |
100 | 100 | /* |
101 | 101 | * Get INSERT rows for cache dependancies in $new but not in $existing |
102 | | - * @return array |
| 102 | + * @return Array |
103 | 103 | */ |
104 | 104 | protected function getDepInsertions( array $existing, array $new ) { |
105 | 105 | $arr = array(); |
— | — | @@ -157,7 +157,7 @@ |
158 | 158 | |
159 | 159 | /** |
160 | 160 | * Get an array of existing links, as a 2-D array |
161 | | - * @return array (ns => dbKey => 1) |
| 161 | + * @return Array (ns => dbKey => 1) |
162 | 162 | */ |
163 | 163 | protected function getCurrentVersionLinks() { |
164 | 164 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -178,7 +178,7 @@ |
179 | 179 | |
180 | 180 | /** |
181 | 181 | * Get an array of existing templates, as a 2-D array |
182 | | - * @return array (ns => dbKey => 1) |
| 182 | + * @return Array (ns => dbKey => 1) |
183 | 183 | */ |
184 | 184 | protected function getCurrentVersionTemplates() { |
185 | 185 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -199,7 +199,7 @@ |
200 | 200 | |
201 | 201 | /** |
202 | 202 | * Get an array of existing images, image names in the keys |
203 | | - * @return array (dbKey => 1) |
| 203 | + * @return Array (dbKey => 1) |
204 | 204 | */ |
205 | 205 | protected function getCurrentVersionImages() { |
206 | 206 | $dbr = wfGetDB( DB_SLAVE ); |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | |
219 | 219 | /** |
220 | 220 | * Get an array of existing categories, with the name in the key and sort key in the value. |
221 | | - * @return array (category => sortkey) |
| 221 | + * @return Array (category => sortkey) |
222 | 222 | */ |
223 | 223 | protected function getCurrentVersionCategories() { |
224 | 224 | $dbr = wfGetDB( DB_SLAVE ); |
Index: trunk/extensions/FlaggedRevs/specialpages/Stabilization_body.php |
— | — | @@ -1,12 +1,7 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | |
8 | 4 | // Assumes $wgFlaggedRevsProtection is off |
9 | | -class Stabilization extends UnlistedSpecialPage |
10 | | -{ |
| 5 | +class Stabilization extends UnlistedSpecialPage { |
11 | 6 | protected $form = null; |
12 | 7 | protected $skin; |
13 | 8 | |
Index: trunk/extensions/FlaggedRevs/specialpages/PendingChanges_body.php |
— | — | @@ -1,11 +1,6 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | |
8 | | -class PendingChanges extends SpecialPage |
9 | | -{ |
| 4 | +class PendingChanges extends SpecialPage { |
10 | 5 | protected $pager = null; |
11 | 6 | |
12 | 7 | public function __construct() { |
Index: trunk/extensions/FlaggedRevs/specialpages/UnreviewedPages_body.php |
— | — | @@ -1,11 +1,6 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | |
8 | | -class UnreviewedPages extends SpecialPage |
9 | | -{ |
| 4 | +class UnreviewedPages extends SpecialPage { |
10 | 5 | protected $pager = null; |
11 | 6 | |
12 | 7 | public function __construct() { |
Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php |
— | — | @@ -1,13 +1,6 @@ |
2 | 2 | <?php |
3 | | -# (c) Aaron Schulz, Joerg Baach, 2007 GPL |
4 | 3 | |
5 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
6 | | - echo "FlaggedRevs extension\n"; |
7 | | - exit( 1 ); |
8 | | -} |
9 | | - |
10 | | -class RevisionReview extends UnlistedSpecialPage |
11 | | -{ |
| 4 | +class RevisionReview extends UnlistedSpecialPage { |
12 | 5 | protected $form; |
13 | 6 | protected $page; |
14 | 7 | var $skin; // FIXME: with RevDel_RevisionList stuff |
Index: trunk/extensions/FlaggedRevs/specialpages/QualityOversight_body.php |
— | — | @@ -1,11 +1,6 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | |
8 | | -class QualityOversight extends SpecialPage |
9 | | -{ |
| 4 | +class QualityOversight extends SpecialPage { |
10 | 5 | public function __construct() { |
11 | 6 | parent::__construct( 'QualityOversight' ); |
12 | 7 | } |
Index: trunk/extensions/FlaggedRevs/specialpages/ReviewedVersions_body.php |
— | — | @@ -1,11 +1,6 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | |
8 | | -class ReviewedVersions extends UnlistedSpecialPage |
9 | | -{ |
| 4 | +class ReviewedVersions extends UnlistedSpecialPage { |
10 | 5 | public function __construct() { |
11 | 6 | parent::__construct( 'ReviewedVersions' ); |
12 | 7 | } |
Index: trunk/extensions/FlaggedRevs/specialpages/ConfiguredPages_body.php |
— | — | @@ -1,12 +1,7 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | |
8 | 4 | // Assumes $wgFlaggedRevsProtection is off |
9 | | -class ConfiguredPages extends SpecialPage |
10 | | -{ |
| 5 | +class ConfiguredPages extends SpecialPage { |
11 | 6 | protected $pager = null; |
12 | 7 | |
13 | 8 | public function __construct() { |
Index: trunk/extensions/FlaggedRevs/specialpages/ValidationStatistics_body.php |
— | — | @@ -1,11 +1,6 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | |
8 | | -class ValidationStatistics extends IncludableSpecialPage |
9 | | -{ |
| 4 | +class ValidationStatistics extends IncludableSpecialPage { |
10 | 5 | public function __construct() { |
11 | 6 | parent::__construct( 'ValidationStatistics' ); |
12 | 7 | } |
Index: trunk/extensions/FlaggedRevs/specialpages/ProblemChanges_body.php |
— | — | @@ -1,11 +1,6 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | |
8 | | -class ProblemChanges extends SpecialPage |
9 | | -{ |
| 4 | +class ProblemChanges extends SpecialPage { |
10 | 5 | protected $pager = null; |
11 | 6 | |
12 | 7 | public function __construct() { |
Index: trunk/extensions/FlaggedRevs/specialpages/ReviewedPages_body.php |
— | — | @@ -1,11 +1,6 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | |
8 | | -class ReviewedPages extends SpecialPage |
9 | | -{ |
| 4 | +class ReviewedPages extends SpecialPage { |
10 | 5 | protected $pager = null; |
11 | 6 | |
12 | 7 | public function __construct() { |
Index: trunk/extensions/FlaggedRevs/specialpages/StablePages_body.php |
— | — | @@ -1,12 +1,7 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | |
8 | 4 | // Assumes $wgFlaggedRevsProtection is on |
9 | | -class StablePages extends SpecialPage |
10 | | -{ |
| 5 | +class StablePages extends SpecialPage { |
11 | 6 | protected $pager = null; |
12 | 7 | |
13 | 8 | public function __construct() { |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1,8 +1,4 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | /** |
8 | 4 | * Class containing hooked functions for a FlaggedRevs environment |
9 | 5 | */ |
Index: trunk/extensions/FlaggedRevs/updater/FlaggedRevsUpdater.hooks.php |
— | — | @@ -1,8 +1,4 @@ |
2 | 2 | <?php |
3 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
4 | | - echo "FlaggedRevs extension\n"; |
5 | | - exit( 1 ); |
6 | | -} |
7 | 3 | /** |
8 | 4 | * Class containing updater functions for a FlaggedRevs environment |
9 | 5 | */ |
Index: trunk/extensions/FlaggedRevs/FRUserActivity.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | /* |
44 | 44 | * Get who is currently reviewing a page |
45 | 45 | * @param int $pageId |
46 | | - * @return array (username or null, MW timestamp or null) |
| 46 | + * @return Array (username or null, MW timestamp or null) |
47 | 47 | */ |
48 | 48 | public static function getUserReviewingPage( $pageId ) { |
49 | 49 | global $wgMemc; |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | * Get who is currently reviewing a diff |
101 | 101 | * @param int $oldId |
102 | 102 | * @param int $newId |
103 | | - * @return array (username or null, MW timestamp or null) |
| 103 | + * @return Array (username or null, MW timestamp or null) |
104 | 104 | */ |
105 | 105 | public static function getUserReviewingDiff( $oldId, $newId ) { |
106 | 106 | global $wgMemc; |
Index: trunk/extensions/FlaggedRevs/presentation/RevisionReviewFormGUI.php |
— | — | @@ -1,9 +1,4 @@ |
2 | 2 | <?php |
3 | | -# (c) Aaron Schulz 2011 GPL |
4 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
5 | | - echo "FlaggedRevs extension\n"; |
6 | | - exit( 1 ); |
7 | | -} |
8 | 3 | /** |
9 | 4 | * Main review form UI |
10 | 5 | * |
Index: trunk/extensions/FlaggedRevs/presentation/RejectConfirmationFormGUI.php |
— | — | @@ -1,9 +1,4 @@ |
2 | 2 | <?php |
3 | | -# (c) Aaron Schulz 2011 GPL |
4 | | -if ( !defined( 'MEDIAWIKI' ) ) { |
5 | | - echo "FlaggedRevs extension\n"; |
6 | | - exit( 1 ); |
7 | | -} |
8 | 3 | /** |
9 | 4 | * Reject confirmation review form UI |
10 | 5 | */ |
— | — | @@ -17,11 +12,7 @@ |
18 | 13 | } |
19 | 14 | |
20 | 15 | /** |
21 | | - * Output the "are you sure you want to reject this" form |
22 | | - * |
23 | | - * A bit hacky, but we don't have a way to pass more complicated |
24 | | - * UI things back up, since RevisionReview expects either true |
25 | | - * or a string message key |
| 16 | + * Get the "are you sure you want to reject these changes?" form |
26 | 17 | * @return Array (html string, error string or true) |
27 | 18 | */ |
28 | 19 | public function getHtml() { |