X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryWatchlistRaw.php;h=f45d0e48273be15b5663b4ac6f6f141b7fa597dc;hb=208a625c54e92cb36cdc3acc8f859eeca5d36c7f;hp=ea4e724a0bfae2354c6e0c7c6d2ccb4cb3c3f080;hpb=c8cffcbd2813030b5524cfcdc20157773b843e37;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryWatchlistRaw.php b/includes/api/ApiQueryWatchlistRaw.php index ea4e724a0b..f45d0e4827 100644 --- a/includes/api/ApiQueryWatchlistRaw.php +++ b/includes/api/ApiQueryWatchlistRaw.php @@ -91,7 +91,7 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { $this->addOption( 'ORDER BY', array( 'wl_namespace' . $sort, 'wl_title' . $sort - )); + ) ); } $this->addOption( 'LIMIT', $params['limit'] + 1 ); $res = $this->select( __METHOD__ ); @@ -100,7 +100,8 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { $count = 0; foreach ( $res as $row ) { if ( ++$count > $params['limit'] ) { - // We've reached the one extra which shows that there are additional pages to be had. Stop here... + // We've reached the one extra which shows that there are + // additional pages to be had. Stop here... $this->setContinueEnumParameter( 'continue', $row->wl_namespace . '|' . $row->wl_title ); break; } @@ -109,8 +110,7 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { if ( is_null( $resultPageSet ) ) { $vals = array(); ApiQueryBase::addTitleInfo( $vals, $t ); - if ( isset( $prop['changed'] ) && !is_null( $row->wl_notificationtimestamp ) ) - { + if ( isset( $prop['changed'] ) && !is_null( $row->wl_notificationtimestamp ) ) { $vals['changed'] = wfTimestamp( TS_ISO_8601, $row->wl_notificationtimestamp ); } $fit = $this->getResult()->addValue( $this->getModuleName(), null, $vals ); @@ -183,7 +183,8 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { ), 'show' => 'Only list items that meet these criteria', 'owner' => 'The name of the user whose watchlist you\'d like to access', - 'token' => 'Give a security token (settable in preferences) to allow access to another user\'s watchlist', + 'token' => 'Give a security token (settable in preferences) to allow ' . + 'access to another user\'s watchlist', 'dir' => 'Direction to sort the titles and namespaces in', ); } @@ -204,7 +205,7 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { } public function getDescription() { - return "Get all pages on the logged in user's watchlist"; + return "Get all pages on the logged in user's watchlist."; } public function getPossibleErrors() { @@ -212,7 +213,11 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { array( 'code' => 'notloggedin', 'info' => 'You must be logged-in to have a watchlist' ), array( 'show' ), array( 'code' => 'bad_wlowner', 'info' => 'Specified user does not exist' ), - array( 'code' => 'bad_wltoken', 'info' => 'Incorrect watchlist token provided -- please set a correct token in Special:Preferences' ), + array( + 'code' => 'bad_wltoken', + 'info' => 'Incorrect watchlist token provided -- ' . + 'please set a correct token in Special:Preferences' + ), ) ); }