From 241f06e118fd54a062641f89e9a6995afb478cec Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 20 Sep 2010 13:24:16 +0000 Subject: [PATCH] Add missing parameter to lockTables Add some braces --- includes/ProfilerSimple.php | 6 ++++-- maintenance/orphans.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/ProfilerSimple.php b/includes/ProfilerSimple.php index 5989061dcd..8aab1ecc32 100644 --- a/includes/ProfilerSimple.php +++ b/includes/ProfilerSimple.php @@ -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); } diff --git a/maintenance/orphans.php b/maintenance/orphans.php index df4ba36057..4a9a6506b5 100644 --- a/maintenance/orphans.php +++ b/maintenance/orphans.php @@ -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" ); -- 2.20.1