Magic word returning protection expiry
Open, LowPublic

Description

Kind of follow-up to T11947, it would be very practical to have variables returning the expiration date for a protection, e.g. {{PROTECTIONEXPIRY:edit}}, and returning indefinite if the protection is indefinite.

Expiries are often forgotten in protection templates, or wrongly applied. This would make the precision of expiry automated.

Details

Reference
bz17354
bzimport set Reference to bz17354.
bzimport added a subscriber: Unknown Object (MLST).
Cenarium created this task.Feb 4 2009, 7:00 PM

lunasantin wrote:

(patched against r63544)

Submitting a patch that adds {{#protexpiry:<action>}} to Extension:ParserFunctions

Outputs a timestamp if the page is protected ("infinity" if protection is indef), or an empty string if the page is not currently protected.

As a side note, this is my first patch submission. Be gentle?

attachment 17354.diff ignored as obsolete

lunasantin wrote:

patched against r64623

Submitting a revised patch, per feedback from #mediawiki

Change is now made in CoreParserFunctions.php, so that protectionexpiry will be next to and in the same style as the pre-existing protectionlevel function.

Attached: protectionexpiry.patch

sumanah wrote:

Luna, I apologize for the wait! Thanks for the patch. Are you interested in updating it and in using developer access to directly suggest it into our Git source control system?

https://www.mediawiki.org/wiki/Developer_access

https://www.mediawiki.org/wiki/Git/Workflow#How_to_submit_a_patch

I'll submit a patch based on lunasantin's.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 27 2015, 6:45 PM

Change 255717 had a related patch set uploaded (by Cenarium):
Add magic word for protection expiry

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

Change 255717 merged by jenkins-bot:
Add magic word for protection expiry

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

matej_suchanek removed a project: Patch-For-Review.
matej_suchanek set Security to None.
Meno25 removed a subscriber: Meno25.Feb 22 2016, 6:00 PM

Add Comment