API: Move parameter formatting into LogFormatter
[lhc/web/wiklou.git] / includes / api / ApiQueryRecentChanges.php
index 3dbfdf9..28f8b7d 100644 (file)
@@ -535,16 +535,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                                $vals['logid'] = intval( $row->rc_logid );
                                $vals['logtype'] = $row->rc_log_type;
                                $vals['logaction'] = $row->rc_log_action;
-                               $logEntry = DatabaseLogEntry::newFromRow( $row );
-                               ApiQueryLogEvents::addLogParams(
-                                       $this->getResult(),
-                                       $vals,
-                                       $logEntry->getParameters(),
-                                       $logEntry->getType(),
-                                       $logEntry->getSubtype(),
-                                       $logEntry->getTimestamp(),
-                                       $logEntry->isLegacy()
-                               );
+                               $vals['logparams'] = LogFormatter::newFromRow( $row )->formatParametersForApi();
                        }
                }