From: Brad Jorsch Date: Wed, 26 Nov 2014 19:43:58 +0000 (-0500) Subject: API: Check suppressredirect right in ApiMove X-Git-Tag: 1.31.0-rc.0~13169 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=56a12f8b57a0e5c6e56019db37be07ef60f6531a;p=lhc%2Fweb%2Fwiklou.git API: Check suppressredirect right in ApiMove Change Ic5026384 accidentally lost the check when changing from Title::moveTo (which does the check itself) to MovePage::move (which doesn't). Bug: T75985 Change-Id: Ia64a233936c639a6748488e4d25816e87658ffe1 --- diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php index c7f40c74b2..7fb6303321 100644 --- a/includes/api/ApiMove.php +++ b/includes/api/ApiMove.php @@ -166,6 +166,11 @@ class ApiMove extends ApiBase { return $permStatus; } + // Check suppressredirect permission + if ( !$this->getUser()->isAllowed( 'suppressredirect' ) ) { + $createRedirect = true; + } + return $mp->move( $this->getUser(), $reason, $createRedirect ); }