From: Aaron Schulz Date: Mon, 18 Aug 2008 06:50:12 +0000 (+0000) Subject: Add optional $db param X-Git-Tag: 1.31.0-rc.0~45842 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=7a7cbfb3b6e1f9143ac14edae92cc4b1ef5afcee;p=lhc%2Fweb%2Fwiklou.git Add optional $db param --- diff --git a/includes/Title.php b/includes/Title.php index e643500bbb..ee5c658614 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3119,11 +3119,12 @@ class Title { /** * Get the last touched timestamp + * @param Database $db, optional db * @return \type{\string} Last touched timestamp */ - public function getTouched() { - $dbr = wfGetDB( DB_SLAVE ); - $touched = $dbr->selectField( 'page', 'page_touched', + public function getTouched( $db = NULL ) { + $db = isset($db) ? $db : wfGetDB( DB_SLAVE ); + $touched = $db->selectField( 'page', 'page_touched', array( 'page_namespace' => $this->getNamespace(), 'page_title' => $this->getDBkey()