https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113991

Revision: 113991
Author:   reedy
Date:     2012-03-16 01:42:41 +0000 (Fri, 16 Mar 2012)
Log Message:
-----------
So apparently Collection still had a PHP4 constructor

More documentation improvements at the same time

Modified Paths:
--------------
    trunk/extensions/Collection/Collection.suggest.php
    trunk/extensions/Collection/images/silk-add.png

Modified: trunk/extensions/Collection/Collection.suggest.php
===================================================================
--- trunk/extensions/Collection/Collection.suggest.php  2012-03-16 01:41:46 UTC 
(rev 113990)
+++ trunk/extensions/Collection/Collection.suggest.php  2012-03-16 01:42:41 UTC 
(rev 113991)
@@ -135,8 +135,14 @@
         * 
===============================================================================
         */
 
+       /**
+        * @param $article
+        * @return mixed
+        */
        private static function unban( $article ) {
-               if (!isset($_SESSION['wsCollectionSuggestBan'])) return;
+               if ( !isset( $_SESSION['wsCollectionSuggestBan'] ) ) {
+                       return;
+               }
                $bans = $_SESSION['wsCollectionSuggestBan'];
                $newbans = array();
                foreach ( $bans as $ban ) {
@@ -258,28 +264,33 @@
         * constructor
         * ==================================================
         *
-        * @param $coll the collection
-        * @param $ban the list of the banned articles
-        * @param $props the lilst of the proposals
+        * @param $coll array the collection
+        * @param $ban array the list of the banned articles
+        * @param $props array the lilst of the proposals
         */
-       public function Proposals( $coll, $ban, $props ) {
+       public function __construct( $coll, $ban, $props ) {
                $this->mPropList = array();
                $this->mColl = $coll;
                $this->mBanList = $ban;
                $this->mLinkList = $props;
        }
 
-
        /**
         * ==================================================
         * public methods
         * ==================================================
         */
 
+       /**
+        * @return array
+        */
        public function getLinkList() {
                return $this->mLinkList;
        }
 
+       /**
+        * @param $collection
+        */
        public function setCollection( $collection ) {
                $this->mColl = $collection;
        }
@@ -294,7 +305,7 @@
         * @param $doUpdate (type boolean) when true, $linkList will
         *        updated before calculating the proposals
         *        default is true
-        * @return a 2-dimensional array that contains the proposals
+        * @return array a 2-dimensional array that contains the proposals
         *         the first dimesion is numeric, the second contains
         *         3 entries:
         *         - 'name': the name of a proposed article
@@ -396,7 +407,8 @@
        /**
         * Extract & count links from wikitext
         *
-        * @param wikitext string article text
+        * @param $num_articles int
+        * @param $wikitext string article text
         * @return array with links and their weights
         */
        private function getWeightedLinks( $num_articles, $wikitext ) {

Modified: trunk/extensions/Collection/images/silk-add.png
===================================================================
(Binary files differ)


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to