[Openfirst-cvscommit] base/config base.sql,NONE,1.1 first.php,1.62,1.63 openfirst.info.xml,1.3,1.4
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-07-18 22:34:42
|
Update of /cvsroot/openfirst/base/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31000/config Modified Files: first.php openfirst.info.xml Added Files: base.sql Log Message: Fixes for installation script --- NEW FILE: base.sql --- -- phpMyAdmin SQL Dump -- version 2.6.2-rc1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 18, 2005 at 06:19 PM -- Server version: 4.0.21 -- PHP Version: 5.0.2 -- -- Database: `of_release` -- -- -------------------------------------------------------- -- -- Table structure for table `ofirst_config` -- CREATE TABLE `ofirst_config` ( `modulename` varchar(25) NOT NULL default '', `dir` varchar(25) NOT NULL default '', `UpdateDate` datetime NOT NULL default '0000-00-00 00:00:00', `label` varchar(25) default NULL, `Author` tinytext, `Maintainer` tinytext, `version` varchar(10) NOT NULL default 'CVS', `showonmenu` tinyint(1) NOT NULL default '0', `active` tinyint(1) NOT NULL default '0', `adminnavigation` text, `modulenavigation` text, `includes` text, UNIQUE KEY `dir` (`dir`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `ofirst_members` -- CREATE TABLE `ofirst_members` ( `user` varchar(128) default NULL, `firstname` tinytext, `lastname` tinytext, `lastseen` tinytext, `ip` tinytext, `password` text, `authcode` text, `membertype` tinytext, `division` tinytext, `year` int(11) default NULL, `email` text, `icq` int(11) default NULL, `aim` tinytext, `msn` tinytext, `yim` tinytext, `description` text, `signature` tinytext, `dateregistered` tinytext, `picturelocation` tinytext, `team` int(11) default NULL, `skills` text, UNIQUE KEY `user` (`user`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `ofirst_sitesettings` -- CREATE TABLE `ofirst_sitesettings` ( `ss_module` varchar(25) NOT NULL default '', `ss_setting` varchar(25) NOT NULL default '', `ss_value` longtext, PRIMARY KEY (`ss_module`,`ss_setting`) ) TYPE=MyISAM; -- -------------------------------------------------------- -- -- Table structure for table `ofirst_usersettings` -- CREATE TABLE `ofirst_usersettings` ( `us_user` varchar(128) NOT NULL default '', `us_module` varchar(25) NOT NULL default '', `us_setting` varchar(25) NOT NULL default '', `us_value` longtext, PRIMARY KEY (`us_user`,`us_module`,`us_setting`) ) TYPE=MyISAM; Index: openfirst.info.xml =================================================================== RCS file: /cvsroot/openfirst/base/config/openfirst.info.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** openfirst.info.xml 29 Jun 2005 21:20:41 -0000 1.3 --- openfirst.info.xml 18 Jul 2005 22:34:33 -0000 1.4 *************** *** 2,6 **** <!-- NOTE: This file defines the basic DB layout when installing or upgrading. openfirst.base is a psuedo-module for the oF core. --> ! <name>openFIRST</name> <version>CVS</version> <author>The openFIRST Team</author> --- 2,6 ---- <!-- NOTE: This file defines the basic DB layout when installing or upgrading. openfirst.base is a psuedo-module for the oF core. --> ! <name>openFIRST portal system</name> <version>CVS</version> <author>The openFIRST Team</author> *************** *** 34,38 **** </table> ! <table id="firstawards"> <fields> <field name="user"><type>varchar<length>128</length></type><not_null /></field> --- 34,38 ---- </table> ! <table id="members"> <fields> <field name="user"><type>varchar<length>128</length></type><not_null /></field> Index: first.php =================================================================== RCS file: /cvsroot/openfirst/base/config/first.php,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** first.php 29 Jun 2005 21:20:40 -0000 1.62 --- first.php 18 Jul 2005 22:34:33 -0000 1.63 *************** *** 36,41 **** $StylePath = 'http://openfirst.sourceforge.net/'; if(isset($_POST["login"])) { ! require_once('auth.php'); InitUser(); // User is attempting to login for the first time. --- 36,42 ---- $StylePath = 'http://openfirst.sourceforge.net/'; + if(isset($_POST["login"])) { ! require_once('../includes/globals.php'); InitUser(); // User is attempting to login for the first time. *************** *** 45,48 **** --- 46,50 ---- } + define('OPENFIRST_INSTALLATION_SCRIPT', true); // Only define if it's the installation script if(isset($_POST["sqlserver"])) { *************** *** 52,60 **** $sqldatabase = $_POST["sqldatabase"]; $fbasepath = realpath($_POST['fbasepath']); ! include_once("$fbasepath/includes/dbase.php"); ! include_once("$fbasepath/includes/auth.php"); ! if(function_exists("ofirst_dbconnect") == false) { ! die("Your version of PHP has not been compiled with MySQL support, therefore the openFIRST web portal system cannot run on this system. Please contact your system administrator to request MySQL support for your version of PHP."); ! } if (!ofirst_dbcreate("$sqlserver","$sqluser","$sqlpassword", $sqldatabase)) echo 'DB/tables creation error: '.ofirst_dberror(); --- 54,59 ---- $sqldatabase = $_POST["sqldatabase"]; $fbasepath = realpath($_POST['fbasepath']); ! include_once("$fbasepath/includes/globals.php"); ! if (!ofirst_dbcreate("$sqlserver","$sqluser","$sqlpassword", $sqldatabase)) echo 'DB/tables creation error: '.ofirst_dberror(); *************** *** 117,121 **** $hfile = fopen("$ConfigFile",'w'); fwrite($hfile, $file); fclose($hfile); - include_once("../includes/globals.php"); include_once($header); echo("<div class=\"success\"><h1>openFIRST Software Configured</h1> --- 116,119 ---- *************** *** 127,131 **** the password for that account has been changed, or the MySQL settings are incorrect.</p>"); showlogin(); ! die(include_once($footer)); } else { echo '<p class="error"><span class="file">'.htmlentities($ConfigFile).'</span> is not writable</p> --- 125,130 ---- the password for that account has been changed, or the MySQL settings are incorrect.</p>"); showlogin(); ! include_once($footer) ! die; } else { echo '<p class="error"><span class="file">'.htmlentities($ConfigFile).'</span> is not writable</p> *************** *** 137,156 **** } echo("<h1 class=\"error\">System Configuration Error</h1> ! <p>Cannot write to configuration file. Please check permissions on <b>globals.php</b> and ensure that the web user has the ability to write to this file.</p> <p>For unix, this would typically require the command: <br /> ! <pre class=\"shell\">cd config ! <br />chmod 666 globals.php</pre></p>"); } } else { ! // Do form ! if(is_readable("style/headers.php")) { ! include_once("style/headers.php"); ! } else { ! include_once("../style/headers.php"); ! } // Detect default options --- 136,152 ---- } echo("<h1 class=\"error\">System Configuration Error</h1> ! <p>Cannot write to configuration file. Please check permissions on <b>".htmlentities(basename($ConfigFile))."</b> and ensure that the web user has the ability to write to this file.</p> <p>For unix, this would typically require the command: <br /> ! <pre class=\"shell\">cd includes ! <br />chmod 666 ".htmlentities(basename($ConfigFile))."</pre></p>"); } } else { ! define('OPENFIRST_NO_INSTALLATION', true); // Do form ! include("../includes/globals.php"); ! include($Header); // Detect default options |