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

Revision: 73371
Author:   reedy
Date:     2010-09-20 13:24:16 +0000 (Mon, 20 Sep 2010)

Log Message:
-----------
Add missing parameter to lockTables

Add some braces

Modified Paths:
--------------
    trunk/phase3/includes/ProfilerSimple.php
    trunk/phase3/maintenance/orphans.php

Modified: trunk/phase3/includes/ProfilerSimple.php
===================================================================
--- trunk/phase3/includes/ProfilerSimple.php    2010-09-20 12:07:17 UTC (rev 
73370)
+++ trunk/phase3/includes/ProfilerSimple.php    2010-09-20 13:24:16 UTC (rev 
73371)
@@ -109,8 +109,9 @@
 
        function getCpuTime($ru=null) {
                if ( function_exists( 'getrusage' ) ) {
-                       if ( $ru == null )
+                       if ( $ru == null ) {
                                $ru = getrusage();
+                       }
                        return ($ru['ru_utime.tv_sec'] + $ru['ru_stime.tv_sec'] 
+ ($ru['ru_utime.tv_usec'] +
                                $ru['ru_stime.tv_usec']) * 1e-6);
                } else {
@@ -120,8 +121,9 @@
 
        /* If argument is passed, it assumes that it is dual-format time 
string, returns proper float time value */
        function getTime($time=null) {
-               if ($time==null)
+               if ($time==null) {
                        return microtime(true);
+               }
                list($a,$b)=explode(" ",$time);
                return (float)($a+$b);
        }

Modified: trunk/phase3/maintenance/orphans.php
===================================================================
--- trunk/phase3/maintenance/orphans.php        2010-09-20 12:07:17 UTC (rev 
73370)
+++ trunk/phase3/maintenance/orphans.php        2010-09-20 13:24:16 UTC (rev 
73371)
@@ -168,7 +168,7 @@
                $text     = $dbw->tableName( 'text' );
        
                if ( $fix ) {
-                       $dbw->lockTables( $dbw, 'text' );
+                       $dbw->lockTables( $dbw, 'text', __METHOD__ );
                }
        
                $this->output( "\nChecking for pages whose page_latest links 
are incorrect... (this may take a while on a large wiki)\n" );



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

Reply via email to