raise timeout for CdbTest::testCdb()
[lhc/web/wiklou.git] / includes / api / ApiQueryWatchlist.php
index a93f94f..dd50624 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Created on Sep 25, 2006
  *
- * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
+ * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -96,7 +96,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                                'rc_last_oldid',
                        ) );
 
-                       $this->addFieldsIf( array( 'rc_new', 'rc_minor', 'rc_bot' ), $this->fld_flags );
+                       $this->addFieldsIf( array( 'rc_type', 'rc_minor', 'rc_bot' ), $this->fld_flags );
                        $this->addFieldsIf( 'rc_user', $this->fld_user || $this->fld_userid );
                        $this->addFieldsIf( 'rc_user_text', $this->fld_user );
                        $this->addFieldsIf( 'rc_comment', $this->fld_comment || $this->fld_parsedcomment );
@@ -116,7 +116,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                ) );
 
                $userId = $user->getId();
-               $this->addJoinConds( array( 'watchlist' => array('INNER JOIN',
+               $this->addJoinConds( array( 'watchlist' => array( 'INNER JOIN',
                        array(
                                'wl_user' => $userId,
                                'wl_namespace=rc_namespace',
@@ -254,7 +254,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                }
 
                if ( $this->fld_flags ) {
-                       if ( $row->rc_new ) {
+                       if ( $row->rc_type == RC_NEW ) {
                                $vals['new'] = '';
                        }
                        if ( $row->rc_minor ) {
@@ -518,8 +518,4 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
        public function getHelpUrls() {
                return 'https://www.mediawiki.org/wiki/API:Watchlist';
        }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
 }