r70768 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70767‎ | r70768 | r70769 >
Date:15:35, 9 August 2010
Author:catrope
Status:ok
Tags:
Comment:
Swap order of exists() and isAlwaysKnown() checks, as the latter is generally less expensive. Could not reproduce a case where Linker::link() actually caused an existence check to be ran for an always-known title, though.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -3809,7 +3809,7 @@
38103810 * @return \type{\bool}
38113811 */
38123812 public function isKnown() {
3813 - return $this->exists() || $this->isAlwaysKnown();
 3813+ return $this->isAlwaysKnown() || $this->exists();
38143814 }
38153815
38163816 /**

Status & tagging log