From: Aaron Schulz Date: Sat, 4 Apr 2009 17:51:13 +0000 (+0000) Subject: profiling fixes X-Git-Tag: 1.31.0-rc.0~42229 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=16cfc9940b2b12a9d51f673425cbbec49d9c435d;p=lhc%2Fweb%2Fwiklou.git profiling fixes --- diff --git a/includes/filerepo/LocalFile.php b/includes/filerepo/LocalFile.php index 04703d9901..fcd9d12714 100644 --- a/includes/filerepo/LocalFile.php +++ b/includes/filerepo/LocalFile.php @@ -333,12 +333,14 @@ class LocalFile extends File # Don't destroy file info of missing files if ( !$this->fileExists ) { wfDebug( __METHOD__.": file does not exist, aborting\n" ); + wfProfileOut( __METHOD__ ); return; } $dbw = $this->repo->getMasterDB(); list( $major, $minor ) = self::splitMime( $this->mime ); if ( wfReadOnly() ) { + wfProfileOut( __METHOD__ ); return; } wfDebug(__METHOD__.': upgrading '.$this->getName()." to the current schema\n"); @@ -1441,6 +1443,7 @@ class LocalFileDeleteBatch { // Roll back inserts, release lock and abort // TODO: delete the defunct filearchive rows if we are using a non-transactional DB $this->file->unlockAndRollback(); + wfProfileOut( __METHOD__ ); return $this->status; }