(bug 35723) Fix exception in API list=watchlist
authorgrunny <mwgrunny@gmail.com>
Sat, 7 Apr 2012 09:01:41 +0000 (19:01 +1000)
committergrunny <mwgrunny@gmail.com>
Sat, 7 Apr 2012 09:01:41 +0000 (19:01 +1000)
Applying Tim's change to list=recentchanges from commit bf1e9d7
Updates it for the new log system

Change-Id: Ifed6baba628b30f3189e64c6b7e0b278ee0e8e9a

includes/api/ApiQueryWatchlist.php

index ea56fcd..77f6ce9 100644 (file)
@@ -296,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()
                        );
                }