Merge "Fix localization of time in Turkish"
[lhc/web/wiklou.git] / includes / api / ApiQueryLogEvents.php
index 3066720..f345300 100644 (file)
@@ -1,9 +1,5 @@
 <?php
 /**
- *
- *
- * Created on Oct 16, 2006
- *
  * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
  *
  * This program is free software; you can redistribute it and/or modify
@@ -45,7 +41,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
        public function execute() {
                $params = $this->extractRequestParams();
                $db = $this->getDB();
-               $this->commentStore = new CommentStore( 'log_comment' );
+               $this->commentStore = CommentStore::getStore();
                $this->requireMaxOneParameter( $params, 'title', 'prefix', 'namespace' );
 
                $prop = array_flip( $params['prop'] );
@@ -97,7 +93,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
                $this->addFieldsIf( 'log_params', $this->fld_details );
 
                if ( $this->fld_comment || $this->fld_parsedcomment ) {
-                       $commentQuery = $this->commentStore->getJoin();
+                       $commentQuery = $this->commentStore->getJoin( 'log_comment' );
                        $this->addTables( $commentQuery['tables'] );
                        $this->addFields( $commentQuery['fields'] );
                        $this->addJoinConds( $commentQuery['joins'] );
@@ -342,7 +338,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
                                $anyHidden = true;
                        }
                        if ( LogEventsList::userCan( $row, LogPage::DELETED_COMMENT, $user ) ) {
-                               $comment = $this->commentStore->getComment( $row )->text;
+                               $comment = $this->commentStore->getComment( 'log_comment', $row )->text;
                                if ( $this->fld_comment ) {
                                        $vals['comment'] = $comment;
                                }