I attempted a fix on an extension, but my fix did not seem to work. Any suggestions?
Details:
I attempted a fix on an extension, but my fix did not seem to work. Any suggestions?
Details:
It’s probably easier to get feedback if you upload your attempted fix as a gerrit patch.
thx.
Attempting to register on gerrit, i’m getting
verify from a labs instance whether the shell username is taken, by issuing the command groups $username on a shell.
What’s a labs instance?
Ugh, that instruction is terrible. Just ignore it, if the shell name is reserved, you get an error about that anyway.
heh, i figured as much. so i have to install gerrit server on my local Windows computer, install the test code, then run shell commands to upload the code, etc etc. Hoping to solve the issue without all that time/effort/complexity. Hoping to solve this just by examining the code.
Now making progress with someone over on #wikimedia-tech IRC.
Issue seems related to $wgRejectedAccountMaxAge flag. Not mentioned in the extension page, but various switches (including that one) are listed in /extensions/ConfirmAccount/ConfirmAccount.config.php
It says:
######## Configuration variables
IMPORTANT: DO NOT EDIT THIS FILE
When configuring globals, set them at LocalSettings.php instead
When i set wgRejectedAccountMaxAge = 0 (in LocalSettings.php), and then do a request, then remnant rejects go away except the current one. Now working on exactly where the prune should happen-- after the reject action, or before the request action
looks like i solved it. There are 2 steps:
Details:
in LocalSettings.php, after required declaration, set Rejected-Age to 0. That ensures rejected requests will be removed on prune-action:
require_once "$IP/extensions/ConfirmAccount/ConfirmAccount.php";
$wgRejectedAccountMaxAge = 0;
Add Prune code to the function that shows the Request form:
in /ConfirmAccount/frontend/specialpages/actions/RequestAccount_body.php
function showForm. Add very last command in the function:
old code:
$out->addWikiMsg( 'requestaccount-footer' );
}
new code:
$out->addWikiMsg( 'requestaccount-footer' );
# PRUNE
ConfirmAccount::runAutoMaintenance();
}