dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add .pipeline/ with dev image variant"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiImageRotate.php
diff --git
a/includes/api/ApiImageRotate.php
b/includes/api/ApiImageRotate.php
index
668bd0e
..
8a0e8c9
100644
(file)
--- a/
includes/api/ApiImageRotate.php
+++ b/
includes/api/ApiImageRotate.php
@@
-1,7
+1,4
@@
<?php
<?php
-
-use MediaWiki\MediaWikiServices;
-
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-21,6
+18,11
@@
use MediaWiki\MediaWikiServices;
* @file
*/
* @file
*/
+use MediaWiki\MediaWikiServices;
+
+/**
+ * @ingroup API
+ */
class ApiImageRotate extends ApiBase {
private $mPageSet = null;
class ApiImageRotate extends ApiBase {
private $mPageSet = null;
@@
-101,8
+103,10
@@
class ApiImageRotate extends ApiBase {
continue;
}
$ext = strtolower( pathinfo( "$srcPath", PATHINFO_EXTENSION ) );
continue;
}
$ext = strtolower( pathinfo( "$srcPath", PATHINFO_EXTENSION ) );
- $tmpFile = TempFSFile::factory( 'rotate_', $ext, wfTempDir() );
+ $tmpFile = MediaWikiServices::getInstance()->getTempFSFileFactory()
+ ->newTempFSFile( 'rotate_', $ext );
$dstPath = $tmpFile->getPath();
$dstPath = $tmpFile->getPath();
+ // @phan-suppress-next-line PhanUndeclaredMethod
$err = $handler->rotate( $file, [
'srcPath' => $srcPath,
'dstPath' => $dstPath,
$err = $handler->rotate( $file, [
'srcPath' => $srcPath,
'dstPath' => $dstPath,
@@
-112,6
+116,7
@@
class ApiImageRotate extends ApiBase {
$comment = wfMessage(
'rotate-comment'
)->numParams( $rotation )->inContentLanguage()->text();
$comment = wfMessage(
'rotate-comment'
)->numParams( $rotation )->inContentLanguage()->text();
+ // @phan-suppress-next-line PhanUndeclaredMethod
$status = $file->upload(
$dstPath,
$comment,
$status = $file->upload(
$dstPath,
$comment,