Page MenuHomePhabricator

Additional mode for specifying page name using formlink with one-step process
Closed, ResolvedPublic

Description

Author: mediawiki

Description:
Small patch to enable additional formlink mode

Yaron,
On a project I'm working on, the page name of a page created with a form is set to a concatenation of the Current User and the Current date stamp.

I couldn't figure out a way to do this with formlink, so I created this small patch.

Basically, if the formlink query string begins with a slash (/), the query string is treated as the page name.

This allowed me to do something like:

{{#formlink:DK_Report_Compilation|Create DK Report Compilation|button|/{{CURRENTUSER}}-{{#time: Y m d H:i:s}}}}

This resulted in Special:AddData being invoked in the mode Special:AddData/FORM_NAME/TARGET_NAME and gave me the flexibility to use magic words in specifying the target page name.

Unless there is a better way to do what I'm trying to do using the existing code, hope you find this useful.

Thanks,
Joel


Version: unspecified
Severity: enhancement

Attached:

Details

Reference
bz21404

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:49 PM
bzimport set Reference to bz21404.

Setting to "FIXED" - this is now possible, in a different way, now that the "page name=" is parsed by MW in version 1.9. It means that you can use variables like {{CURRENTUSER}} directly within the "page name" value.