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
/
specials
/
SpecialExport.php
diff --git
a/includes/specials/SpecialExport.php
b/includes/specials/SpecialExport.php
index
ef61ac5
..
e680d24
100644
(file)
--- a/
includes/specials/SpecialExport.php
+++ b/
includes/specials/SpecialExport.php
@@
-24,6
+24,7
@@
*/
use MediaWiki\Logger\LoggerFactory;
*/
use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
/**
* A special page that allows users to export pages in a XML file
/**
* A special page that allows users to export pages in a XML file
@@
-326,7
+327,9
@@
class SpecialExport extends SpecialPage {
* @return bool
*/
private function userCanOverrideExportDepth() {
* @return bool
*/
private function userCanOverrideExportDepth() {
- return $this->getUser()->isAllowed( 'override-export-depth' );
+ return MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasRight( $this->getUser(), 'override-export-depth' );
}
/**
}
/**
@@
-387,6
+390,8
@@
class SpecialExport extends SpecialPage {
if ( $exportall ) {
$exporter->allPages();
} else {
if ( $exportall ) {
$exporter->allPages();
} else {
+ $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+
foreach ( $pages as $page ) {
# T10824: Only export pages the user can read
$title = Title::newFromText( $page );
foreach ( $pages as $page ) {
# T10824: Only export pages the user can read
$title = Title::newFromText( $page );
@@
-395,7
+400,7
@@
class SpecialExport extends SpecialPage {
continue;
}
continue;
}
- if ( !$
title->userCan( 'read', $this->getUser()
) ) {
+ if ( !$
permissionManager->userCan( 'read', $this->getUser(), $title
) ) {
// @todo Perhaps output an <error> tag or something.
continue;
}
// @todo Perhaps output an <error> tag or something.
continue;
}