Displaying protection expiry date and time in action=info
authorayush_garg <ayush.ce13@iitp.ac.in>
Tue, 31 Mar 2015 09:00:01 +0000 (14:30 +0530)
committerayush_garg <ayush.ce13@iitp.ac.in>
Fri, 3 Apr 2015 19:56:02 +0000 (01:26 +0530)
Bug: T94129
Change-Id: I2df726e04c0555eb550036c31e538ec2594b517c

includes/actions/InfoAction.php

index b5a7391..4f6efd4 100644 (file)
@@ -434,6 +434,9 @@ class InfoAction extends FormlessAction {
                                        $message = $message->escaped();
                                }
                        }
+                       $expiry = $title->getRestrictionExpiry( $restrictionType );
+                       $formattedexpiry = $this->msg( 'parentheses', $this->getLanguage()->formatExpiry( $expiry ) )->escaped();
+                       $message .= $this->msg( 'word-separator' )->escaped() . $formattedexpiry;
 
                        // Messages: restriction-edit, restriction-move, restriction-create,
                        // restriction-upload