X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22calendrier%22%2C%22type=semaine%22%29%20.%20%22?a=blobdiff_plain;f=includes%2Fapi%2FApiDelete.php;h=a33a5ad00115b208de0232d633ec0cf1109c8b87;hb=d87135d706004373b2cfdc4c588ce6d80358631f;hp=b5079a2813410c155a00dfb4a3de5c795a5604b9;hpb=1f086ddbfb9c39a387c0d864128b802a8e2d0e9e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index b5079a2813..a33a5ad001 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -116,7 +116,7 @@ class ApiDelete extends ApiBase { // Need to pass a throwaway variable because generateReason expects // a reference $hasHistory = false; - $reason = $page->getAutoDeleteReason( $hasHistory ); + $reason = $page->getAutoDeleteReason( $hasHistory ); if ( $reason === false ) { return array( array( 'cannotdelete', $title->getPrefixedText() ) ); } @@ -180,7 +180,10 @@ class ApiDelete extends ApiBase { 'pageid' => array( ApiBase::PARAM_TYPE => 'integer' ), - 'token' => null, + 'token' => array( + ApiBase::PARAM_TYPE => 'string', + ApiBase::PARAM_REQUIRED => true + ), 'reason' => null, 'watch' => array( ApiBase::PARAM_DFLT => false, @@ -221,7 +224,8 @@ class ApiDelete extends ApiBase { return array( '' => array( 'title' => 'string', - 'reason' => 'string' + 'reason' => 'string', + 'logid' => 'integer' ) ); }