Last modified: 2014-09-24 00:01:10 UTC
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.
Created attachment 7187 [details] (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?
Created attachment 7266 [details] 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.
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