# HG changeset patch # User Dan # Date 1242315264 14400 # Node ID ed84b24b8e070cbd19712c603d53920f2587b97a # Parent 322a9bf1e2807fe43373e89f4dd25742e931a877 A few safety changes to tolerate no $session when it's not available diff -r 322a9bf1e280 -r ed84b24b8e07 includes/functions.php --- a/includes/functions.php Wed May 13 09:49:36 2009 -0400 +++ b/includes/functions.php Thu May 14 11:34:24 2009 -0400 @@ -111,7 +111,7 @@ $sep = '&'; } - $url = $session->append_sid(contentPath.$t.$flags); + $url = is_object($session) ? $session->append_sid(contentPath.$t.$flags) : contentPath . $t . $flags; if($query) { $sep = strstr($url, '?') ? '&' : '?'; diff -r 322a9bf1e280 -r ed84b24b8e07 includes/template.php --- a/includes/template.php Wed May 13 09:49:36 2009 -0400 +++ b/includes/template.php Thu May 14 11:34:24 2009 -0400 @@ -2925,8 +2925,9 @@ $tb = ''; // Get the "article" button text (depends on namespace) if(defined('IN_ENANO_INSTALL') && is_object($lang)) $ns = $lang->get('meta_btn_article'); + else if ( isset($GLOBALS['article_btn']) ) $ns = $GLOBALS['article_btn']; else $ns = 'system error page'; - $t = str_replace('{FLAGS}', 'onclick="return false;" title="Hey! A button that doesn\'t do anything. Clever..." accesskey="a"', $tplvars['toolbar_button']); + $t = str_replace('{FLAGS}', 'onclick="return false;" class="current" title="Hey! A button that doesn\'t do anything. Clever..." accesskey="a"', $tplvars['toolbar_button']); $t = str_replace('{HREF}', '#', $t); $t = str_replace('{TEXT}', $ns, $t); $tb .= $t; diff -r 322a9bf1e280 -r ed84b24b8e07 themes/enanium/header.tpl --- a/themes/enanium/header.tpl Wed May 13 09:49:36 2009 -0400 +++ b/themes/enanium/header.tpl Thu May 14 11:34:24 2009 -0400 @@ -17,6 +17,8 @@