[geeklog-cvs] geeklog: Merging
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Mar 20 12:47:37 EDT 2011
changeset 8192:e2c8f5b4b1be
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e2c8f5b4b1be
user: Dirk Haun <dirk at haun-online.de>
date: Sun Mar 20 17:47:31 2011 +0100
description:
Merging
diffstat:
system/classes/scripts.class.php | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r 1ac85b5d217d -r e2c8f5b4b1be system/classes/scripts.class.php
--- a/system/classes/scripts.class.php Sun Mar 20 16:23:02 2011 +0100
+++ b/system/classes/scripts.class.php Sun Mar 20 17:47:31 2011 +0100
@@ -420,12 +420,15 @@
// Create config variable array to pass to JavaScript
$config_js = array();
$keys = array('site_url', 'site_admin_url', 'layout_url', 'path', 'path_html', 'path_layout',
- 'site_name', 'site_slogan',
+ 'site_name', 'site_slogan',
'theme', 'doctype', 'path_themes');
foreach($keys as $key){
$config_js[$key] = $_CONF[$key];
}
- $footercode .= "var GeeklogConfig = new Object(" . json_encode($config_js) . ");" . LB;
+
+ // Had to trim and add spaces to json_encode output since the data in the {} is seen by the template class as a template variable
+ //$footercode .= "var GeeklogConfig = new Object(" . json_encode($config_js) . ");" . LB;
+ $footercode .= "var GeeklogConfig = new Object({ ".trim(json_encode($config_js), '{}')." });" . LB;
$footercode .= '</script>' . LB;
// Set JavaScript Library files first incase other scripts need them
More information about the geeklog-cvs
mailing list