Magic word returning protection expiry
OpenPublic

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.

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

Cenarium added a comment.Via WebNov 27 2015, 6:45 PM

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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptVia HeraldNov 27 2015, 6:45 PM
gerritbot added a subscriber: gerritbot.Via ConduitNov 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

gerritbot added a project: Patch-For-Review.Via ConduitNov 27 2015, 6:45 PM
gerritbot added a comment.Via ConduitDec 7 2015, 10:32 AM

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

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

matej_suchanek edited the task description. (Show Details)Via WebDec 9 2015, 7:18 PM
matej_suchanek removed a project: Patch-For-Review.
matej_suchanek set Security to None.
matej_suchanek added a subscriber: matej_suchanek.Via WebMon, Jan 18, 9:47 PM

@Cenarium Done? Is this worth user-notice'ing?

Add Comment