A bit more refactoring.
authoranuko <support@anuko.com>
Sun, 14 Jan 2018 13:52:26 +0000 (13:52 +0000)
committeranuko <support@anuko.com>
Sun, 14 Jan 2018 13:52:26 +0000 (13:52 +0000)
WEB-INF/lib/Auth.class.php
WEB-INF/lib/auth/Auth_ldap.class.php
WEB-INF/templates/footer.tpl
access_denied.php
initialize.php
mobile/access_denied.php

index 2c3c657..354d34b 100644 (file)
@@ -36,7 +36,8 @@ class Auth {
 //          die ("Your browser's cookie functionality is turned off. Please turn it on.");
 //        }
 
-      $GLOBALS['SMARTY']->assign('authenticated', true); // Used in header.tpl for menu display.
+      global $smarty;
+      $smarty->assign('authenticated', true); // Used in header.tpl for menu display.
       return true;
     }
     session_write_close();
index f99d752..e17b6e7 100644 (file)
@@ -53,10 +53,9 @@ class Auth_ldap extends Auth {
 
   function __construct($params)
   {
+    global $smarty;
     $this->params = $params;
-    if (isset($GLOBALS['smarty'])) {
-      $GLOBALS['smarty']->assign('Auth_ldap_params', $this->params);
-    }
+    $smarty->assign('Auth_ldap_params', $this->params);
   }
 
   function ldap_escape($str){
index 1279cfa..7c5a8ab 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.13.15.3746 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.13.15.3747 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index d5c58fe..65a5ed7 100644 (file)
@@ -29,7 +29,7 @@
 require_once('initialize.php');
 
 $err->add($i18n->getKey('error.access_denied'));
-if ($auth->isAuthenticated()) $GLOBALS['SMARTY']->assign('authenticated', true); // Used in header.tpl for menu display.
+if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display.
 
 $smarty->assign('title', $i18n->getKey('label.error'));
 $smarty->assign('content_page_name', 'access_denied.tpl');
index 689925d..c1a8437 100644 (file)
@@ -74,7 +74,6 @@ $smarty = new Smarty;
 $smarty->use_sub_dirs = false;
 $smarty->template_dir = TEMPLATE_DIR;
 $smarty->compile_dir  = TEMPLATE_DIR.'_c';
-$GLOBALS['SMARTY'] = &$smarty;
 
 // Note: these 3 settings below used to be in .htaccess file. Moved them here to eliminate "error 500" problems
 // with some shared hostings that do not have AllowOverride Options or AllowOverride All in their apache configurations.
index 836579a..b0bc002 100644 (file)
@@ -29,7 +29,7 @@
 require_once('../initialize.php');
 
 $err->add($i18n->getKey('error.access_denied'));
-if ($auth->isAuthenticated()) $GLOBALS['SMARTY']->assign('authenticated', true); // Used in header.tpl for menu display.
+if ($auth->isAuthenticated()) $smarty->assign('authenticated', true); // Used in header.tpl for menu display.
 
 $smarty->assign('title', $i18n->getKey('label.error'));
 $smarty->assign('content_page_name', 'mobile/access_denied.tpl');