From: Greg M. <bli...@us...> - 2004-11-24 21:23:56
|
Update of /cvsroot/phpwsscoreboard/scoreboard/boost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24258/boost Modified Files: install.php uninstall.php update.php Log Message: Getting ready for phpWebSite 0.10.0 and removed deprecated defines Index: uninstall.php =================================================================== RCS file: /cvsroot/phpwsscoreboard/scoreboard/boost/uninstall.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** uninstall.php 6 Dec 2003 05:11:50 -0000 1.2 --- uninstall.php 24 Nov 2004 21:23:46 -0000 1.3 *************** *** 4,9 **** * * @version $Id$ ! * @author Greg Meiste <me...@ms...> */ if (!$_SESSION["OBJ_user"]->isDeity()){ header("location:index.php"); --- 4,10 ---- * * @version $Id$ ! * @author Greg Meiste <blindman1344 [at] users dot sourceforge dot net> */ + if (!$_SESSION["OBJ_user"]->isDeity()){ header("location:index.php"); *************** *** 14,23 **** $content .= "All Scoreboard tables successfully removed.<br />"; - CLS_help::uninstall_help("scoreboard"); - $content .= "Scoreboard successfully removed from Help Module.<br /><br />"; $status = 1; } else { ! $content .= "There was a problem accessing the database.<br />"; $status = 0; } ! ?> --- 15,23 ---- $content .= "All Scoreboard tables successfully removed.<br />"; $status = 1; } else { ! $content .= "There was a problem accessing the database.<br />"; $status = 0; } ! ! ?> \ No newline at end of file Index: install.php =================================================================== RCS file: /cvsroot/phpwsscoreboard/scoreboard/boost/install.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** install.php 6 Dec 2003 05:11:50 -0000 1.2 --- install.php 24 Nov 2004 21:23:46 -0000 1.3 *************** *** 2,7 **** /** * @version $Id$ ! * @author Greg Meiste <me...@ms...> */ if (!$_SESSION["OBJ_user"]->isDeity()){ header("location:index.php"); --- 2,8 ---- /** * @version $Id$ ! * @author Greg Meiste <blindman1344 [at] users dot sourceforge dot net> */ + if (!$_SESSION["OBJ_user"]->isDeity()){ header("location:index.php"); *************** *** 10,28 **** // Need to do core version check ! if($GLOBALS["core"]->version < "0.9.3-1") { ! $content .= "This module requires a phpWebSite core version of 0.9.3-1 or greater to install.<br />"; ! $content .= "<br />You are currently using phpWebSite core version " . $GLOBALS["core"]->version . ".<br />"; return; } ! if($GLOBALS["core"]->sqlImport(PHPWS_SOURCE_DIR . "mod/scoreboard/boost/install.sql", TRUE)) { ! $content .= "All Scoreboard tables successfully written.<br />"; ! ! CLS_help::setup_help("scoreboard"); ! $content .= "Scoreboard registered with Help module.<br />"; ! $status = 1; ! } else ! $content .= "There was a problem writing to the database.<br />"; ! ?> --- 11,28 ---- // Need to do core version check ! if(version_compare($GLOBALS['core']->version, "0.9.3-3") < 0) { ! $content .= "This module requires a phpWebSite core version of 0.9.3-3 or greater to install.<br />"; ! $content .= "You are currently using phpWebSite core version " . $GLOBALS["core"]->version . ".<br />"; return; } ! if($GLOBALS["core"]->sqlImport(PHPWS_SOURCE_DIR . "mod/scoreboard/boost/install.sql", TRUE)) { ! $content .= "All Scoreboard tables successfully written.<br />"; ! $status = 1; ! } else { ! $content .= "There was a problem writing to the database.<br />"; ! $status = 0; ! } ! ?> \ No newline at end of file Index: update.php =================================================================== RCS file: /cvsroot/phpwsscoreboard/scoreboard/boost/update.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** update.php 24 Dec 2003 01:01:40 -0000 1.3 --- update.php 24 Nov 2004 21:23:46 -0000 1.4 *************** *** 1,3 **** --- 1,9 ---- <?php + /** + * This is the update file for Scoreboard. It is used by Boost. + * + * @version $Id$ + * @author Greg Meiste <blindman1344 [at] users dot sourceforge dot net> + */ if (!$_SESSION["OBJ_user"]->isDeity()){ *************** *** 7,16 **** // Need to do core version check ! if($GLOBALS["core"]->version < "0.9.3-1") { ! $content .= "This module requires a phpWebSite core version of 0.9.3-1 or greater to install.<br />"; ! $content .= "<br />You are currently using phpWebSite core version " . $GLOBALS["core"]->version . ".<br />"; return; } $status = 1; --- 13,24 ---- // Need to do core version check ! if(version_compare($GLOBALS['core']->version, "0.9.3-3") { ! $content .= "This module requires a phpWebSite core version of 0.9.3-3 or greater to install.<br />"; ! $content .= "You are currently using phpWebSite core version " . $GLOBALS["core"]->version . ".<br />"; return; } + require_once(PHPWS_SOURCE_DIR . "mod/help/class/CLS_help.php"); + $status = 1; *************** *** 18,33 **** $content .= "Updating Scoreboard to version 0.91<br />"; $content .= "Adding columns \"status\" and \"numCol\" to \"mod_scoreboard_conf\"."; ! $sql = "ALTER TABLE " . PHPWS_TBL_PREFIX . ! "mod_scoreboard_conf ADD (status varchar(4) NOT NULL, ! numCol int NOT NULL)"; ! $GLOBALS["core"]->query($sql); $content .= "<br />Columns added successfully!<br />"; ! $sql = "UPDATE " . PHPWS_TBL_PREFIX . "mod_scoreboard_conf SET status=\"on\", numCol=2"; ! $GLOBALS["core"]->query($sql); $content .= "Configuration settings updated!<br />"; ! $sql = "CREATE TABLE " . PHPWS_TBL_PREFIX . "mod_scoreboard_links ( scoreID int NOT NULL, announceID int NOT NULL, --- 26,39 ---- $content .= "Updating Scoreboard to version 0.91<br />"; $content .= "Adding columns \"status\" and \"numCol\" to \"mod_scoreboard_conf\"."; ! $sql = "ALTER TABLE mod_scoreboard_conf ADD (status varchar(4) NOT NULL, numCol int NOT NULL)"; ! $GLOBALS["core"]->query($sql, TRUE); $content .= "<br />Columns added successfully!<br />"; ! $sql = "UPDATE mod_scoreboard_conf SET status=\"on\", numCol=2"; ! $GLOBALS["core"]->query($sql, TRUE); $content .= "Configuration settings updated!<br />"; ! $sql = "CREATE TABLE mod_scoreboard_links ( scoreID int NOT NULL, announceID int NOT NULL, *************** *** 36,40 **** KEY announceID (announceID) )"; ! $GLOBALS["core"]->query($sql); $content .= "Announcement Links table created!<br />"; --- 42,46 ---- KEY announceID (announceID) )"; ! $GLOBALS["core"]->query($sql, TRUE); $content .= "Announcement Links table created!<br />"; *************** *** 49,64 **** $content .= "Updating Scoreboard to version 0.92<br />"; $content .= "Adding \"ordinal\" column to the \"mod_scoreboard_sports\" table.<br />"; ! $sql = "ALTER TABLE " . PHPWS_TBL_PREFIX . "mod_scoreboard_sports ADD ordinal int NOT NULL"; ! $GLOBALS["core"]->query($sql); $content .= "Column added successfully.<br />"; $content .= "Setting ordinals for all sports to their sport ID.<br />"; ! $sql = "SELECT id FROM " . PHPWS_TBL_PREFIX . "mod_scoreboard_sports"; ! $result = $GLOBALS["core"]->getAll($sql); if(sizeof($result) > 0) { $i = 0; foreach($result as $row) { ! $sql = "UPDATE " . PHPWS_TBL_PREFIX . "mod_scoreboard_sports SET ordinal=id WHERE id=" . $row["id"]; ! $GLOBALS["core"]->query($sql); $i++; } --- 55,70 ---- $content .= "Updating Scoreboard to version 0.92<br />"; $content .= "Adding \"ordinal\" column to the \"mod_scoreboard_sports\" table.<br />"; ! $sql = "ALTER TABLE mod_scoreboard_sports ADD ordinal int NOT NULL"; ! $GLOBALS["core"]->query($sql, TRUE); $content .= "Column added successfully.<br />"; $content .= "Setting ordinals for all sports to their sport ID.<br />"; ! $sql = "SELECT id FROM mod_scoreboard_sports"; ! $result = $GLOBALS["core"]->getAll($sql, TRUE); if(sizeof($result) > 0) { $i = 0; foreach($result as $row) { ! $sql = "UPDATE mod_scoreboard_sports SET ordinal=id WHERE id=" . $row["id"]; ! $GLOBALS["core"]->query($sql, TRUE); $i++; } *************** *** 70,79 **** $content .= "Adding \"ordinal\" column to the \"mod_scoreboard_conf\" table.<br />"; ! $sql = "ALTER TABLE " . PHPWS_TBL_PREFIX . "mod_scoreboard_conf ADD (ordinal varchar(5) NOT NULL)"; ! $GLOBALS["core"]->query($sql); $content .= "Column added successfully.<br />"; ! $sql = "UPDATE " . PHPWS_TBL_PREFIX . "mod_scoreboard_conf SET ordinal=\"asc\""; ! $GLOBALS["core"]->query($sql); $content .= "Configuration settings updated!<br />"; --- 76,85 ---- $content .= "Adding \"ordinal\" column to the \"mod_scoreboard_conf\" table.<br />"; ! $sql = "ALTER TABLE mod_scoreboard_conf ADD (ordinal varchar(5) NOT NULL)"; ! $GLOBALS["core"]->query($sql, TRUE); $content .= "Column added successfully.<br />"; ! $sql = "UPDATE mod_scoreboard_conf SET ordinal=\"asc\""; ! $GLOBALS["core"]->query($sql, TRUE); $content .= "Configuration settings updated!<br />"; *************** *** 91,99 **** $content .= "Adding \"nextgame\" column to the \"mod_scoreboard_sports\" table.<br />"; ! $sql = "ALTER TABLE " . PHPWS_TBL_PREFIX . "mod_scoreboard_sports ADD nextgame int"; ! $GLOBALS["core"]->query($sql); $content .= "Column added successfully.<br />"; ! $sql = "CREATE TABLE " . PHPWS_TBL_PREFIX . "mod_scoreboard_boxscores ( id int PRIMARY KEY, scoreID int NOT NULL, --- 97,105 ---- $content .= "Adding \"nextgame\" column to the \"mod_scoreboard_sports\" table.<br />"; ! $sql = "ALTER TABLE mod_scoreboard_sports ADD nextgame int"; ! $GLOBALS["core"]->query($sql, TRUE); $content .= "Column added successfully.<br />"; ! $sql = "CREATE TABLE mod_scoreboard_boxscores ( id int PRIMARY KEY, scoreID int NOT NULL, *************** *** 105,109 **** numRows text )"; ! $GLOBALS["core"]->query($sql); $content .= "Boxscores table created!<br />"; } --- 111,115 ---- numRows text )"; ! $GLOBALS["core"]->query($sql, TRUE); $content .= "Boxscores table created!<br />"; } *************** *** 115,117 **** $content .= "- Boxscore template now has justification ability<br />"; } ! ?> --- 121,130 ---- $content .= "- Boxscore template now has justification ability<br />"; } ! ! if($currentVersion < 0.95) { ! $content .= "<br />Scoreboard Updates for Version 0.9.5<br />"; ! $content .= "------------------------------------------<br />"; ! $content .= "- Now compatible with phpWebSite 0.10.0<br />"; ! } ! ! ?> \ No newline at end of file |