X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiProtect.php;h=d07301c520cb8270ab3b4c287397229c98dbc8fc;hb=29adb0378d4d80fc62218b11cde3458da50ebdbb;hp=675aa584429d8306664b2bb6601a4103bcfc8ad1;hpb=dd7df34a227f412b81d0c6aff886d7c68f961bb9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiProtect.php b/includes/api/ApiProtect.php index 675aa58442..d07301c520 100644 --- a/includes/api/ApiProtect.php +++ b/includes/api/ApiProtect.php @@ -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,11 +119,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 ); }