Mglaser has uploaded a new change for review. ( 
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(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/59/365959/1

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: newchange
Gerrit-Change-Id: I5f14ef0cf5a1000611817245a63b1a4f00ce4d31
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Mglaser <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to