Index: trunk/extensions/Collection/Collection.suggest.php |
— | — | @@ -135,8 +135,14 @@ |
136 | 136 | * =============================================================================== |
137 | 137 | */ |
138 | 138 | |
| 139 | + /** |
| 140 | + * @param $article |
| 141 | + * @return mixed |
| 142 | + */ |
139 | 143 | private static function unban( $article ) { |
140 | | - if (!isset($_SESSION['wsCollectionSuggestBan'])) return; |
| 144 | + if ( !isset( $_SESSION['wsCollectionSuggestBan'] ) ) { |
| 145 | + return; |
| 146 | + } |
141 | 147 | $bans = $_SESSION['wsCollectionSuggestBan']; |
142 | 148 | $newbans = array(); |
143 | 149 | foreach ( $bans as $ban ) { |
— | — | @@ -258,28 +264,33 @@ |
259 | 265 | * constructor |
260 | 266 | * ================================================== |
261 | 267 | * |
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 |
265 | 271 | */ |
266 | | - public function Proposals( $coll, $ban, $props ) { |
| 272 | + public function __construct( $coll, $ban, $props ) { |
267 | 273 | $this->mPropList = array(); |
268 | 274 | $this->mColl = $coll; |
269 | 275 | $this->mBanList = $ban; |
270 | 276 | $this->mLinkList = $props; |
271 | 277 | } |
272 | 278 | |
273 | | - |
274 | 279 | /** |
275 | 280 | * ================================================== |
276 | 281 | * public methods |
277 | 282 | * ================================================== |
278 | 283 | */ |
279 | 284 | |
| 285 | + /** |
| 286 | + * @return array |
| 287 | + */ |
280 | 288 | public function getLinkList() { |
281 | 289 | return $this->mLinkList; |
282 | 290 | } |
283 | 291 | |
| 292 | + /** |
| 293 | + * @param $collection |
| 294 | + */ |
284 | 295 | public function setCollection( $collection ) { |
285 | 296 | $this->mColl = $collection; |
286 | 297 | } |
— | — | @@ -294,7 +305,7 @@ |
295 | 306 | * @param $doUpdate (type boolean) when true, $linkList will |
296 | 307 | * updated before calculating the proposals |
297 | 308 | * default is true |
298 | | - * @return a 2-dimensional array that contains the proposals |
| 309 | + * @return array a 2-dimensional array that contains the proposals |
299 | 310 | * the first dimesion is numeric, the second contains |
300 | 311 | * 3 entries: |
301 | 312 | * - 'name': the name of a proposed article |
— | — | @@ -396,7 +407,8 @@ |
397 | 408 | /** |
398 | 409 | * Extract & count links from wikitext |
399 | 410 | * |
400 | | - * @param wikitext string article text |
| 411 | + * @param $num_articles int |
| 412 | + * @param $wikitext string article text |
401 | 413 | * @return array with links and their weights |
402 | 414 | */ |
403 | 415 | 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 |