diff -r de4f81abc5e3 -r 6b7644fec887 includes/template.php
--- a/includes/template.php Tue May 05 21:53:48 2009 -0400
+++ b/includes/template.php Sun May 10 14:41:51 2009 -0400
@@ -336,15 +336,17 @@
function get_css($s = false)
{
global $db, $session, $paths, $template, $plugins; // Common objects
- if(!defined('ENANO_TEMPLATE_LOADED'))
- $this->load_theme($session->theme, $session->style);
+ $this->init_vars();
+
$path = ( $s ) ? 'css/'.$s : 'css/'.$this->style.'.css';
+
if ( !file_exists(ENANO_ROOT . '/themes/' . $this->theme . '/' . $path) )
{
echo "/* WARNING: Falling back to default file because file $path does not exist */\n";
$path = 'css/' . $this->style_list[0] . '.css';
}
- return '
' . htmlspecialchars(getConfig('site_desc')) . '
'); + $this->theme_initted = true; } @@ -873,7 +878,7 @@ // Protect button if ( $conds['protect'] ) { - switch($this->page->ns->page_protected) + switch($this->page->ns->cdata['protected']) { case PROTECT_FULL: $protect_status = $lang->get('onpage_btn_protect_on'); break; case PROTECT_SEMI: $protect_status = $lang->get('onpage_btn_protect_semi'); break; @@ -885,7 +890,7 @@ $t0 = $label->run(); $menubtn->assign_vars(array( - 'FLAGS' => 'accesskey="p" onclick="ajaxProtect(' . $this->page->ns->page_protected . '); return false;" id="tb_ajax_protect_btn" title="' . $lang->get('onpage_tip_protect') . '"', + 'FLAGS' => 'accesskey="p" onclick="ajaxProtect(' . $this->page->ns->cdata['protected'] . '); return false;" id="tb_ajax_protect_btn" title="' . $lang->get('onpage_tip_protect') . '"', 'HREF' => makeUrl($local_page, 'do=protect', true), 'TEXT' => $lang->get('onpage_btn_protect_change') )); @@ -2863,8 +2868,9 @@ } return $ds; } - function get_css($s = false) { - if($s) + function get_css($s = false) + { + if ( $s ) return $this->process_template('css/'.$s); else return $this->process_template('css/'.$this->style.'.css');