Magic word returning protection expiry
OpenPublic

Description

Kind of follow-up to bug:9947, 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.


Version: unspecified
Severity: enhancement

bzimport added a subscriber: Unknown Object (MLST).
bzimport set Reference to bz17354.
Cenarium created this task.Via LegacyFeb 4 2009, 7:00 PM
bzimport added a comment.Via ConduitMar 10 2010, 10:42 AM

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

bzimport added a comment.Via ConduitApr 5 2010, 7:51 PM

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

bzimport added a comment.Via ConduitMay 25 2012, 2:45 AM

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

Add Comment