From: Roan Kattouw Date: Mon, 9 Aug 2010 15:35:36 +0000 (+0000) Subject: Swap order of exists() and isAlwaysKnown() checks, as the latter is generally less... X-Git-Tag: 1.31.0-rc.0~35584 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=9f1573f4923dfa4ccc706ad84350ccd827898204;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/includes/Title.php b/includes/Title.php index ff0721f37b..bf562a89e0 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3809,7 +3809,7 @@ class Title { * @return \type{\bool} */ public function isKnown() { - return $this->exists() || $this->isAlwaysKnown(); + return $this->isAlwaysKnown() || $this->exists(); } /**