Add namespace restrictions to Special:Block and API
[lhc/web/wiklou.git] / includes / api / ApiBase.php
index 9ea8c6d..1efd747 100644 (file)
@@ -1856,7 +1856,7 @@ abstract class ApiBase extends ContextSource {
                                                'min_id' => "MIN($field)",
                                                'max_id' => "MAX($field)",
                                        ],
-                                       null,
+                                       '',
                                        __METHOD__
                                );
                                self::$filterIDsCache[$table][$field] = $row;
@@ -1949,9 +1949,14 @@ abstract class ApiBase extends ContextSource {
         * @since 1.29
         * @param StatusValue $status
         * @param string[] $types 'warning' and/or 'error'
+        * @param string[] $filter Message keys to filter out (since 1.33)
         */
-       public function addMessagesFromStatus( StatusValue $status, $types = [ 'warning', 'error' ] ) {
-               $this->getErrorFormatter()->addMessagesFromStatus( $this->getModulePath(), $status, $types );
+       public function addMessagesFromStatus(
+               StatusValue $status, $types = [ 'warning', 'error' ], array $filter = []
+       ) {
+               $this->getErrorFormatter()->addMessagesFromStatus(
+                       $this->getModulePath(), $status, $types, $filter
+               );
        }
 
        /**