r73371 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73370‎ | r73371 | r73372 >
Date:13:24, 20 September 2010
Author:reedy
Status:ok
Tags:
Comment:
Add missing parameter to lockTables

Add some braces
Modified paths:
  • /trunk/phase3/includes/ProfilerSimple.php (modified) (history)
  • /trunk/phase3/maintenance/orphans.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/orphans.php
@@ -168,7 +168,7 @@
169169 $text = $dbw->tableName( 'text' );
170170
171171 if ( $fix ) {
172 - $dbw->lockTables( $dbw, 'text' );
 172+ $dbw->lockTables( $dbw, 'text', __METHOD__ );
173173 }
174174
175175 $this->output( "\nChecking for pages whose page_latest links are incorrect... (this may take a while on a large wiki)\n" );
Index: trunk/phase3/includes/ProfilerSimple.php
@@ -109,8 +109,9 @@
110110
111111 function getCpuTime($ru=null) {
112112 if ( function_exists( 'getrusage' ) ) {
113 - if ( $ru == null )
 113+ if ( $ru == null ) {
114114 $ru = getrusage();
 115+ }
115116 return ($ru['ru_utime.tv_sec'] + $ru['ru_stime.tv_sec'] + ($ru['ru_utime.tv_usec'] +
116117 $ru['ru_stime.tv_usec']) * 1e-6);
117118 } else {
@@ -120,8 +121,9 @@
121122
122123 /* If argument is passed, it assumes that it is dual-format time string, returns proper float time value */
123124 function getTime($time=null) {
124 - if ($time==null)
 125+ if ($time==null) {
125126 return microtime(true);
 127+ }
126128 list($a,$b)=explode(" ",$time);
127129 return (float)($a+$b);
128130 }

Status & tagging log