From 95c67c8df6c345a8c98c897e76736234688f61a1 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 4 Dec 2008 15:55:47 +0000 Subject: [PATCH] Revert part of r44232, accidentally committed too much --- includes/api/ApiQueryLogEvents.php | 7 ++----- includes/api/ApiQueryWatchlist.php | 9 +++------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index beb2963e86..84bd15d6ec 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -140,7 +140,7 @@ class ApiQueryLogEvents extends ApiQueryBase { $this->getResult()->addValue('query', $this->getModuleName(), $data); } - public static function addLogParams($result, &$vals, $params, $type, $ts) { + public static function addLogParams($result, &$vals, $params, $type) { $params = explode("\n", $params); switch ($type) { case 'move': @@ -169,8 +169,6 @@ class ApiQueryLogEvents extends ApiQueryBase { case 'block': $vals2 = array(); list( $vals2['duration'], $vals2['flags'] ) = $params; - $vals2['expiry'] = wfTimestamp(TS_ISO_8601, - strtotime($params[0], wfTimestamp(TS_UNIX, $ts))); $vals[$type] = $vals2; $params = null; break; @@ -202,8 +200,7 @@ class ApiQueryLogEvents extends ApiQueryBase { if ($this->fld_details && $row->log_params !== '') { self::addLogParams($this->getResult(), $vals, - $row->log_params, $row->log_type, - $row->log_timestamp); + $row->log_params, $row->log_type); } if ($this->fld_user) { diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index 3d38b81e8a..a70ea49730 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -118,6 +118,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { $this->addTables(array ( 'watchlist', + 'page', 'recentchanges' )); @@ -125,18 +126,14 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { $this->addWhere(array ( 'wl_namespace = rc_namespace', 'wl_title = rc_title', + 'rc_cur_id = page_id', 'wl_user' => $userId, 'rc_deleted' => 0, )); $this->addWhereRange('rc_timestamp', $dir, $start, $end); $this->addWhereFld('wl_namespace', $namespace); - if(!$allrev) - { - $this->addTables('page'); - $this->addWhere('page_id=rc_cur_id'); - $this->addWhereIf('rc_this_oldid=page_latest'); - } + $this->addWhereIf('rc_this_oldid=page_latest', !$allrev); if (!is_null($show)) { $show = array_flip($show); -- 2.20.1