http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88278

Revision: 88278
Author:   siebrand
Date:     2011-05-16 23:21:32 +0000 (Mon, 16 May 2011)
Log Message:
-----------
(bug 29011) Remove hard coded text from Special:LockDb.

Who locked the database and when will be displayed in the content language, as 
reason, locker and timestamp are saved in $wgReadOnlyFile.

Modified Paths:
--------------
    trunk/phase3/includes/specials/SpecialLockdb.php
    trunk/phase3/languages/messages/MessagesEn.php
    trunk/phase3/maintenance/language/messages.inc

Modified: trunk/phase3/includes/specials/SpecialLockdb.php
===================================================================
--- trunk/phase3/includes/specials/SpecialLockdb.php    2011-05-16 22:54:54 UTC 
(rev 88277)
+++ trunk/phase3/includes/specials/SpecialLockdb.php    2011-05-16 23:21:32 UTC 
(rev 88278)
@@ -122,8 +122,13 @@
                        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' ) );

Modified: trunk/phase3/languages/messages/MessagesEn.php
===================================================================
--- trunk/phase3/languages/messages/MessagesEn.php      2011-05-16 22:54:54 UTC 
(rev 88277)
+++ trunk/phase3/languages/messages/MessagesEn.php      2011-05-16 23:21:32 UTC 
(rev 88278)
@@ -3167,6 +3167,7 @@
 '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',

Modified: trunk/phase3/maintenance/language/messages.inc
===================================================================
--- trunk/phase3/maintenance/language/messages.inc      2011-05-16 22:54:54 UTC 
(rev 88277)
+++ trunk/phase3/maintenance/language/messages.inc      2011-05-16 23:21:32 UTC 
(rev 88278)
@@ -2167,6 +2167,7 @@
                'unlockdbsuccesstext',
                'lockfilenotwritable',
                'databasenotlocked',
+               'lockedbyandtime',
        ),
        'movepage' => array(
                'move-page',


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to