r62686 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62685‎ | r62686 | r62687 >
Date:01:25, 19 February 2010
Author:reedy
Status:ok
Tags:
Comment:
Stylize on Api

Manual layout improvements in ApiFeedWatchlist
Modified paths:
  • /trunk/phase3/includes/api/ApiDelete.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFeedWatchlist.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUserrights.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiUserrights.php
@@ -39,7 +39,7 @@
4040 public function execute() {
4141 $params = $this->extractRequestParams();
4242
43 - //User already validated in call to getTokenSalt from Main
 43+ // User already validated in call to getTokenSalt from Main
4444 $form = new UserrightsPage;
4545 $user = $form->fetchUser( $params['user'] );
4646
Index: trunk/phase3/includes/api/ApiDelete.php
@@ -79,7 +79,7 @@
8080
8181 if ( count( $retval ) )
8282 $this->dieUsageMsg( reset( $retval ) ); // We don't care about multiple errors, just report one of them
83 -
 83+
8484 if ( $params['watch'] || $wgUser->getOption( 'watchdeletion' ) )
8585 $articleObj->doWatch();
8686 else if ( $params['unwatch'] )
Index: trunk/phase3/includes/api/ApiMain.php
@@ -414,7 +414,7 @@
415415
416416 $moduleParams = $module->extractRequestParams();
417417
418 - //Die if token required, but not provided (unless there is a gettoken parameter)
 418+ // Die if token required, but not provided (unless there is a gettoken parameter)
419419 $salt = $module->getTokenSalt();
420420 if ( $salt !== false )
421421 {
Index: trunk/phase3/includes/api/ApiFeedWatchlist.php
@@ -75,13 +75,17 @@
7676 'wllimit' => ( 50 > $wgFeedLimit ) ? $wgFeedLimit : 50
7777 );
7878
79 - if ( !is_null( $params['wlowner'] ) )
 79+ if ( !is_null( $params['wlowner'] ) ) {
8080 $fauxReqArr['wlowner'] = $params['wlowner'];
81 - if ( !is_null( $params['wltoken'] ) )
 81+ }
 82+ if ( !is_null( $params['wltoken'] ) ) {
8283 $fauxReqArr['wltoken'] = $params['wltoken'];
 84+ }
8385
8486 // Check for 'allrev' parameter, and if found, show all revisions to each page on wl.
85 - if ( ! is_null ( $params['allrev'] ) ) $fauxReqArr['wlallrev'] = '';
 87+ if ( !is_null ( $params['allrev'] ) ) {
 88+ $fauxReqArr['wlallrev'] = '';
 89+ }
8690
8791 // Create the request
8892 $fauxReq = new FauxRequest ( $fauxReqArr );
@@ -93,7 +97,7 @@
9498 // Get data array
9599 $data = $module->getResultData();
96100
97 - $feedItems = array ();
 101+ $feedItems = array();
98102 foreach ( (array)$data['query']['watchlist'] as $info ) {
99103 $feedItems[] = $this->createFeedItem( $info );
100104 }

Status & tagging log