https://bugzilla.wikimedia.org/show_bug.cgi?id=23843

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|[email protected]. |[email protected]
                   |org                         |

--- Comment #1 from [email protected] 2010-06-16 19:10:12 UTC ---
Created an attachment (id=7477)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=7477)
Patch to fix this bug

Introduces two new arguments, $excludeBlank and $attempts. If $excludeBlank is
true, it will make $attempts number of attempts to find a non-blank page before
giving up and telling the user that a non-blank page was not found.

The code I used to test it is:

class RandomExcludeBlank extends SpecialPage {
    function __construct( $name = 'RandomExcludeBlank' ){
        parent::__construct( $name );
        $this->setGroup('RandomExcludeBlank'
            ,'redirects');
    }

    public function execute( $par ) {
        global $wgPureWikiDeletionRandomPageAttempts;
        $randomPageObj = new RandomPage;
        $randomPageObj->execute ( $par, true,
$wgPureWikiDeletionRandomPageAttempts );
        return true;
    }
}

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to