r113991 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113990‎ | r113991 | r113992 >
Date:01:42, 16 March 2012
Author:reedy
Status:reverted
Tags:gerritmigration 
Comment:
So apparently Collection still had a PHP4 constructor

More documentation improvements at the same time
Modified paths:
  • /trunk/extensions/Collection/Collection.suggest.php (modified) (history)
  • /trunk/extensions/Collection/images/silk-add.png (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.suggest.php
@@ -135,8 +135,14 @@
136136 * ===============================================================================
137137 */
138138
 139+ /**
 140+ * @param $article
 141+ * @return mixed
 142+ */
139143 private static function unban( $article ) {
140 - if (!isset($_SESSION['wsCollectionSuggestBan'])) return;
 144+ if ( !isset( $_SESSION['wsCollectionSuggestBan'] ) ) {
 145+ return;
 146+ }
141147 $bans = $_SESSION['wsCollectionSuggestBan'];
142148 $newbans = array();
143149 foreach ( $bans as $ban ) {
@@ -258,28 +264,33 @@
259265 * constructor
260266 * ==================================================
261267 *
262 - * @param $coll the collection
263 - * @param $ban the list of the banned articles
264 - * @param $props the lilst of the proposals
 268+ * @param $coll array the collection
 269+ * @param $ban array the list of the banned articles
 270+ * @param $props array the lilst of the proposals
265271 */
266 - public function Proposals( $coll, $ban, $props ) {
 272+ public function __construct( $coll, $ban, $props ) {
267273 $this->mPropList = array();
268274 $this->mColl = $coll;
269275 $this->mBanList = $ban;
270276 $this->mLinkList = $props;
271277 }
272278
273 -
274279 /**
275280 * ==================================================
276281 * public methods
277282 * ==================================================
278283 */
279284
 285+ /**
 286+ * @return array
 287+ */
280288 public function getLinkList() {
281289 return $this->mLinkList;
282290 }
283291
 292+ /**
 293+ * @param $collection
 294+ */
284295 public function setCollection( $collection ) {
285296 $this->mColl = $collection;
286297 }
@@ -294,7 +305,7 @@
295306 * @param $doUpdate (type boolean) when true, $linkList will
296307 * updated before calculating the proposals
297308 * default is true
298 - * @return a 2-dimensional array that contains the proposals
 309+ * @return array a 2-dimensional array that contains the proposals
299310 * the first dimesion is numeric, the second contains
300311 * 3 entries:
301312 * - 'name': the name of a proposed article
@@ -396,7 +407,8 @@
397408 /**
398409 * Extract & count links from wikitext
399410 *
400 - * @param wikitext string article text
 411+ * @param $num_articles int
 412+ * @param $wikitext string article text
401413 * @return array with links and their weights
402414 */
403415 private function getWeightedLinks( $num_articles, $wikitext ) {
Index: trunk/extensions/Collection/images/silk-add.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png

Follow-up revisions

RevisionCommit summaryAuthorDate
r114399Revert r113740 and its followups r113785, r113985, r113986, r113988, r113991,...catrope19:56, 21 March 2012

Status & tagging log