Page MenuHomePhabricator

maintenance script protect.php ignores parameters --user and --reason
Closed, ResolvedPublic

Description

usernames passed to maintenance/protect.php via --user or -u are ignored and replaced by default "maintenance script". same for --reason and -r (which is always left empty)

fix:
in public function execute() change
44 $userName = $this->getOption( 'u', 'Maintenance script' );
45 $reason = $this->getOption( 'r', '' );

to
44 $userName = $this->getOption( 'user', 'Maintenance script' );
45 $reason = $this->getOption( 'reason', '' );

Event Timeline

Oetterer raised the priority of this task from to Low.
Oetterer updated the task description. (Show Details)
Oetterer subscribed.
Filip subscribed.

Hi, can i claim it for Google Code-In?

@FilipGCI It is preferred if you wait until you can claim the corresponding GCI task before claiming the task here.

@FilipGCI, what @Unicornisaurous is trying to say is that you should first claim a task in GCI website first before claiming it here on phabricator. Hope its clearer now. Thanks and try to do this for all tasks you will work on during the contest.

Ok, next time i'll claim it first on GCI page, sorry for all troubles.

In T89713#2830640, @FilipGCI wrote:

Ok, next time i'll claim it first on GCI page, sorry for all troubles.

It's ok @FilipGCI, claim the task and get to work at once. 😃

In T89713#2830681, @D3r1ck01 wrote:
In T89713#2830640, @FilipGCI wrote:

Ok, next time i'll claim it first on GCI page, sorry for all troubles.

It's ok @FilipGCI, claim the task and get to work at once. 😃

You have not still claimed the task on the GCI website. Please do claim the task before you proceed.

In T89713#2830693, @D3r1ck01 wrote:
In T89713#2830681, @D3r1ck01 wrote:
In T89713#2830640, @FilipGCI wrote:

Ok, next time i'll claim it first on GCI page, sorry for all troubles.

It's ok @FilipGCI, claim the task and get to work at once. 😃

You have not still claimed the task on the GCI website. Please do claim the task before you proceed.

But i still don't have review for my previous task

@FilipGCI, you will have to wait for a while until its reviewed so that you can claim your next task which is this one. Don't stack them up, the mentors have until 36hours to review your work.

Change 324179 had a related patch set uploaded (by Filip):
Google Code-In task.

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

Change 324179 merged by jenkins-bot:
Make protect.php maintenance script not ignore --user and --reason parameters

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