Minor refactoring
authorSam Reed <reedy@users.mediawiki.org>
Mon, 6 Jun 2011 15:01:27 +0000 (15:01 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 6 Jun 2011 15:01:27 +0000 (15:01 +0000)
Comment updates

includes/ChangeTags.php
includes/api/ApiFeedWatchlist.php
includes/api/ApiQueryImages.php
includes/specials/SpecialWatchlist.php
includes/specials/SpecialWhatlinkshere.php

index 942440c..76662da 100644 (file)
@@ -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;
index 83cea0c..adae8b2 100644 (file)
@@ -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 );
 
index c63f897..8516efb 100644 (file)
@@ -50,7 +50,6 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
 
        /**
         * @param $resultPageSet ApiPageSet
-        * @return
         */
        private function run( $resultPageSet = null ) {
                if ( $this->getPageSet()->getGoodTitleCount() == 0 ) {
index 0d471b3..7389b0b 100644 (file)
@@ -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 );
index 631315e..190e95d 100644 (file)
@@ -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;