Changeset 751
- Timestamp:
- 09/11/05 23:23:40 (8 years ago)
- Location:
- trunk/wifidog-auth
- Files:
-
- 2 modified
-
ChangeLog (modified) (1 diff)
-
wifidog/classes/Dependencies.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog-auth/ChangeLog
r750 r751 1 2005-09-11 Francois Proulx <francois.proulx@gmail.com> 2 * Fixed dependency check, found a workaround for the file_exists problem 3 1 4 2005-09-11 Francois Proulx <francois.proulx@gmail.com> 2 5 * Added dependency check for Phlickr -
trunk/wifidog-auth/wifidog/classes/Dependencies.php
r750 r751 32 32 $components["ImageGraph"] = array ("name" => "PEAR::Image_Graph", "file" => "Image/Graph.php"); 33 33 $components["Phlickr"] = array ("name" => "PEAR::Phlickr", "file" => "Phlickr/Api.php"); 34 34 35 35 if (isset ($components[$component])) 36 36 { 37 // Since file_exists does not take in account the include_path 38 // Explode paths of include path 39 $path_array = explode( PATH_SEPARATOR, get_include_path()); 37 40 $component_info = $components[$component]; 38 if (include_once ($component_info["file"])) 39 return true; 40 else 41 { 42 $errmsg = $component_info["name"]._(" is not installed"); 43 return false; 44 } 41 42 // For each path or the include path, check if the file exists 43 foreach($path_array as $path) 44 if (file_exists ($path."/".$component_info["file"])) 45 return true; 46 47 // Otherwise, the requirement is not met 48 $errmsg = $component_info["name"]._(" is not installed"); 49 return false; 45 50 } 46 51 else
