(bug 29011) Remove hard coded text from Special:LockDb.
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Mon, 16 May 2011 23:21:32 +0000 (23:21 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Mon, 16 May 2011 23:21:32 +0000 (23:21 +0000)
Who locked the database and when will be displayed in the content language, as reason, locker and timestamp are saved in $wgReadOnlyFile.

includes/specials/SpecialLockdb.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index f8ab57b..609b9c5 100644 (file)
@@ -122,8 +122,13 @@ class SpecialLockdb extends SpecialPage {
                        return;
                }
                fwrite( $fp, $this->reason );
-               fwrite( $fp, "\n<p>(by " . $wgUser->getName() . " at " .
-                 $wgContLang->timeanddate( wfTimestampNow() ) . ")</p>\n" );
+               fwrite( $fp, "\n<p>" . wfMsgExt(
+                       'lockedbyandtime',
+                       'content',
+                       $wgUser->getName(),
+                       $wgContLang->date( wfTimestampNow() ),
+                       $wgContLang->time( wfTimestampNow() )
+               ) . "</p>\n" );
                fclose( $fp );
 
                $wgOut->redirect( $this->getTitle()->getFullURL( 'action=success' ) );
index 0bc0fba..5053ae3 100644 (file)
@@ -3167,6 +3167,7 @@ Remember to [[Special:UnlockDB|remove the lock]] after your maintenance is compl
 'lockfilenotwritable' => 'The database lock file is not writable.
 To lock or unlock the database, this needs to be writable by the web server.',
 'databasenotlocked'   => 'The database is not locked.',
+'lockedbyandtime'     => '(by $1 on $2 at $3)',
 
 # Move page
 'move-page'                    => 'Move $1',
index 43a4a6d..6353a60 100644 (file)
@@ -2167,6 +2167,7 @@ $wgMessageStructure = array(
                'unlockdbsuccesstext',
                'lockfilenotwritable',
                'databasenotlocked',
+               'lockedbyandtime',
        ),
        'movepage' => array(
                'move-page',