jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/365959 )
Change subject: Fixed path and filename for non-repo-files
......................................................................
Fixed path and filename for non-repo-files
See ERM6943
NEEDS CHERRY-PICK TO REL1_27
Change-Id: I5f14ef0cf5a1000611817245a63b1a4f00ce4d31
---
M UEModulePDF/includes/PDFFileResolver.php
1 file changed, 4 insertions(+), 3 deletions(-)
Approvals:
Mglaser: Looks good to me, approved
jenkins-bot: Verified
diff --git a/UEModulePDF/includes/PDFFileResolver.php
b/UEModulePDF/includes/PDFFileResolver.php
index d565ec5..cff18c1 100644
--- a/UEModulePDF/includes/PDFFileResolver.php
+++ b/UEModulePDF/includes/PDFFileResolver.php
@@ -127,7 +127,7 @@
}
protected function setAbsoluteFilesystemPath() {
- global $wgUploadPath;
+ global $wgUploadDirectory;
if( $this->oFileObject instanceof File &&
$this->oFileObject->exists() ) {
$oFileRepoLocalRef =
$this->oFileObject->getRepo()->getLocalReference( $this->oFileObject->getPath()
);
@@ -136,12 +136,13 @@
}
$this->sSourceFileName = $this->oFileObject->getName();
} else {
- $this->sAbsoluteFilesystemPath =
$this->getFileSystemPath( $wgUploadPath . $this->sSourceFilePath );
+ $this->sAbsoluteFilesystemPath =
$this->getFileSystemPath( $wgUploadDirectory . $this->sSourceFilePath );
}
}
protected function setFileName() {
- if( !empty( $this->sAbsoluteFilesystemPath ) ) {
+ $this->sFileName = $this->sSourceFileName;
+ if( !empty( $this->sAbsoluteFilesystemPath ) &&
$this->oFileObject instanceof File ) {
$this->sFileName = $this->oFileObject->getName();
}
}
--
To view, visit https://gerrit.wikimedia.org/r/365959
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5f14ef0cf5a1000611817245a63b1a4f00ce4d31
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Mglaser <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits