Show
Ignore:
Timestamp:
07/26/07 13:11:44 (6 years ago)
Author:
benoitg
Message:
  • DependenciesList::hook_menu(): Fix menu path conflict with Server::hook_menu();
  • Server::getAdminUI(): Add output to help debug timezone problems.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/wifidog/classes/Server.php

    r1253 r1273  
    221221    public function getAdminUI() 
    222222    { 
    223                 Security::requirePermission(Permission::P('SERVER_PERM_EDIT_SERVER_CONFIG'), $this); 
     223        Security::requirePermission(Permission::P('SERVER_PERM_EDIT_SERVER_CONFIG'), $this); 
    224224        // Init values 
     225        $db = AbstractDb::getObject(); 
    225226        $html = ''; 
    226227 
     
    248249        $html .= "</div>\n"; 
    249250        $html .= "</li>\n"; 
     251 
     252        //timezone check 
     253 
     254        $html .= "<li class='admin_element_item_container'>\n"; 
     255        $html .= "<div class='admin_element_label'>" . _("Timezone check:  The following must be in the same timezone") . ":</div>\n"; 
     256        $html .= "<div class='admin_element_data'>\n"; 
     257        $html .= "<p>"; 
     258        $db->execSqlUniqueRes("SHOW timezone", $row, false); 
     259        $html .= " ".sprintf(_("Timezone from postgresql: %s"), $row['TimeZone'])."</p>"; // Version < 5.0.0 
     260        $date_default_timezone_get = 'date_default_timezone_get'; 
     261        is_callable($date_default_timezone_get)?$phpTimezone = date_default_timezone_get():$phpTimezone = "Requires PHP 5.1 to tell"; 
     262        $html .= " ".sprintf(_("Timezone from PHP: %s"), $phpTimezone)."</p>"; // Version < 5.0.0 
     263          
     264        $html .= "</div>\n"; 
     265        $html .= "</li>\n"; 
     266 
     267 
     268 
    250269        /* 
    251270         * Access rights