Add missing parameter to lockTables
authorSam Reed <reedy@users.mediawiki.org>
Mon, 20 Sep 2010 13:24:16 +0000 (13:24 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 20 Sep 2010 13:24:16 +0000 (13:24 +0000)
Add some braces

includes/ProfilerSimple.php
maintenance/orphans.php

index 5989061..8aab1ec 100644 (file)
@@ -109,8 +109,9 @@ class ProfilerSimple extends Profiler {
 
        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 @@ class ProfilerSimple extends Profiler {
 
        /* 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);
        }
index df4ba36..4a9a650 100644 (file)
@@ -168,7 +168,7 @@ class Orphans extends Maintenance {
                $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" );