And some more function level documentation
authorSam Reed <reedy@users.mediawiki.org>
Sat, 19 Feb 2011 22:18:39 +0000 (22:18 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 19 Feb 2011 22:18:39 +0000 (22:18 +0000)
includes/specials/SpecialContributions.php
includes/specials/SpecialIpblocklist.php
includes/specials/SpecialListfiles.php
includes/specials/SpecialMostlinkedcategories.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialSearch.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUpload.php
includes/specials/SpecialUserlogin.php

index cfe2e01..961f163 100644 (file)
@@ -480,10 +480,18 @@ class SpecialContributions extends SpecialPage {
                }
        }
 
+       /**
+        * @param $revision Revision
+        * @return string
+        */
        protected function feedItemAuthor( $revision ) {
                return $revision->getUserText();
        }
 
+       /**
+        * @param $revision Revision
+        * @return string
+        */
        protected function feedItemDesc( $revision ) {
                if( $revision ) {
                        return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .
index 5ecad51..67e7995 100644 (file)
@@ -425,6 +425,8 @@ class IPUnblockForm extends SpecialPage {
 
        /**
         * Callback function to output a block
+        *
+        * @param $block  Block
         */
        function formatRow( $block ) {
                global $wgUser, $wgLang, $wgBlockAllowsUTEdit;
index 592d793..5f1a910 100644 (file)
@@ -70,6 +70,9 @@ class ImageListPager extends TablePager {
                parent::__construct();
        }
 
+       /**
+        * @return Array
+        */
        function getFieldNames() {
                if ( !$this->mFieldNames ) {
                        global $wgMiserMode;
index f491a70..b4527f8 100644 (file)
@@ -52,6 +52,8 @@ class MostlinkedCategoriesPage extends QueryPage {
 
        /**
         * Fetch user page links and cache their existence
+        *
+        * @param $db DatabaseBase
         */
        function preprocessResults( $db, $res ) {
                $batch = new LinkBatch;
@@ -67,6 +69,11 @@ class MostlinkedCategoriesPage extends QueryPage {
                }
        }
 
+       /**
+        * @param $skin Skin
+        * @param  $result
+        * @return string
+        */
        function formatResult( $skin, $result ) {
                global $wgLang, $wgContLang;
 
index dbed975..5c04d21 100644 (file)
  * @ingroup SpecialPage
  */
 class MovePageForm extends UnlistedSpecialPage {
+
+       /**
+        * @var Title
+        */
        var $oldTitle, $newTitle; # Objects
        var $reason; # Text input
        var $moveTalk, $deleteAndMove, $moveSubpages, $fixRedirects, $leaveRedirect, $moveOverShared; # Checks
index 5d638ab..02f21a7 100644 (file)
@@ -518,7 +518,6 @@ class SpecialSearch extends SpecialPage {
 
                $section = '';
 
-
                if( !is_null($sectionTitle) ) {
                        if( $sectionText == '' )
                                $sectionText = null;
index f582475..f3634db 100644 (file)
  * @ingroup SpecialPage
  */
 class PageArchive {
+
+       /**
+        * @var Title
+        */
        protected $title;
        var $fileStatus;
 
@@ -555,6 +559,9 @@ class PageArchive {
                return $restored;
        }
 
+       /**
+        * @return Status
+        */
        function getFileStatus() { return $this->fileStatus; }
 }
 
@@ -920,6 +927,11 @@ class SpecialUndelete extends SpecialPage {
                );
        }
 
+       /**
+        * @param $rev Revision
+        * @param  $prefix
+        * @return string
+        */
        private function diffHeader( $rev, $prefix ) {
                global $wgUser, $wgLang;
                $sk = $wgUser->getSkin();
@@ -1301,6 +1313,9 @@ class SpecialUndelete extends SpecialPage {
 
        /**
         * Fetch revision text link if it's available to all users
+        *
+        * @param $rev Revision
+        * @param $sk Skin
         * @return string
         */
        function getPageLink( $rev, $titleObj, $ts, $sk ) {
@@ -1329,6 +1344,8 @@ class SpecialUndelete extends SpecialPage {
        /**
         * Fetch image view link if it's available to all users
         *
+        * @param $file File
+        * @param $sk Skin
         * @return String: HTML fragment
         */
        function getFileLink( $file, $titleObj, $ts, $key, $sk ) {
@@ -1356,6 +1373,8 @@ class SpecialUndelete extends SpecialPage {
        /**
         * Fetch file's user id if it's available to this user
         *
+        * @param $file File
+        * @param $sk Skin
         * @return String: HTML fragment
         */
        function getFileUser( $file, $sk ) {
@@ -1373,6 +1392,8 @@ class SpecialUndelete extends SpecialPage {
        /**
         * Fetch file upload comment if it's available to this user
         *
+        * @param $file File
+        * @param $sk Skin
         * @return String: HTML fragment
         */
        function getFileComment( $file, $sk ) {
index 8fb0899..b25b896 100644 (file)
@@ -46,6 +46,10 @@ class SpecialUpload extends SpecialPage {
        public $mRequest;                       // The WebRequest or FauxRequest this form is supposed to handle
        public $mSourceType;
        public $mUpload;
+
+       /**
+        * @var LocalFile
+        */
        public $mLocalFile;
        public $mUploadClicked;
 
index 0812bf7..d13c49a 100644 (file)
@@ -588,6 +588,9 @@ class LoginForm extends SpecialPage {
        /**
         * Attempt to automatically create a user on login. Only succeeds if there
         * is an external authentication method which allows it.
+        *
+        * @param $user User
+        *
         * @return integer Status code
         */
        function attemptAutoCreate( $user ) {
@@ -1070,14 +1073,18 @@ class LoginForm extends SpecialPage {
 
        /**
         * @private
+        *
+        * @param $user User
+        *
+        * @return Boolean
         */
        function showCreateOrLoginLink( &$user ) {
                if( $this->mType == 'signup' ) {
-                       return( true );
+                       return true;
                } elseif( $user->isAllowed( 'createaccount' ) ) {
-                       return( true );
+                       return true;
                } else {
-                       return( false );
+                       return false;
                }
        }