|
From: FlorinCB <ory...@us...> - 2009-02-03 22:31:27
|
Update of /cvsroot/mxbb/mx_pafiledb In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22989 Modified Files: db_install.php db_upgrade.php Log Message: ALTER TABLE mx_pa_cat CHANGE cat_last_file_name cat_last_file_name varchar(255) DEFAULT '' NOT NULL; Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_install.php,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** db_install.php 24 Jan 2009 15:19:09 -0000 1.40 --- db_install.php 3 Feb 2009 22:31:14 -0000 1.41 *************** *** 72,76 **** `cat_files` mediumint(8) NOT NULL default '-1', `cat_last_file_id` mediumint(8) unsigned NOT NULL default '0', ! `cat_last_file_name` varchar(255) default NULL, `cat_last_file_time` int(50) unsigned NOT NULL default '0', `auth_view` tinyint(2) NOT NULL default '0', --- 72,76 ---- `cat_files` mediumint(8) NOT NULL default '-1', `cat_last_file_id` mediumint(8) unsigned NOT NULL default '0', ! `cat_last_file_name` varchar(255) DEFAULT '' NOT NULL, `cat_last_file_time` int(50) unsigned NOT NULL default '0', `auth_view` tinyint(2) NOT NULL default '0', *************** *** 324,327 **** --- 324,330 ---- "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('auth_toplist','0')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('auth_viewall','0')", + + //Screen Shots Settings (Go Here) + "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('resize_ss', '0')", //To do (for security reasons to filter uploaded files using php GD extension) ); Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_upgrade.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** db_upgrade.php 24 Jan 2009 15:19:12 -0000 1.31 --- db_upgrade.php 3 Feb 2009 22:31:14 -0000 1.32 *************** *** 51,54 **** --- 51,55 ---- $upgrade_280 = 0; // mxp 2.8 branch -> $upgrade_225 = 0; + $upgrade_226 = 0; $message = "<b>Upgrading!</b><br/><br/>"; *************** *** 109,112 **** --- 110,124 ---- $message .= "<b>Validating v. 2.2.5...ok</b><br/><br/>"; } + + // validate before 2.2.6 + if ( !$result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "pa_config WHERE config_name = 'resize_ss'" ); + { + $upgrade_226 = 1; + $message .= "<b>Upgrading v. 2.2.6...ok</b><br/><br/>"; + } + else + { + $message .= "<b>Validating v. 2.2.6...ok</b><br/><br/>"; + } // ------------------------------------------------------------------------------------------------------ *************** *** 241,244 **** --- 253,262 ---- $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_files ADD disable_msg text AFTER file_disable "; } + + if ( $upgrade_226 == 1 ) + { + $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_cat CHANGE cat_last_file_name cat_last_file_name varchar(255) DEFAULT '' NOT NULL "; + $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('resize_ss', '0')"; //To do (for security reasons to filter uploaded files using php GD extension) + } else { |