From 2dbd3853593b873b4a432161f4d22fec33f3da27 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 6 Jun 2011 15:01:27 +0000 Subject: [PATCH] Minor refactoring Comment updates --- includes/ChangeTags.php | 6 +++++- includes/api/ApiFeedWatchlist.php | 6 ++++-- includes/api/ApiQueryImages.php | 1 - includes/specials/SpecialWatchlist.php | 2 +- includes/specials/SpecialWhatlinkshere.php | 8 ++++---- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 942440c27b..76662dab52 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -179,7 +179,11 @@ class ChangeTags { return $html; } - /** Basically lists defined tags which count even if they aren't applied to anything */ + /** + *Basically lists defined tags which count even if they aren't applied to anything + * + * @return array + */ static function listDefinedTags() { // Caching... global $wgMemc; diff --git a/includes/api/ApiFeedWatchlist.php b/includes/api/ApiFeedWatchlist.php index 83cea0cb38..adae8b2e50 100644 --- a/includes/api/ApiFeedWatchlist.php +++ b/includes/api/ApiFeedWatchlist.php @@ -117,10 +117,12 @@ class ApiFeedWatchlist extends ApiBase { $feedItems[] = $this->createFeedItem( $info ); } - $feedTitle = $wgSitename . ' - ' . wfMsgForContent( 'watchlist' ) . ' [' . $wgLanguageCode . ']'; + $msg = wfMsgForContent( 'watchlist' ); + + $feedTitle = $wgSitename . ' - ' . $msg . ' [' . $wgLanguageCode . ']'; $feedUrl = SpecialPage::getTitleFor( 'Watchlist' )->getFullURL(); - $feed = new $wgFeedClasses[$params['feedformat']] ( $feedTitle, htmlspecialchars( wfMsgForContent( 'watchlist' ) ), $feedUrl ); + $feed = new $wgFeedClasses[$params['feedformat']] ( $feedTitle, htmlspecialchars( $msg ), $feedUrl ); ApiFormatFeedWrapper::setResult( $this->getResult(), $feed, $feedItems ); diff --git a/includes/api/ApiQueryImages.php b/includes/api/ApiQueryImages.php index c63f897525..8516efb64b 100644 --- a/includes/api/ApiQueryImages.php +++ b/includes/api/ApiQueryImages.php @@ -50,7 +50,6 @@ class ApiQueryImages extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet - * @return */ private function run( $resultPageSet = null ) { if ( $this->getPageSet()->getGoodTitleCount() == 0 ) { diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 0d471b336e..7389b0b73c 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -49,7 +49,7 @@ class SpecialWatchlist extends SpecialPage { global $wgFeedClasses; $apiParams = array( 'action' => 'feedwatchlist', 'allrev' => 'allrev', 'wlowner' => $wgUser->getName(), 'wltoken' => $wlToken ); - $feedTemplate = wfScript('api') . '?'; + $feedTemplate = wfScript( 'api' ) . '?'; foreach( $wgFeedClasses as $format => $class ) { $theseParams = $apiParams + array( 'feedformat' => $format ); diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 631315ea5b..190e95d6da 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -93,11 +93,11 @@ class SpecialWhatLinksHere extends SpecialPage { } /** - * @param $level int Recursion level + * @param $level int Recursion level * @param $target Title Target title - * @param $limit int Number of entries to display - * @param $from Title Display from this article ID - * @param $back Title Display from this article ID at backwards scrolling + * @param $limit int Number of entries to display + * @param $from Title Display from this article ID + * @param $back Title Display from this article ID at backwards scrolling */ function showIndirectLinks( $level, $target, $limit, $from = 0, $back = 0 ) { global $wgMaxRedirectLinksRetrieved; -- 2.20.1