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', '' );

Details

Event Timeline

Oetterer created this task.Feb 17 2015, 1:23 PM
Oetterer raised the priority of this task from to Low.
Oetterer updated the task description. (Show Details)
Oetterer added a subscriber: Oetterer.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 17 2015, 1:23 PM
Filip claimed this task.Nov 29 2016, 1:22 PM
Filip added a subscriber: Filip.

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.

Filip added a comment.Nov 29 2016, 1:50 PM

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#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.

Filip added a comment.Nov 29 2016, 2:06 PM
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

D3r1ck01 closed this task as Resolved.Nov 29 2016, 11:56 PM

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

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