Merge "Update jakub-onderka/php-parallel-lint to 0.9.2"
[lhc/web/wiklou.git] / includes / api / ApiProtect.php
index 496db8f..d07301c 100644 (file)
@@ -56,7 +56,6 @@ class ApiProtect extends ApiBase {
                }
 
                $restrictionTypes = $titleObj->getRestrictionTypes();
-               $db = $this->getDB();
 
                $protections = array();
                $expiryarray = array();
@@ -101,9 +100,6 @@ class ApiProtect extends ApiBase {
 
                $cascade = $params['cascade'];
 
-               if ( $params['watch'] ) {
-                       $this->logFeatureUsage( 'action=protect&watch' );
-               }
                $watch = $params['watch'] ? 'watch' : $params['watchlist'];
                $this->setWatch( $watch, $titleObj, 'watchdefault' );
 
@@ -123,7 +119,7 @@ class ApiProtect extends ApiBase {
                        'reason' => $params['reason']
                );
                if ( $cascade ) {
-                       $res['cascade'] = '';
+                       $res['cascade'] = true;
                }
                $res['protections'] = $resultProtections;
                $result = $this->getResult();