Thread: [Openfirst-cvscommit] update install.php,1.3,1.4 selectinstalldir.php,1.3,1.4 system.php,1.10,1.11
Brought to you by:
xtimg
From: Tim G. <xt...@us...> - 2004-12-01 17:52:49
|
Update of /cvsroot/openfirst/update In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13965 Modified Files: install.php selectinstalldir.php system.php Log Message: Update status as to whether or not a package is enabled for automatic updates, finish up uploading/creation of globals.php, add marker where actual file installations will go Index: selectinstalldir.php =================================================================== RCS file: /cvsroot/openfirst/update/selectinstalldir.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** selectinstalldir.php 30 Nov 2004 21:55:32 -0000 1.3 --- selectinstalldir.php 1 Dec 2004 17:52:40 -0000 1.4 *************** *** 18,21 **** --- 18,46 ---- + ftp_chdir($ftpreachable, $system->installdirectory . "/config/"); + + + // Update database configuration entries (used as a backup incase globals.php is deleted.) + mysql_query("UPDATE ofirst_systems SET + dbasetype='" . $_REQUEST["dbasetype"] . "', + peardb='" . $_REQUEST["dbasetype"] . "', + ostype='" . $_REQUEST["dbasetype"] . "', + encryption='" . $_REQUEST["dbasetype"] . "', + title='" . $_REQUEST["dbasetype"] . "', + version='" . $_REQUEST["dbasetype"] . "', + sqlserver='" . $_REQUEST["dbasetype"] . "', + sqluser='" . $_REQUEST["dbasetype"] . "', + sqlpassword='" . $_REQUEST["dbasetype"] . "', + sqldatabase='" . $_REQUEST["dbasetype"] . "', + regenabled='" . $_REQUEST["dbasetype"] . "', + home='" . $_REQUEST["dbasetype"] . "', + header='" . $_REQUEST["dbasetype"] . "', + footer='" . $_REQUEST["dbasetype"] . "', + mailnotify='" . $_REQUEST["dbasetype"] . "', + mailfrom='" . $_REQUEST["dbasetype"] . "', + fbasepath='" . $_REQUEST["dbasetype"] . "' + WHERE id='" . $_REQUEST["sysid"] . "' AND owner='$user->id';"); + + // TODO // Run tests to make sure that configuration works successfully. If it does not, abort. *************** *** 24,28 **** - // Write the new globals.php file --- 49,52 ---- *************** *** 178,188 **** fclose($of); ! // TODO: Upload the new globals.php file here. ! // Done. ! // unlink($tmpfname); include_once($footer); --- 202,213 ---- fclose($of); ! ftp_put($ftpreachable, basename($tmpfname), $tmpfname, FTP_ASCII); + ftp_rename($ftpreachable, basename($tmpfname), "globals.php"); // Done. + unlink($tmpfname); ! echo "New configuration file uploaded to server."; include_once($footer); Index: install.php =================================================================== RCS file: /cvsroot/openfirst/update/install.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** install.php 18 Nov 2004 13:02:45 -0000 1.3 --- install.php 1 Dec 2004 17:52:40 -0000 1.4 *************** *** 22,25 **** --- 22,28 ---- $q = mysql_query("INSERT INTO ofirst_system_software (system, package, version) VALUES ('$s->id', '" . $_REQUEST["id"] . "', '" . $_REQUEST["version"] . "');"); echo "Added package to $s->displayname<br>"; + // TODO: Do install here + + } else { echo "Package already being maintained for $s->displayname, no action taken."; Index: system.php =================================================================== RCS file: /cvsroot/openfirst/update/system.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** system.php 19 Nov 2004 22:03:18 -0000 1.10 --- system.php 1 Dec 2004 17:52:40 -0000 1.11 *************** *** 28,32 **** <img src='network.png'></th><td> <a href='system.php?id=$s->id'>$s->displayname</a></td><td> ! [ <a href=\"javascript: alert('Remove system functionality has not been added yet.');\">Remove System</a> | <a href='selectinstalldir.php?sysid=$s->id'>Change installation directory</a> ] </td></tr>"; } --- 28,32 ---- <img src='network.png'></th><td> <a href='system.php?id=$s->id'>$s->displayname</a></td><td> ! [ <a href=\"javascript: alert('Remove system functionality has not been added yet.');\">Remove System</a> | <a href='selectinstalldir.php?sysid=$s->id'>Change installation information</a> ] </td></tr>"; } *************** *** 58,62 **** $system = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_systems WHERE id='" . mysql_insert_id() . "' AND owner='$user->id';")); ! include("selectinstalldir.php"); // Add as a new system --- 58,64 ---- $system = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_systems WHERE id='" . mysql_insert_id() . "' AND owner='$user->id';")); ! if(! isset($system->installdirectory) || $system->installdirectory == "") { ! include("selectinstalldir.php"); ! } // Add as a new system *************** *** 96,100 **** $system = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_systems WHERE id='" . $_REQUEST["id"] . "' AND owner='$user->id';")); ! include("selectinstalldir.php"); // Update existing system configuration --- 98,104 ---- $system = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_systems WHERE id='" . $_REQUEST["id"] . "' AND owner='$user->id';")); ! if(! isset($system->installdirectory) || $system->installdirectory == "") { ! include("selectinstalldir.php"); ! } // Update existing system configuration *************** *** 254,258 **** $p = mysql_fetch_object($pq); $v = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_directory_software_versions WHERE id='$s->version';")); ! echo "<input type='checkbox' name='$s->id' value='$s->id'>$p->name (version: $v->versionname) [<a href=\"javascript: alert('Remove functionality for packages has not yet been implemented.');\">Remove</a>]<br />"; } } --- 258,264 ---- $p = mysql_fetch_object($pq); $v = mysql_fetch_object(mysql_query("SELECT * FROM ofirst_directory_software_versions WHERE id='$s->version';")); ! echo "<input type='checkbox' name='$s->id' value='$s->id'"; ! if(mysql_num_rows(mysql_query("SELECT * FROM ofirst_system_software WHERE id='$s->id' AND autoupdate='1'")) > 0) { echo "checked='checked'"; } ! echo">$p->name (version: $v->versionname) [<a href=\"javascript: alert('Remove functionality for packages has not yet been implemented.');\">Remove</a>]<br />"; } } |