|
From: Jon O. <jon...@us...> - 2008-04-27 18:49:23
|
Update of /cvsroot/mxbb/mx_pafiledb In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15622 Modified Files: db_install.php db_upgrade.php Log Message: A new feature is tested, dynamic buttons. I have coded this update so custom styles will not be affected... Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_install.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** db_install.php 13 Mar 2008 19:15:19 -0000 1.35 --- db_install.php 27 Apr 2008 18:48:44 -0000 1.36 *************** *** 30,34 **** } ! $mx_module_version = '2.2.4'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by Mohd/Jon Ohlsson/Orynider</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for MX-Publisher by [Jon Ohlsson] <a href="http://www.mx-publisher.com" target="_blank">The MX-Publisher Development Team</a>'; --- 30,34 ---- } ! $mx_module_version = '2.2.5'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by Mohd/Jon Ohlsson/Orynider</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for MX-Publisher by [Jon Ohlsson] <a href="http://www.mx-publisher.com" target="_blank">The MX-Publisher Development Team</a>'; *************** *** 140,144 **** file_update_time int(50) NOT NULL default '0', file_last int(50) default NULL, ! file_pin int(2) default NULL, file_broken TINYINT(1) DEFAULT '0' NOT NULL, topic_id mediumint(8) unsigned NOT NULL default '0', --- 140,146 ---- file_update_time int(50) NOT NULL default '0', file_last int(50) default NULL, ! file_pin int(2) default '0', ! file_disable int(2) default '0', ! disable_msg text, file_broken TINYINT(1) DEFAULT '0' NOT NULL, topic_id mediumint(8) unsigned NOT NULL default '0', Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_upgrade.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** db_upgrade.php 16 Feb 2008 21:47:31 -0000 1.27 --- db_upgrade.php 27 Apr 2008 18:48:44 -0000 1.28 *************** *** 30,34 **** } ! $mx_module_version = '2.2.4'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by Mohd/Jon Ohlsson/Orynider</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for MX-Publisher by [Jon Ohlsson] <a href="http://www.mx-publisher.com" target="_blank">The MX-Publisher Development Team</a>'; --- 30,34 ---- } ! $mx_module_version = '2.2.5'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by Mohd/Jon Ohlsson/Orynider</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for MX-Publisher by [Jon Ohlsson] <a href="http://www.mx-publisher.com" target="_blank">The MX-Publisher Development Team</a>'; *************** *** 50,53 **** --- 50,54 ---- $upgrade_201 = 0; $upgrade_280 = 0; // mxBB 2.8 branch -> + $upgrade_225 = 0; $message = "<b>Upgrading!</b><br/><br/>"; *************** *** 67,71 **** { $upgrade_201 = 1; ! $message .= "<b>Validating v. 2.0.1...ok</b><br/><br/>"; } else --- 68,72 ---- { $upgrade_201 = 1; ! $message .= "<b>Upgrading v. 2.0.1...ok</b><br/><br/>"; } else *************** *** 98,101 **** --- 99,113 ---- } + // validate before 2.2.5 + if ( !$result = $db->sql_query( "SELECT file_disable from " . $mx_table_prefix . "pa_files" ) ) + { + $upgrade_225 = 1; + $message .= "<b>Upgrading v. 2.2.5...ok</b><br/><br/>"; + } + else + { + $message .= "<b>Validating v. 2.2.5...ok</b><br/><br/>"; + } + // ------------------------------------------------------------------------------------------------------ if ( $upgrade_103 == 1 ) *************** *** 223,226 **** --- 235,244 ---- $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_auth CHANGE auth_approval_groups auth_approval_edit tinyint(2) NOT NULL default '0' "; } + + if ( $upgrade_225 == 1 ) + { + $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_files ADD file_disable int(2) default '0' AFTER file_pin "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_files ADD disable_msg text AFTER file_disable "; + } else { |