Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/54020


Change subject: Increase number of attempts to get suitable article
......................................................................

Increase number of attempts to get suitable article

Change-Id: Id035aade3884a66ff86c7502b0a9802d80436619
---
M CategoryRoulette.php
M SpecialGettingStarted.php
2 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted 
refs/changes/20/54020/1

diff --git a/CategoryRoulette.php b/CategoryRoulette.php
index b484440..c2e2cfc 100644
--- a/CategoryRoulette.php
+++ b/CategoryRoulette.php
@@ -12,7 +12,8 @@
  *
  */
 class CategoryRoulette {
-       const MAX_ATTEMPTS = 20;
+
+       const MAX_ATTEMPTS = 100;
 
        /** @var Category **/
        public $category = null;
diff --git a/SpecialGettingStarted.php b/SpecialGettingStarted.php
index f042f9e..c6e3458 100644
--- a/SpecialGettingStarted.php
+++ b/SpecialGettingStarted.php
@@ -65,7 +65,7 @@
                        // result set meet requirements, get as many as 
possible.
                        // FIXME(ori-l, 14-March-2013): should be a separate 
method.
                        $taskArticles = array();
-                       foreach( $roulette->getRandomArticles( 
self::ARTICLE_COUNT * 2 ) as $article ) {
+                       foreach( $roulette->getRandomArticles( 
self::ARTICLE_COUNT * 4 ) as $article ) {
                                $length = $article->getLength();
                                if ( $length > 0 && $length <= 
self::MAX_ARTICLE_LENGTH && $article->userCan( 'edit' ) ) {
                                        $taskArticles[] = $article;

-- 
To view, visit https://gerrit.wikimedia.org/r/54020
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id035aade3884a66ff86c7502b0a9802d80436619
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>

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

Reply via email to