jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Mattflaschen: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: Id035aade3884a66ff86c7502b0a9802d80436619
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
Gerrit-Reviewer: Mattflaschen <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Swalling <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits