r103189 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103188‎ | r103189 | r103190 >
Date:16:35, 15 November 2011
Author:platonides
Status:ok
Tags:
Comment:
Fixup for r102997. If you add returns to a profiled function,
you should make sure to wfProfileOut on all branches.
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -289,18 +289,21 @@
290290 $this->mRevision = Revision::newFromId( $oldid );
291291 if ( !$this->mRevision ) {
292292 wfDebug( __METHOD__ . " failed to retrieve specified revision, id $oldid\n" );
 293+ wfProfileOut( __METHOD__ );
293294 return false;
294295 }
295296 }
296297 } else {
297298 if ( !$this->mPage->getLatest() ) {
298299 wfDebug( __METHOD__ . " failed to find page data for title " . $this->getTitle()->getPrefixedText() . "\n" );
 300+ wfProfileOut( __METHOD__ );
299301 return false;
300302 }
301303
302304 $this->mRevision = $this->mPage->getRevision();
303305 if ( !$this->mRevision ) {
304306 wfDebug( __METHOD__ . " failed to retrieve current page, rev_id " . $this->mPage->getLatest() . "\n" );
 307+ wfProfileOut( __METHOD__ );
305308 return false;
306309 }
307310 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102997Some cleanup to Article::view() and related:...ialex18:05, 14 November 2011

Status & tagging log