Add environment flags for managing publisher settings

SS_STATICPUBLISHER_ENABLED - Set in the environment file if static publisher enabled or disabled

SS_STATICPUBLISHER_CACHEDIR - Set the cache directory (if not /cache)

SS_STATICPUBLISHER_DEBUG - modify debug flag.
This commit is contained in:
Will Rossiter 2015-03-07 00:22:14 +13:00
parent 3e14e51643
commit 52f04b7435
1 changed files with 18 additions and 4 deletions

View File

@ -22,10 +22,24 @@
*/
require_once('../framework/core/Constants.php');
$cacheEnabled = true;
$cacheDebug = false;
$cacheBaseDir = '../cache/'; // Should point to the same folder as FilesystemPublisher->destFolder
if(defined('SS_STATICPUBLISHER_ENABLED')) {
$cacheEnabled = SS_STATICPUBLISHER_ENABLED;
} else {
$cacheEnabled = true;
}
if(defined('SS_STATICPUBLISHER_CACHEDIR')) {
$cacheBaseDir = SS_STATICPUBLISHER_CACHEDIR;
} else {
$cacheBaseDir = '../cache/';
}
if(defined('SS_STATICPUBLISHER_DEBUG')) {
$cacheDebug = SS_STATICPUBLISHER_DEBUG;
} else {
$cacheDebug = false;
}
// Optional settings for FilesystemPublisher::$domain_based_mapping=TRUE
$hostmapLocation = '../subsites/host-map.php';