Merge "Avoid (s) for unknown plural in a message"
[lhc/web/wiklou.git] / includes / api / ApiQueryWatchlist.php
index 6e60fe4..04eea54 100644 (file)
@@ -281,7 +281,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                }
 
                if ( is_null( $resultPageSet ) ) {
-                       $this->getResult()->setIndexedTagName_internal(
+                       $this->getResult()->addIndexedTagName(
                                array( 'query', $this->getModuleName() ),
                                'item'
                        );
@@ -412,14 +412,15 @@ 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 );
+                               $logEntry = DatabaseLogEntry::newFromRow( $row );
                                ApiQueryLogEvents::addLogParams(
                                        $this->getResult(),
                                        $vals,
                                        $logEntry->getParameters(),
                                        $logEntry->getType(),
                                        $logEntry->getSubtype(),
-                                       $logEntry->getTimestamp()
+                                       $logEntry->getTimestamp(),
+                                       $logEntry->isLegacy()
                                );
                        }
                }
@@ -499,6 +500,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                                )
                        ),
                        'type' => array(
+                               ApiBase::PARAM_DFLT => 'edit|new|log',
                                ApiBase::PARAM_ISMULTI => true,
                                ApiBase::PARAM_TYPE => array(
                                        'edit',