diff options
author | Adam Williamson <awilliam@redhat.com> | 2014-12-30 12:03:07 -0800 |
---|---|---|
committer | Adam Williamson <awilliam@redhat.com> | 2015-01-05 15:24:23 -0800 |
commit | bb79aac78a4c94c963c1995c5306be2acac64263 (patch) | |
tree | 80e6ceda42dba2a0cb326879b61d81d9d7815e99 /lib/private/template.php | |
parent | c0ad6e818b118a22c5312e6ded97ebb0eeee5cda (diff) | |
download | nextcloud-server-bb79aac78a4c94c963c1995c5306be2acac64263.tar.gz nextcloud-server-bb79aac78a4c94c963c1995c5306be2acac64263.zip |
allow css/js asset directory to be relocated (#13053)
This allows the directory where CSS/JS asset collections are
written to be changed, in case SERVERROOT is not writeable. Note
it does *not* allow the expected URL to be changed: whatever
directory is used, the server must be configured to serve it
at WEBROOT/assets. It may be possible to add another config
parameter to allow the admin to specify a custom asset URL,
but I thought I'd keep the first implementation simple.
Diffstat (limited to 'lib/private/template.php')
-rw-r--r-- | lib/private/template.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/template.php b/lib/private/template.php index 78ebb506385..d407eb8384c 100644 --- a/lib/private/template.php +++ b/lib/private/template.php @@ -233,13 +233,14 @@ class OC_Template extends \OC\Template\Base { */ public static function isAssetPipelineEnabled() { // asset management enabled? - $useAssetPipeline = \OC::$server->getConfig()->getSystemValue('asset-pipeline.enabled', false); + $config = \OC::$server->getConfig(); + $useAssetPipeline = $config->getSystemValue('asset-pipeline.enabled', false); if (!$useAssetPipeline) { return false; } // assets folder exists? - $assetDir = \OC::$SERVERROOT . '/assets'; + $assetDir = $config->getSystemValue('assetdirectory', \OC::$SERVERROOT) . '/assets'; if (!is_dir($assetDir)) { if (!mkdir($assetDir)) { \OCP\Util::writeLog('assets', |