Fixed tooltip in Powered By Enano button on the sidebar. It called $lang->get() without checking to see if languages were initted yet.
authorDan
Tue, 05 Aug 2008 11:12:01 -0400
changeset 674 f514dc675f32
parent 673 99c617146a34
child 675 872f0048dd81
Fixed tooltip in Powered By Enano button on the sidebar. It called $lang->get() without checking to see if languages were initted yet.
includes/template.php
--- a/includes/template.php	Tue Jul 29 09:53:42 2008 -0600
+++ b/includes/template.php	Tue Aug 05 11:12:01 2008 -0400
@@ -194,7 +194,7 @@
     global $lang;
     
     // generate the fading button - needs to be done after sessions are started
-    $admintitle = ( $session->user_level >= USER_LEVEL_ADMIN ) ? ' title="' . $lang->get('sidebar_btn_enanopowered_admin_tip') . '"' : '';
+    $admintitle = ( $session->user_level >= USER_LEVEL_ADMIN && is_object(@$lang) ) ? ' title="' . $lang->get('sidebar_btn_enanopowered_admin_tip') . '"' : '';
     $this->fading_button = '<div style="background-image: url('.cdnPath.'/images/about-powered-enano-hover.png); background-repeat: no-repeat; width: 88px; height: 31px; margin: 0 auto 5px auto;">
                               <a style="background-image: none; padding-right: 0;" href="http://enanocms.org/" onclick="window.open(this.href); return false;"' . $admintitle . '><img style="border-width: 0;" alt=" " src="'.cdnPath.'/images/about-powered-enano.png" onmouseover="domOpacity(this, 100, 0, 500);" onmouseout="domOpacity(this, 0, 100, 500);" /></a>
                             </div>';