From: Brad Jorsch Date: Sat, 22 Dec 2012 19:54:03 +0000 (-0500) Subject: Fix database access in ApiSetNotificationTimestamp X-Git-Tag: 1.31.0-rc.0~21222^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=d95ee06f600f8b79575840c4231bef07216c6e17;p=lhc%2Fweb%2Fwiklou.git Fix database access in ApiSetNotificationTimestamp ApiBase::getDB() doesn't take a parameter indicating whether DB_SLAVE or DB_MASTER is wanted. Use wfGetDB() instead. Change-Id: Ic2057a1561ad31a0638eea6bae887982a4fe8d80 --- diff --git a/includes/api/ApiSetNotificationTimestamp.php b/includes/api/ApiSetNotificationTimestamp.php index 098b1a6601..c122f59357 100644 --- a/includes/api/ApiSetNotificationTimestamp.php +++ b/includes/api/ApiSetNotificationTimestamp.php @@ -49,7 +49,7 @@ class ApiSetNotificationTimestamp extends ApiBase { $args = array_merge( array( $params, 'entirewatchlist' ), array_keys( $pageSet->getAllowedParams() ) ); call_user_func_array( array( $this, 'requireOnlyOneParameter' ), $args ); - $dbw = $this->getDB( DB_MASTER ); + $dbw = wfGetDB( DB_MASTER, 'api' ); $timestamp = null; if ( isset( $params['timestamp'] ) ) {