Page MenuHomePhabricator

Retrieve action get parameter from within an extension
Open, LowPublic

Description

Is it possible to retrieve the action parameter i.e. if action = purge from within an extension.
In my tests I realized that action=purge seems to trigger a reload before the extension code is executed. So the extension can not see the original value of the action parameter.

Event Timeline

Physikerwelt raised the priority of this task from to Needs Triage.
Physikerwelt updated the task description. (Show Details)
Physikerwelt changed Security from none to None.
Physikerwelt added subscribers: Unknown Object (MLST), Reedy, TheDJ and 6 others.
MZMcBride renamed this task from Retreive action get parameter from within an extension to Retrieve action get parameter from within an extension.Dec 9 2014, 3:32 AM
MZMcBride updated the task description. (Show Details)
MZMcBride subscribed.

Why does the extension need access to the action get parameter?

If you only need to know if action was 'purge', this hook should tell you that.

https://m.mediawiki.org/wiki/Manual:Hooks/ArticlePurge

I tried to use this hook a while ago
https://gerrit.wikimedia.org/r/#/c/197242/1
now it might work, since we changed the design and collect all tags in a static variable.
Maybe the purge information can be saved in a static variable as well.