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
Move callers away from Title::GAID_FOR_UPDATE
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiDelete.php
diff --git
a/includes/api/ApiDelete.php
b/includes/api/ApiDelete.php
index
0e13d70
..
ad171c6
100644
(file)
--- a/
includes/api/ApiDelete.php
+++ b/
includes/api/ApiDelete.php
@@
-42,6
+42,7
@@
class ApiDelete extends ApiBase {
$pageObj = $this->getTitleOrPageId( $params, 'fromdbmaster' );
$titleObj = $pageObj->getTitle();
if ( !$pageObj->exists() &&
$pageObj = $this->getTitleOrPageId( $params, 'fromdbmaster' );
$titleObj = $pageObj->getTitle();
if ( !$pageObj->exists() &&
+ // @phan-suppress-next-line PhanUndeclaredMethod
!( $titleObj->getNamespace() == NS_FILE && self::canDeleteFile( $pageObj->getFile() ) )
) {
$this->dieWithError( 'apierror-missingtitle' );
!( $titleObj->getNamespace() == NS_FILE && self::canDeleteFile( $pageObj->getFile() ) )
) {
$this->dieWithError( 'apierror-missingtitle' );
@@
-156,6
+157,7
@@
class ApiDelete extends ApiBase {
) {
$title = $page->getTitle();
) {
$title = $page->getTitle();
+ // @phan-suppress-next-line PhanUndeclaredMethod There's no right typehint for it
$file = $page->getFile();
if ( !self::canDeleteFile( $file ) ) {
return self::delete( $page, $user, $reason, $tags );
$file = $page->getFile();
if ( !self::canDeleteFile( $file ) ) {
return self::delete( $page, $user, $reason, $tags );