Remove support for FileDeleteForm::doDelete without a user
Bug: T245801 Change-Id: Ica1f49fc257df70c2c1990035414f94bc3b850ff
This commit is contained in:
parent
ac959277cb
commit
5dbdacf650
2 changed files with 3 additions and 9 deletions
|
|
@ -108,6 +108,7 @@ because of Phabricator reports.
|
|||
previously hard deprecated, and support for now passing a User has now
|
||||
been removed:
|
||||
- FileDeleteForm::__construct
|
||||
- FileDeleteForm::doDelete
|
||||
- LocalFileDeleteBatch::__construct
|
||||
- LogPage::addEntry (also accepts user id instead)
|
||||
- PatrolLog::record
|
||||
|
|
|
|||
|
|
@ -166,21 +166,14 @@ class FileDeleteForm {
|
|||
* @param ?string &$oldimage Archive name
|
||||
* @param string $reason Reason of the deletion
|
||||
* @param bool $suppress Whether to mark all deleted versions as restricted
|
||||
* @param User|null $user User object performing the request (null defaults to $wgUser
|
||||
* and is deprecated as of 1.35)
|
||||
* @param User $user
|
||||
* @param array $tags Tags to apply to the deletion action
|
||||
* @throws MWException
|
||||
* @return Status
|
||||
*/
|
||||
public static function doDelete( &$title, &$file, &$oldimage, $reason,
|
||||
$suppress, User $user = null, $tags = []
|
||||
$suppress, User $user, $tags = []
|
||||
) {
|
||||
if ( $user === null ) {
|
||||
wfDeprecated( __METHOD__ . ' without passing a $user parameter', '1.35' );
|
||||
global $wgUser;
|
||||
$user = $wgUser;
|
||||
}
|
||||
|
||||
if ( $oldimage ) {
|
||||
$page = null;
|
||||
$status = $file->deleteOldFile( $oldimage, $reason, $user, $suppress );
|
||||
|
|
|
|||
Loading…
Reference in a new issue