Skip to content

Commit 5cc9ce7

Browse files
committed
Merge branch 'develop' of https://github.com/ushahidi/Ushahidi_Web into develop
2 parents 75b9aa4 + 9a4e17a commit 5cc9ce7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

application/libraries/Requirements.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,20 @@ function setCombinedFilesFolder($folder) {
469469
* @return String Folder relative to the webroot
470470
*/
471471
function getCombinedFilesFolder() {
472-
return ($this->combinedFilesFolder) ? $this->combinedFilesFolder : Kohana::config('upload.relative_directory', FALSE);
472+
$default = Kohana::config('upload.relative_directory', FALSE);
473+
474+
if (Kohana::config("cdn.cdn_store_dynamic_content") AND Kohana::config("requirements.cdn_store_combined_files"))
475+
{
476+
$subdomain_dir = '';
477+
if (Kohana::config('settings.subdomain') != '') {
478+
// Make sure there's a slash on the end
479+
$subdomain_dir = rtrim(Kohana::config('settings.subdomain'), '/').'/';
480+
}
481+
482+
$default = $subdomain_dir . Kohana::config('upload.relative_directory', FALSE);
483+
}
484+
485+
return ($this->combinedFilesFolder) ? $this->combinedFilesFolder : $default;
473486
}
474487

475488
/**

0 commit comments

Comments
 (0)