Changeset 747
- Timestamp:
- 09/11/05 02:39:23 (8 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 3 modified
-
ChangeLog (modified) (1 diff)
-
wifidog/admin/graph_common.inc.php (modified) (1 diff)
-
wifidog/classes/Dependencies.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/ChangeLog
r745 r747 1 2005-09-10 Francois Proulx <francois.proulx@gmail.com> 2 * Fixed dependency check 3 1 4 2005-09-10 Francois Proulx <francois.proulx@gmail.com> 2 5 * Removed many blank lines after php tags -
trunk/wifidog-auth/wifidog/admin/graph_common.inc.php
r745 r747 25 25 require_once BASEPATH.'admin/admin_common.php'; 26 26 27 if (!$_REQUEST["date_from"]) 28 $_REQUEST["date_from"] = strftime("%Y-%m-%d 00:00"); 29 if (!$_REQUEST["date_to"]) 30 $_REQUEST["date_to"] = strftime("%Y-%m-%d 11:59"); 31 32 $date_constraint = "AND timestamp_in >= '{$_REQUEST['date_from']}' AND timestamp_in <= '{$_REQUEST['date_to']}'"; 33 34 $node_id = isset($_REQUEST["node_id"]) ? $db->EscapeString($_REQUEST["node_id"]) : null; 35 $user_id = isset($_REQUEST["user_id"]) ? $db->EscapeString($_REQUEST["user_id"]) : null; 36 $network_id = isset($_REQUEST["network_id"]) ? $db->EscapeString($_REQUEST["network_id"]) : null; 27 // Make sure the depency is met 28 if (Dependencies::check("ImageGraph", $errmsg)) { 29 if (!$_REQUEST["date_from"]) 30 $_REQUEST["date_from"] = strftime("%Y-%m-%d 00:00"); 31 if (!$_REQUEST["date_to"]) 32 $_REQUEST["date_to"] = strftime("%Y-%m-%d 11:59"); 33 34 $date_constraint = "AND timestamp_in >= '{$_REQUEST['date_from']}' AND timestamp_in <= '{$_REQUEST['date_to']}'"; 35 36 $node_id = isset($_REQUEST["node_id"]) ? $db->EscapeString($_REQUEST["node_id"]) : null; 37 $user_id = isset($_REQUEST["user_id"]) ? $db->EscapeString($_REQUEST["user_id"]) : null; 38 $network_id = isset($_REQUEST["network_id"]) ? $db->EscapeString($_REQUEST["network_id"]) : null; 39 } 37 40 38 41 ?> -
trunk/wifidog-auth/wifidog/classes/Dependencies.php
r745 r747 1 1 <?php 2 3 2 4 /********************************************************************\ 3 5 * This program is free software; you can redistribute it and/or * … … 25 27 class Dependencies 26 28 { 27 static public function check($component, & $errmsg) { 28 $components = array( 29 "ImageGraph" => array( 30 "name" => "PEAR::Image_Graph", 31 "file" => "Image/Graph.php" 32 ) 33 ); 29 static public function check($component, & $errmsg) 30 { 31 $components = array ("ImageGraph" => array ("name" => "PEAR::Image_Graph", "file" => "Image/Graph.php")); 34 32 35 if (isset($components[$component])) { 36 $component_info = $components[$component]; 37 38 if (file_exists($component_info["file"])) { 39 40 if (include_once($component_info["file"])) { 41 return true; 42 } else { 43 $errmsg = $component_info["name"] . _(" is not working properly"); 44 return false; 45 } 46 47 } else { 48 $errmsg = $component_info["name"] . _(" is not installed"); 49 return false; 50 } 51 } else { 52 throw new Exception("Component not found"); 53 } 54 } 33 if (isset ($components[$component])) 34 { 35 $component_info = $components[$component]; 36 if (include_once ($component_info["file"])) 37 return true; 38 else 39 { 40 $errmsg = $component_info["name"]._(" is not installed"); 41 return false; 42 } 43 } 44 else 45 throw new Exception("Component not found"); 46 } 55 47 56 48 } // End class
