Fixed ENANO_VERSION under databaseless template class
authorDan
Tue, 05 Jan 2010 09:56:00 -0500
changeset 1203 c6587072e4c4
parent 1202 5d63267470cd
child 1204 eaab1c22e237
Fixed ENANO_VERSION under databaseless template class
includes/functions.php
includes/template.php
--- a/includes/functions.php	Tue Jan 05 09:55:21 2010 -0500
+++ b/includes/functions.php	Tue Jan 05 09:56:00 2010 -0500
@@ -1358,6 +1358,10 @@
 
 function enano_version($long = false, $no_nightly = false)
 {
+  if ( !defined('ENANO_CONFIG_FETCHED') )
+  {
+    return function_exists('installer_enano_version') ? installer_enano_version() : $GLOBALS['enano_version'];
+  }
   $r = getConfig('enano_version');
   $rc = ( $long ) ? ' release candidate ' : 'RC';
   $b = ( $long ) ? ' beta ' : 'b';
--- a/includes/template.php	Tue Jan 05 09:55:21 2010 -0500
+++ b/includes/template.php	Tue Jan 05 09:56:00 2010 -0500
@@ -3023,7 +3023,7 @@
     {
       $js_dynamic .= '<script type="text/javascript" src="install.php?mode=langjs"></script>';
     }
-    $js_dynamic .= '<script type="text/javascript">var title="'. $title .'"; var scriptPath="'.scriptPath.'"; var cdnPath="'.scriptPath.'"; var ENANO_SID=""; var AES_BITS='.AES_BITS.'; var AES_BLOCKSIZE=' . AES_BLOCKSIZE . '; var pagepass=\'\'; var ENANO_LANG_ID = 1; var msg_loading_component = \'Loading %component%...\';</script>';
+    $js_dynamic .= '<script type="text/javascript">var title="'. $title .'"; var scriptPath="'.scriptPath.'"; var cdnPath="'.scriptPath.'"; var ENANO_SID=""; var AES_BITS='.AES_BITS.'; var AES_BLOCKSIZE=' . AES_BLOCKSIZE . '; var pagepass=\'\'; var ENANO_LANG_ID = 1; var enano_version = \'' . enano_version() . '\'; var msg_loading_component = \'Loading %component%...\';</script>';
     
     global $site_name, $site_desc;
     $site_default_name = ( !empty($site_name) ) ? $site_name : 'Critical error';
@@ -3062,7 +3062,8 @@
       'JS_DYNAMIC_VARS'=>$js_dynamic,
       'SIDEBAR_RIGHT'=>'',
       'REPORT_URI' => '',
-      'URL_ABOUT_ENANO' => 'http://enanocms.org/'
+      'URL_ABOUT_ENANO' => 'http://enanocms.org/',
+      'ENANO_VERSION' => enano_version()
       );
     $this->tpl_strings = array_merge($tpl_strings, $this->tpl_strings);