}
$restrictionTypes = $titleObj->getRestrictionTypes();
- $db = $this->getDB();
$protections = array();
$expiryarray = array();
$cascade = $params['cascade'];
- if ( $params['watch'] ) {
- $this->logFeatureUsage( 'action=protect&watch' );
- }
$watch = $params['watch'] ? 'watch' : $params['watchlist'];
$this->setWatch( $watch, $titleObj, 'watchdefault' );
'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 );
}