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 "Declare dynamic properties"
[lhc/web/wiklou.git]
/
includes
/
page
/
ImagePage.php
diff --git
a/includes/page/ImagePage.php
b/includes/page/ImagePage.php
index
2e43e8c
..
bb15532
100644
(file)
--- a/
includes/page/ImagePage.php
+++ b/
includes/page/ImagePage.php
@@
-27,6
+27,9
@@
use Wikimedia\Rdbms\ResultWrapper;
* Class for viewing MediaWiki file description pages
*
* @ingroup Media
* Class for viewing MediaWiki file description pages
*
* @ingroup Media
+ *
+ * @property WikiFilePage $mPage Set by overwritten newPage() in this class
+ * @method WikiFilePage getPage()
*/
class ImagePage extends Article {
/** @var File|false */
*/
class ImagePage extends Article {
/** @var File|false */
@@
-41,11
+44,6
@@
class ImagePage extends Article {
/** @var bool */
protected $mExtraDescription = false;
/** @var bool */
protected $mExtraDescription = false;
- /**
- * @var WikiFilePage
- */
- protected $mPage;
-
/**
* @param Title $title
* @return WikiFilePage
/**
* @param Title $title
* @return WikiFilePage
@@
-605,7
+603,10
@@
EOT
);
}
);
}
- if ( $wgEnableUploads && $user->isAllowed( 'upload' ) ) {
+ if ( $wgEnableUploads && MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasRight( $user, 'upload' )
+ ) {
// Only show an upload link if the user can upload
$uploadTitle = SpecialPage::getTitleFor( 'Upload' );
$nofile = [
// Only show an upload link if the user can upload
$uploadTitle = SpecialPage::getTitleFor( 'Upload' );
$nofile = [
@@
-989,6
+990,7
@@
EOT
parent::delete();
return;
}
parent::delete();
return;
}
+ '@phan-var LocalFile $file';
$deleter = new FileDeleteForm( $file );
$deleter->execute();
$deleter = new FileDeleteForm( $file );
$deleter->execute();