Reverted "FOR UPDATE" in 61f246aa786d824d0653522ed679c16be719da80.
[lhc/web/wiklou.git] / includes / api / ApiQueryBlocks.php
index 8c287d6..097487e 100644 (file)
@@ -4,7 +4,7 @@
  *
  * Created on Sep 10, 2007
  *
- * Copyright © 2007 Roan Kattouw <Firstname>.<Lastname>@gmail.com
+ * Copyright © 2007 Roan Kattouw "<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
@@ -324,6 +324,60 @@ class ApiQueryBlocks extends ApiQueryBase {
                );
        }
 
+       public function getResultProperties() {
+               return array(
+                       'id' => array(
+                               'id' => 'integer'
+                       ),
+                       'user' => array(
+                               'user' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'userid' => array(
+                               'userid' => array(
+                                       ApiBase::PROP_TYPE => 'integer',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'by' => array(
+                               'by' => 'string'
+                       ),
+                       'byid' => array(
+                               'byid' => 'integer'
+                       ),
+                       'timestamp' => array(
+                               'timestamp' => 'timestamp'
+                       ),
+                       'expiry' => array(
+                               'expiry' => 'timestamp'
+                       ),
+                       'reason' => array(
+                               'reason' => 'string'
+                       ),
+                       'range' => array(
+                               'rangestart' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               ),
+                               'rangeend' => array(
+                                       ApiBase::PROP_TYPE => 'string',
+                                       ApiBase::PROP_NULLABLE => true
+                               )
+                       ),
+                       'flags' => array(
+                               'automatic' => 'boolean',
+                               'anononly' => 'boolean',
+                               'nocreate' => 'boolean',
+                               'autoblock' => 'boolean',
+                               'noemail' => 'boolean',
+                               'hidden' => 'boolean',
+                               'allowusertalk' => 'boolean'
+                       )
+               );
+       }
+
        public function getDescription() {
                return 'List all blocked users and IP addresses';
        }