jenkins-bot has submitted this change and it was merged.
Change subject: check for input, happens to be a full path already
......................................................................
check for input, happens to be a full path already
Change-Id: I3583e6591a0cb117d54bdca757676f7230dd977d
---
M includes/utility/FileSystemHelper.class.php
1 file changed, 6 insertions(+), 5 deletions(-)
Approvals:
Robert Vogel: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/utility/FileSystemHelper.class.php
b/includes/utility/FileSystemHelper.class.php
index b2dc13b..5ae1f3b 100644
--- a/includes/utility/FileSystemHelper.class.php
+++ b/includes/utility/FileSystemHelper.class.php
@@ -58,20 +58,21 @@
}
}
- if (empty($sSubDirName)) {
+ $sFullPath = strpos( $sSubDirName, BS_DATA_DIR ) === 0 ?
$sSubDirName : BS_DATA_DIR . DS . $sSubDirName;
+ if ( empty( $sFullPath ) ) {
wfProfileOut(__METHOD__);
return Status::newGood(BS_DATA_DIR);
- } elseif (is_dir(BS_DATA_DIR . DS . $sSubDirName)) {
+ } elseif ( is_dir( $sFullPath ) ) {
wfProfileOut(__METHOD__);
- return Status::newGood(BS_DATA_DIR . DS . $sSubDirName);
+ return Status::newGood( $sFullPath );
}
- if (!mkdir(BS_DATA_DIR . DS . $sSubDirName, 0777, true)) {
+ if ( !mkdir( $sFullPath, 0777, true ) ) {
wfProfileOut(__METHOD__);
return Status::newFatal(BS_DATA_DIR . ' is not
accessible');
}
wfProfileOut(__METHOD__);
- return Status::newGood(BS_DATA_DIR . DS . $sSubDirName);
+ return Status::newGood( $sFullPath );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/226496
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3583e6591a0cb117d54bdca757676f7230dd977d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Tweichart <[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