[Openfirst-cvscommit] base/config globals.php,1.9,1.10 install.php,1.19,1.20 globals-default.php,1.3
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-05-15 05:26:06
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29179/config Modified Files: globals.php install.php Removed Files: globals-default.php Log Message: -CSS -Syntax error -Beginings of better module support -globals-default.php no longer needed Index: install.php =================================================================== RCS file: /cvsroot/openfirst/base/config/install.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** install.php 3 Apr 2005 00:37:56 -0000 1.19 --- install.php 15 May 2005 05:25:57 -0000 1.20 *************** *** 51,55 **** if(function_exists("glob")) { ! $files = glob("../*/setup/*.$dbasetype"); if (count($files) < 1) { ?> --- 51,55 ---- if(function_exists("glob")) { ! $files = glob("../*/openfirst.info.php"); if (count($files) < 1) { ?> *************** *** 65,72 **** if(isset($_POST[$dir]) == true && $_POST[$dir] == "on") { - $q = ofirst_dbquery("CREATE table IF NOT EXISTS `ofirst_config` (`modulename` CHAR(25) NOT NULL, - `showonmenu` BOOL, `active` BOOL, `adminnavigation` TEXT, - `modulenavigation` TEXT, `includes` TEXT, PRIMARY KEY (`modulename`));"); - $sf = fopen($filename, "r"); $query = ""; --- 65,68 ---- --- globals-default.php DELETED --- Index: globals.php =================================================================== RCS file: /cvsroot/openfirst/base/config/globals.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** globals.php 14 May 2005 22:44:20 -0000 1.9 --- globals.php 15 May 2005 05:25:57 -0000 1.10 *************** *** 40,44 **** } $path = htmlentities($path); ! die( "You'll have to <a href="$path">set openFIRST up</a> first!" ); } --- 40,44 ---- } $path = htmlentities($path); ! die( "You'll have to <a href=\"$path\">set openFIRST up</a> first!" ); } *************** *** 90,93 **** --- 90,108 ---- $incl = ofirst_dbquery('SELECT * FROM ofirst_config'); + + $Modules = array(); + + function AddModule($code, $name, $version, $includes, $adminnav, $modulenav, $active, $show) { + global $Modules; + $Modules[$code] = array( + 'name' => $name, + 'ver' => $version, + 'inc' => $includes, + 'admin' => $adminnav, + 'nav' => $modulenav, + 'active' => (bool)$active, + 'show' => (bool)$show + ); + } // If there is no error then run the module add feature *************** *** 95,98 **** --- 110,122 ---- // Begin to loop through modules from the databaes while($module = ofirst_dbfetch_object($incl)) { + AddModule($module->modulename, + $module->modulename, + '', #Version + explode(',', $module->includes), + $module->adminnavigation, + $module->modulenavigation, + $module->active, + $module->showonmenu + ); // Check if the value is try, if it is then run an include if($module->active == true) { *************** *** 118,122 **** // If it is the current module then color the item if ($currentmodule == $module->modulename){ ! $headers .= " » <font color='red'><u><a class='menu' href='$basepath/$module->modulename'>".ucwords($module->modulename)."</a></u></font> | "; --- 142,146 ---- // If it is the current module then color the item if ($currentmodule == $module->modulename){ ! $headers .= " » <a class='menu selected' href='$basepath/$module->modulename'>".ucwords($module->modulename)."</a> | "; |