From 2e7db2bd01a553612956576d8c6a687ae7d0488d Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Thu, 5 Jul 2012 19:48:39 +0100 Subject: [PATCH] Fixing reading static path for PHP install (hopefully last PHP support) --- php/config.php | 1 + php/index.php | 1 + 2 files changed, 2 insertions(+) diff --git a/php/config.php b/php/config.php index f82fe5d876..51e0362a99 100644 --- a/php/config.php +++ b/php/config.php @@ -41,6 +41,7 @@ function merge_config($arr1, $arr2) { // The full url to the root page of the app. define('ROOT', ($url['ssl'] ? 'https' : 'http') . '://' . HOST . preg_replace('/\/$/', '', PATH)); +define('STATIC_URL', (isset($url['static']) && $url['static'] !== false) ? $url['static'] : ROOT); // wishing PHP were more like JavaScript...wishing I was able to use Node.js they way I had wanted... define('VERSION', !IS_PRODUCTION ? 'debug' : $package['version']); diff --git a/php/index.php b/php/index.php index 158d8f6d12..cb9342218a 100644 --- a/php/index.php +++ b/php/index.php @@ -45,6 +45,7 @@ echo $mustache->render($view, array( 'token' => $csrf, 'root' => ROOT, + 'static' => STATIC_URL, 'scripts' => $scripts, 'version' => VERSION, 'home' => $home,