[Openfirst-cvscommit] base/config globals.php,1.10,1.11
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-05-15 22:19:01
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16943/config Modified Files: globals.php Log Message: removed any glob-free portions Index: globals.php =================================================================== RCS file: /cvsroot/openfirst/base/config/globals.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** globals.php 15 May 2005 05:25:57 -0000 1.10 --- globals.php 15 May 2005 22:18:21 -0000 1.11 *************** *** 62,65 **** --- 62,70 ---- } + // We use glob enough, that we should either write a substitute, or just refuse to work + if(!function_exists('glob')) { + die('You really should upgrade PHP, seeing as you don't even have <a href="http://us2.php.net/manual/en/function.glob.php"><code>glob()</code></a>.'); + } + require_once('sitesettings.php'); *************** *** 72,88 **** session_start(); include('auth.php'); ! if(function_exists('glob')) { ! // Include the functions using glob(); ! if(is_readable(getcwd() . "/../config/functions/")) { ! foreach (glob(getcwd() . "/../config/functions/*.php") as $filename) { ! include($filename); ! } ! } elseif (is_readable(getcwd() . "/../../config/functions/")) { ! foreach (glob(getcwd() . "/../../config/functions/*.php") as $filename) { ! include($filename); ! } ! } ! } else { ! // Include the functions without using glob(); } --- 77,83 ---- session_start(); include('auth.php'); ! // Include the functions using glob(); ! foreach (glob("$fbasepath/config/functions/*.php") as $filename) { ! include($filename); } *************** *** 111,116 **** while($module = ofirst_dbfetch_object($incl)) { AddModule($module->modulename, ! $module->modulename, ! '', #Version explode(',', $module->includes), $module->adminnavigation, --- 106,111 ---- while($module = ofirst_dbfetch_object($incl)) { AddModule($module->modulename, ! $module->label, ! $module->version, explode(',', $module->includes), $module->adminnavigation, |