Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19453 #9890

Merged
merged 1 commit into from
Feb 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion CRM/Utils/System/Joomla.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,20 @@ public function getDefaultSiteSettings($dir = NULL) {
'',
$config->userFrameworkBaseURL
);
// CRM-19453 revisited. Under Windows, the pattern wasn't recognised.
// This is the original pattern, but it doesn't work under Windows.
// By setting the pattern to the one used before the change first and only
// changing it means that the change code only affects Windows users.
$pattern = '|/media/civicrm/.*$|';
if (DIRECTORY_SEPARATOR == '\\') {
// This regular expression will handle Windows as well as Linux
// and any combination of forward and back slashes in directory
// separators. We only apply it if the directory separator is the one
// used by Windows.
$pattern = '|[\\\\/]media[\\\\/]civicrm[\\\\/].*$|';
}
$siteRoot = preg_replace(
'|/media/civicrm/.*$|',
$pattern,
'',
$config->imageUploadDir
);
Expand Down