From: Don S. <ri...@us...> - 2004-09-09 21:51:09
|
Update of /cvsroot/phpwsbb/phpwsbb/boost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18184/boost Modified Files: install.php update.php Log Message: Changing to use version_compare() Index: install.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/boost/install.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** install.php 11 Aug 2004 02:10:24 -0000 1.19 --- install.php 9 Sep 2004 21:51:00 -0000 1.20 *************** *** 31,35 **** // Need to do core version check ! if($GLOBALS["core"]->version < "0.9.3-4") { $content .= "This module requires a phpWebSite core version of 0.9.3-4 or greater to install.<br />"; $content .= "<br />You are currently using phpWebSite core version " . $GLOBALS["core"]->version . ".<br />"; --- 31,35 ---- // Need to do core version check ! if(version_compare($GLOBALS["core"]->version, "0.9.3-4") < 0) { $content .= "This module requires a phpWebSite core version of 0.9.3-4 or greater to install.<br />"; $content .= "<br />You are currently using phpWebSite core version " . $GLOBALS["core"]->version . ".<br />"; Index: update.php =================================================================== RCS file: /cvsroot/phpwsbb/phpwsbb/boost/update.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** update.php 13 Aug 2004 21:32:36 -0000 1.34 --- update.php 9 Sep 2004 21:51:00 -0000 1.35 *************** *** 29,33 **** // Need to do core version check ! if($GLOBALS["core"]->version < "0.9.3-4") { $content .= "This module requires a phpWebSite core version of 0.9.3-4 or greater to install.<br />"; $content .= "<br />You are currently using phpWebSite core version " . $GLOBALS["core"]->version . ".<br />"; --- 29,33 ---- // Need to do core version check ! if(version_compare($GLOBALS["core"]->version, "0.9.3-4") < 0) { $content .= "This module requires a phpWebSite core version of 0.9.3-4 or greater to install.<br />"; $content .= "<br />You are currently using phpWebSite core version " . $GLOBALS["core"]->version . ".<br />"; *************** *** 52,56 **** $status = 1; ! if($currentVersion < "0.4.0") { if ($status = $GLOBALS["core"]->sqlImport(PHPWS_SOURCE_DIR . "mod/phpwsbb/boost/update040.sql", TRUE)) { $content .= "All phpwsBB tables successfully updated.<br />"; --- 52,56 ---- $status = 1; ! if(version_compare($currentVersion, "0.4.0") < 0) { if ($status = $GLOBALS["core"]->sqlImport(PHPWS_SOURCE_DIR . "mod/phpwsbb/boost/update040.sql", TRUE)) { $content .= "All phpwsBB tables successfully updated.<br />"; *************** *** 61,65 **** } ! if($currentVersion < "0.5.0") { if($status = $GLOBALS["core"]->query("ALTER TABLE mod_phpwsbb_settings ADD admin_email varchar(80), ADD email_text text, ADD monitor_posts smallint", TRUE)) { $content .= "phpwsBB settings table successfully modified.<br />"; --- 61,65 ---- } ! if(version_compare($currentVersion, "0.5.0") < 0) { if($status = $GLOBALS["core"]->query("ALTER TABLE mod_phpwsbb_settings ADD admin_email varchar(80), ADD email_text text, ADD monitor_posts smallint", TRUE)) { $content .= "phpwsBB settings table successfully modified.<br />"; *************** *** 74,78 **** } ! if($currentVersion < "0.5.2") { // Remove hard-coded labels in subjects $content .= "Updating labels in sticky and locked threads ...<br />"; --- 74,78 ---- } ! if(version_compare($currentVersion, "0.5.2") < 0) { // Remove hard-coded labels in subjects $content .= "Updating labels in sticky and locked threads ...<br />"; *************** *** 99,103 **** } ! if($currentVersion < "0.5.3") { // Remove hard-coded labels in subjects $content .= "Updating labels in messages ...<br />"; --- 99,103 ---- } ! if(version_compare($currentVersion, "0.5.3") < 0) { // Remove hard-coded labels in subjects $content .= "Updating labels in messages ...<br />"; *************** *** 124,128 **** } ! if($currentVersion < "0.6.0") { if ($status = $GLOBALS["core"]->sqlImport(PHPWS_SOURCE_DIR . "mod/phpwsbb/boost/update060.sql", TRUE)) { $content .= "All phpwsBB tables successfully updated.<br />"; --- 124,128 ---- } ! if(version_compare($currentVersion, "0.6.0") < 0) { if ($status = $GLOBALS["core"]->sqlImport(PHPWS_SOURCE_DIR . "mod/phpwsbb/boost/update060.sql", TRUE)) { $content .= "All phpwsBB tables successfully updated.<br />"; *************** *** 164,168 **** } ! if($currentVersion < "0.7.0") { if($status = $GLOBALS["core"]->sqlCreateIndex("mod_phpwsbb_threads",array("fid"))) if($status = $GLOBALS["core"]->sqlCreateIndex("mod_phpwsbb_messages",array("tid"))) --- 164,168 ---- } ! if(version_compare($currentVersion, "0.7.0") < 0) { if($status = $GLOBALS["core"]->sqlCreateIndex("mod_phpwsbb_threads",array("fid"))) if($status = $GLOBALS["core"]->sqlCreateIndex("mod_phpwsbb_messages",array("tid"))) *************** *** 171,175 **** } ! if($currentVersion < "0.8.0") { if($status = $GLOBALS["core"]->query("ALTER TABLE mod_phpwsbb_threads ADD lastpost int NOT NULL default 0", TRUE)) { if($status = $GLOBALS["core"]->query("ALTER TABLE mod_phpwsbb_forums ADD lastpost int NOT NULL default 0", TRUE)) { --- 171,175 ---- } ! if(version_compare($currentVersion, "0.8.0") < 0) { if($status = $GLOBALS["core"]->query("ALTER TABLE mod_phpwsbb_threads ADD lastpost int NOT NULL default 0", TRUE)) { if($status = $GLOBALS["core"]->query("ALTER TABLE mod_phpwsbb_forums ADD lastpost int NOT NULL default 0", TRUE)) { *************** *** 209,213 **** } ! if($currentVersion < "0.9.0") { if($status = $GLOBALS["core"]->query("ALTER TABLE mod_phpwsbb_settings ADD bboffline smallint NOT NULL default '0', ADD allow_user_monitors smallint NOT NULL default '1'", TRUE)) { $content .= "phpwsBB settings table successfully updated.<br />"; --- 209,213 ---- } ! if(version_compare($currentVersion, "0.9.0") < 0) { if($status = $GLOBALS["core"]->query("ALTER TABLE mod_phpwsbb_settings ADD bboffline smallint NOT NULL default '0', ADD allow_user_monitors smallint NOT NULL default '1'", TRUE)) { $content .= "phpwsBB settings table successfully updated.<br />"; *************** *** 225,229 **** } ! if($currentVersion < "0.9.1") { /* Create image directory */ PHPWS_File::makeDir($GLOBALS["core"]->home_dir . "images/phpwsbb"); --- 225,229 ---- } ! if(version_compare($currentVersion, "0.9.1") < 0) { /* Create image directory */ PHPWS_File::makeDir($GLOBALS["core"]->home_dir . "images/phpwsbb"); *************** *** 244,248 **** } ! if($currentVersion < '0.10.0') { if($status = $GLOBALS['core']->query('ALTER TABLE mod_phpwsbb_messages ADD owner_id int NOT NULL default 0 AFTER owner', TRUE) && $status = $GLOBALS['core']->sqlCreateIndex('mod_phpwsbb_messages',array('owner_id'))) { --- 244,248 ---- } ! if(version_compare($currentVersion, "0.10.0") < 0) { if($status = $GLOBALS['core']->query('ALTER TABLE mod_phpwsbb_messages ADD owner_id int NOT NULL default 0 AFTER owner', TRUE) && $status = $GLOBALS['core']->sqlCreateIndex('mod_phpwsbb_messages',array('owner_id'))) { |