Changeset 925

Show
Ignore:
Timestamp:
01/24/06 23:37:19 (7 years ago)
Author:
benoitg
Message:

* Dependencies.php: We missed yet another instance of non-unifrom code for path detection.

The Dependencies class now uses the code in include/path_defines_base.php like the rest of the system.
Also make it return more usefull error messages.

* SmartyWifidog?.php: Output the error returned by Dependencies if Smarty cannot be found for some reason.

Location:
trunk/wifidog-auth
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/wifidog-auth/CHANGELOG

    r921 r925  
     12006-01-24 Benoit Grégoire  <bock@step.polymtl.ca> 
     2        * Dependencies.php:  We missed one more instance of non-unifrom code for path detection.   
     3        The Dependencies class now uses the code in include/path_defines_base.php like the rest of the system.   
     4        Also make it return more usefull error messages. 
     5        * SmartyWifidog.php:  Output the error returned by Dependencies if Smarty cannot be found for some reason. 
     6 
    172006-01-23 Max Horváth <max.horvath@maxspot.de> 
    28        * Removed compiled PHPdoc documentation 
  • trunk/wifidog-auth/wifidog/classes/Dependencies.php

    r915 r925  
    4646 
    4747/** 
    48  * This class checks the existence of components required by WiFiDog 
     48 * This class checks the existence of components required by WiFiDog.   
     49 * Note that it implicitely depends on the defines in include/path_defines_base.php 
    4950 * 
    5051 * @package    WiFiDogAuthServer 
     
    124125                        if (self :: $_components[$component]["localLib"]) 
    125126                        { 
    126                                 if (file_exists($_SERVER["DOCUMENT_ROOT"]. (defined('SYSTEM_PATH') ? SYSTEM_PATH : '/').self :: $_components[$component]["file"])) 
     127                $filepath = WIFIDOG_ABS_FILE_PATH.self :: $_components[$component]["file"];  
     128                                if (file_exists($filepath)) 
    127129                                { 
    128130                                        // The component has been found. 
     
    134136                                        require_once ('Locale.php'); 
    135137 
    136                                         $errmsg = self :: $_components[$component]["name"]._(" is not installed"); 
     138                                        $errmsg = sprintf(_("Component %s is not installed (not found in %s)"), self :: $_components[$component]["name"], $filepath); 
    137139                                } 
    138140                        } 
     
    149151                                        // The component has NOT been found. Return error message. 
    150152                                        require_once ('Locale.php'); 
    151  
    152                                         $errmsg = self :: $_components[$component]["name"]._(" is not installed"); 
     153                    $errmsg = sprintf(_("Component %s is not installed (not found in %s)"), self :: $_components[$component]["name"], get_include_path()); 
     154                     
    153155                                } 
    154156                        } 
  • trunk/wifidog-auth/wifidog/classes/SmartyWifidog.php

    r915 r925  
    5555} else { 
    5656    // Build the system_path for the auth-server 
    57     print "Redirection to Wifidog web-base install since Smarty is missing <META HTTP-EQUIV=Refresh CONTENT=\"5; URL=".BASE_URL_PATH."/install.php\">"; 
     57    print "Redirecting to Wifidog web-based install script since Smarty is missing (Error was: $errmsg)<META HTTP-EQUIV=Refresh CONTENT=\"5; URL=".BASE_URL_PATH."/install.php\">"; 
    5858    exit(); 
    5959}