Change API result data structure to be cleaner in new formats
[lhc/web/wiklou.git] / includes / api / ApiProtect.php
index 675aa58..c07aaca 100644 (file)
@@ -123,11 +123,11 @@ class ApiProtect extends ApiBase {
                        'reason' => $params['reason']
                );
                if ( $cascade ) {
-                       $res['cascade'] = '';
+                       $res['cascade'] = true;
                }
                $res['protections'] = $resultProtections;
                $result = $this->getResult();
-               $result->setIndexedTagName( $res['protections'], 'protection' );
+               ApiResult::setIndexedTagName( $res['protections'], 'protection' );
                $result->addValue( null, $this->getModuleName(), $res );
        }