Upgrade wikimedia/ip-set to 1.3.0
[lhc/web/wiklou.git] / includes / api / ApiQueryAllPages.php
index 315def0..40909a4 100644 (file)
@@ -1,9 +1,5 @@
 <?php
 /**
- *
- *
- * Created on Sep 25, 2006
- *
  * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
  *
  * This program is free software; you can redistribute it and/or modify
@@ -136,12 +132,12 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
                }
 
                // Page protection filtering
-               if ( count( $params['prtype'] ) || $params['prexpiry'] != 'all' ) {
+               if ( $params['prtype'] || $params['prexpiry'] != 'all' ) {
                        $this->addTables( 'page_restrictions' );
                        $this->addWhere( 'page_id=pr_page' );
                        $this->addWhere( "pr_expiry > {$db->addQuotes( $db->timestamp() )} OR pr_expiry IS NULL" );
 
-                       if ( count( $params['prtype'] ) ) {
+                       if ( $params['prtype'] ) {
                                $this->addWhereFld( 'pr_type', $params['prtype'] );
 
                                if ( isset( $params['prlevel'] ) ) {