Merge "[FileBackend] Made supported ops check more explicit for sanity."
[lhc/web/wiklou.git] / includes / api / ApiQueryWatchlist.php
index e69ab50..77f6ce9 100644 (file)
  * @file
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-       // Eclipse helper - will be ignored in production
-       require_once( 'ApiQueryBase.php' );
-}
-
 /**
  * This query action allows clients to retrieve a list of recently modified pages
  * that are part of the logged-in user's watchlist.
@@ -134,7 +129,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
 
                $db = $this->getDB();
 
-               $this->addTimestampWhereRange( 'rc_timestamp', $params['dir'], 
+               $this->addTimestampWhereRange( 'rc_timestamp', $params['dir'],
                        $params['start'], $params['end'] );
                $this->addWhereFld( 'wl_namespace', $params['namespace'] );
 
@@ -301,13 +296,14 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                        $vals['logid'] = intval( $row->rc_logid );
                        $vals['logtype'] = $row->rc_log_type;
                        $vals['logaction'] = $row->rc_log_action;
+                       $logEntry = DatabaseLogEntry::newFromRow( (array)$row );
                        ApiQueryLogEvents::addLogParams(
                                $this->getResult(),
                                $vals,
-                               $row->rc_params,
-                               $row->rc_log_type,
-                               $row->rc_log_action,
-                               $row->rc_timestamp
+                               $logEntry->getParameters(),
+                               $logEntry->getType(),
+                               $logEntry->getSubtype(),
+                               $logEntry->getTimestamp()
                        );
                }
 
@@ -450,7 +446,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
        }
 
        public function getHelpUrls() {
-               return 'http://www.mediawiki.org/wiki/API:Watchlist';
+               return 'https://www.mediawiki.org/wiki/API:Watchlist';
        }
 
        public function getVersion() {