|
From: OryNider <ory...@us...> - 2008-03-08 15:28:00
|
Update of /cvsroot/mxbb/mx_pafiledb In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18254 Modified Files: Tag: core28x dload.php Added Files: Tag: core28x pa_install.php pa_uninstall.php Log Message: update for new mx_mod 2.8.2 --- NEW FILE: pa_uninstall.php --- <?php /** * * @package phpBB2 Mod - pafileDB * @version $Id: pa_uninstall.php,v 1.1.2.1 2008/03/08 15:27:20 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './'; @define('IN_PORTAL', true); include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } else { @define('IN_PORTAL', true); include_once($mx_root_path . "includes/mx_constants.$phpEx"); include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // Get mxBB config settings // //$portal_config = $mx_cache->obtain_mxbb_config(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // Page selector // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; // // instatiate the mx_user class // $mx_user = new mx_user(); if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if (!$userdata['user_level'] == ADMIN) { die('Only admins may run this script!!!'); } } else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); $user->setup(); // // End session management // $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if ($userdata['user_type'] != USER_FOUNDER) { die('Only admins may run this script!!!'); } } else { die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else // --------------------------------------------------------------------------------- mxBB Module MODE { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); $mx_root_path = './../../'; $module_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); // End session management define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings (default mode) // $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } $is_block = true; global $images; } define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } // // Check if mx_common Mod is prezent // if (!file_exists($mx_mod_path . "includes/functions_admincp.$phpEx")) { die('mx mod is not uploaded!!!'); } else { require($mx_mod_path . "includes/functions_admincp.$phpEx"); } $page_title = 'Uninstalling pafileDB'; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $sql = array( "DROP TABLE " . $table_prefix . "pa_cat ", "DROP TABLE " . $table_prefix . "pa_auth ", "DROP TABLE " . $table_prefix . "pa_comments ", "DROP TABLE " . $table_prefix . "pa_config ", "DROP TABLE " . $table_prefix . "pa_custom ", "DROP TABLE " . $table_prefix . "pa_customdata ", "DROP TABLE " . $table_prefix . "pa_download_info ", "DROP TABLE " . $table_prefix . "pa_license ", "DROP TABLE " . $table_prefix . "pa_votes ", "DROP TABLE " . $table_prefix . "pa_mirrors ", "DROP TABLE " . $table_prefix . "pa_files " ); echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Mod Installation/Upgrading/Uninstalling Information - mod specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . mx_do_install_upgrade( $sql ) . "</span></td></tr>"; echo "</table><br />"; include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?> Index: dload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload.php,v retrieving revision 1.23.2.2 retrieving revision 1.23.2.3 diff -C2 -d -r1.23.2.2 -r1.23.2.3 *** dload.php 15 Feb 2008 23:53:11 -0000 1.23.2.2 --- dload.php 8 Mar 2008 15:27:16 -0000 1.23.2.3 *************** *** 13,25 **** if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { ! define( 'MXBB_MODULE', false ); ! define( 'IN_PHPBB', true ); ! define( 'IN_PORTAL', true ); ! define( 'IN_DOWNLOAD', true ); ! ! // When run as a phpBB mod these paths are identical ;) ! $phpbb_root_path = $module_root_path = $mx_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) --- 13,46 ---- if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { ! define('MXBB_MODULE', false); ! define('IN_PHPBB', true); ! ! $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; + + include($phpbb_root_path . 'common.' . $phpEx); + include($mx_mod_path . "includes/functions_required.$phpEx"); + + //Check if forum_hack is installed + if (!isset($mx_root_path)) + { + $mx_root_path = './'; + @define('IN_PORTAL', true); + include_once($mx_mod_path . "includes/mx_constants.$phpEx"); + include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); + } + else + { + @define('IN_PORTAL', true); + include_once($mx_root_path . "includes/mx_constants.$phpEx"); + include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); + //Redefine mx_root_path to include phpbb page_tail.php + $mx_root_path = $phpbb_root_path; + } + + require($mx_mod_path . "includes/functions_core.$phpEx"); + require($mx_mod_path . "includes/functions_styles.$phpEx"); + //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) *************** *** 28,40 **** } ! include( $phpbb_root_path . 'common.' . $phpEx ); ! ! @ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables ! include_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); ! include_once( $mx_mod_path . 'includes/functions_core.' . $phpEx ); ! ! define( 'PAGE_DOWNLOAD', -501 ); // If this id generates a conflict with other mods, change it ;) // --- 49,57 ---- } ! //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables + //error_reporting(E_ALL & ~E_NOTICE); ! define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // *************** *** 42,50 **** // $mx_cache = new mx_cache(); ! // // Get mxBB config settings // ! $portal_config = $mx_cache->obtain_mxbb_config(); // --- 59,67 ---- // $mx_cache = new mx_cache(); ! // // Get mxBB config settings // ! //$portal_config = $mx_cache->obtain_mxbb_config(); // *************** *** 52,86 **** // $mx_request_vars = new mx_request_vars(); $is_block = false; ! if ( file_exists("./modcp.$phpEx") ) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! ! // Start session management ! $userdata = session_pagestart( $user_ip, PAGE_DOWNLOAD ); ! init_userprefs( $userdata ); ! // End session management ! ! } ! else if ( @file_exists("./mcp.$phpEx") ) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; ! ! //include_once( $mx_mod_path . 'includes/shared/phpbb2/includes/bbcode.' . $phpEx ); ! //include_once( $mx_mod_path . 'includes/shared/phpbb2/includes/functions_post.' . $phpEx ); ! // ! // Start session management // ! $user->session_begin(); ! $userdata = $user->data; $user->setup(); // --- 69,119 ---- // $mx_request_vars = new mx_request_vars(); + + // + // Page selector + // + $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; + + // + // instatiate the mx_user class + // + $mx_user = new mx_user(); ! if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; + + // + // Start user session + // - populate $userdata and $lang + // + $mx_user->init($user_ip, $page_id, false); + //init_userprefs($userdata); + $mx_user->init_style(); //Overwrite template class ! /* ! $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x ! if (!$userdata['user_level'] == ADMIN) ! { ! die('Only admins may run this script!!!'); ! } ! */ ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); ! } ! else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; ! // ! // Start user session ! // - populate $userdata and $lang // ! $mx_user->init($user_ip, $page_id, false); $user->setup(); // *************** *** 88,95 **** // ! // ! // Get phpBB config settings ! // ! $board_config = $config; } else --- 121,133 ---- // ! /* ! $mx_user->set_module_default_style('_core'); // For compatibility with core 2.8.x ! if ($userdata['user_type'] != USER_FOUNDER) ! { ! die('Only admins may run this script!!!'); ! } ! */ ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/bbcode.$phpEx"); ! include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions_post.$phpEx"); } else *************** *** 142,148 **** $title = $mx_block->block_info['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); --- 180,186 ---- $title = $mx_block->block_info['block_title']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); *************** *** 152,156 **** global $images; } ! define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } --- 190,194 ---- global $images; } ! define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); } *************** *** 171,193 **** // =================================================== include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); // =================================================== // Get action variable otherwise set it to the main // =================================================== ! $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, 'main'); // =================================================== // Is admin? // =================================================== ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; ! break; ! case 'phpbb3': ! $is_admin = ( $userdata['user_type'] == USER_FOUNDER ) ? true : 0; ! break; ! } // =================================================== --- 209,230 ---- // =================================================== include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); + $pafiledb_template->destroy(); // =================================================== // Get action variable otherwise set it to the main // =================================================== ! if ( !MXBB_MODULE ) ! { ! $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'main'; ! } ! else ! { ! $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, 'main'); ! } // =================================================== // Is admin? // =================================================== ! $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; // =================================================== --- NEW FILE: pa_install.php --- <?php /** * * @package phpBB2 Mod - pafileDB * @version $Id: pa_install.php,v 1.1.2.1 2008/03/08 15:27:17 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './'; @define('IN_PORTAL', true); include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } else { @define('IN_PORTAL', true); include_once($mx_root_path . "includes/mx_constants.$phpEx"); include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // Get mxBB config settings // //$portal_config = $mx_cache->obtain_mxbb_config(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // Page selector // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; // // instatiate the mx_user class // $mx_user = new mx_user(); if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if (!$userdata['user_level'] == ADMIN) { die('Only admins may run this script!!!'); } } else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); $user->setup(); // // End session management // $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if ($userdata['user_type'] != USER_FOUNDER) { die('Only admins may run this script!!!'); } } else { die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else // --------------------------------------------------------------------------------- mxBB Module MODE { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); $mx_root_path = './../../'; $module_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); // End session management define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings (default mode) // $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } $is_block = true; global $images; } define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } // // Check if mx_common Mod is prezent // if (!file_exists($mx_mod_path . "includes/functions_admincp.$phpEx")) { die('mx mod is not uploaded!!!'); } else { require($mx_mod_path . "includes/functions_admincp.$phpEx"); } // // Check if mx_common Mod is prezent // if ( !file_exists( $mx_mod_path . 'includes/' . 'functions_admincp.' . $phpEx ) ) { die('mx mod is not uploaded!!!'); } else { include_once( $mx_mod_path . 'includes/' . 'functions_admincp.' . $phpEx ); include_once( $mx_mod_path . 'includes/functions_required.' . $phpEx ); } $page_title = 'Installing/Upgrading pafileDB'; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $sql = array(); // If fresh install if ( !$result = $db->sql_query( "SELECT config_name from " . $table_prefix . "pa_config" ) ) { $message = "<b>This is a fresh install!</b><br/><br/>"; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_cat "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_auth "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_comments "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_config "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_custom "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_customdata "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_download_info "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_license "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_votes "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_mirrors "; $sql[] = "DROP TABLE IF EXISTS " . $table_prefix . "pa_files "; // Table structure for table `pa_cat` $sql[] = "CREATE TABLE " . $table_prefix . "pa_cat ( cat_id int(10) NOT NULL auto_increment, cat_name text, cat_desc text, cat_parent int(50) default NULL, parents_data text NOT NULL default '', cat_order int(50) default NULL, cat_allow_file tinyint(2) NOT NULL default '0', cat_allow_comments tinyint(2) NOT NULL default '-1', internal_comments tinyint(2) NOT NULL default '-1', autogenerate_comments tinyint(2) NOT NULL default '-1', comments_forum_id mediumint(8) NOT NULL DEFAULT '-1', cat_allow_ratings tinyint(2) NOT NULL default '-1', show_pretext tinyint(2) NOT NULL default '-1', notify tinyint(2) NOT NULL default '-1', notify_group mediumint(8) NOT NULL default '-1', 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) NOT NULL default '', cat_last_file_time INT(50) UNSIGNED NOT NULL default '0', auth_view tinyint(2) NOT NULL default '0', auth_read tinyint(2) NOT NULL default '0', auth_view_file tinyint(2) NOT NULL default '0', auth_edit_file tinyint(2) NOT NULL default '0', auth_delete_file tinyint(2) NOT NULL default '2', auth_upload tinyint(2) NOT NULL default '0', auth_download tinyint(2) NOT NULL default '0', auth_rate tinyint(2) NOT NULL default '0', auth_email tinyint(2) NOT NULL default '0', auth_view_comment tinyint(2) NOT NULL default '0', auth_post_comment tinyint(2) NOT NULL default '0', auth_edit_comment tinyint(2) NOT NULL default '0', auth_delete_comment tinyint(2) NOT NULL default '0', auth_approval tinyint(2) NOT NULL default '0', auth_approval_edit tinyint(2) NOT NULL default '0', PRIMARY KEY (cat_id), KEY cat_order (cat_order) )"; // // Insert // $sql[] = "INSERT INTO " . $table_prefix . "pa_cat VALUES (1, 'My Category', '', '', '', '', 0, '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"; $sql[] = "INSERT INTO " . $table_prefix . "pa_cat VALUES (2, 'Test Cagegory', 'Just a test category', 1, '', '', 1, '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_files` $sql[] = "CREATE TABLE " . $table_prefix . "pa_files ( file_id int(10) NOT NULL auto_increment, file_name text, file_desc text, file_longdesc text, file_catid int(10) default NULL, file_approved TINYINT(1) NOT NULL default '1', file_size int(20) NOT NULL default '0', unique_name varchar(255) NOT NULL default '', real_name VARCHAR(255) NOT NULL, file_dir VARCHAR(255) NOT NULL, file_creator text, file_version text, file_ssurl text, file_sshot_link tinyint(2) NOT NULL default '0', file_dlurl text, file_posticon text, file_license int(10) default NULL, file_docsurl text, file_time int(50) default NULL, user_id mediumint(8) NOT NULL default '0', poster_ip varchar(8) NOT NULL default '', 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', file_dls int(10) DEFAULT '0' NOT NULL, PRIMARY KEY (file_id) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_config` $sql[] = "CREATE TABLE " . $table_prefix . "pa_config ( config_name varchar(255) NOT NULL default '', config_value varchar(255) NOT NULL default '', PRIMARY KEY (config_name) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_comments` $sql[] = "CREATE TABLE " . $table_prefix . "pa_comments ( comments_id int(10) NOT NULL auto_increment, file_id int(10) NOT NULL default '0', comments_text text NOT NULL, comments_title text NOT NULL, comments_time int(50) NOT NULL default '0', comment_bbcode_uid varchar(10) default NULL, poster_id mediumint(8) NOT NULL default '0', PRIMARY KEY (comments_id), KEY comments_id (comments_id), FULLTEXT KEY comment_bbcode_uid (comment_bbcode_uid) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_custom` $sql[] = "CREATE TABLE " . $table_prefix . "pa_custom ( custom_id int(50) NOT NULL auto_increment, custom_name text NOT NULL, custom_description text NOT NULL, data text NOT NULL, field_order int(20) NOT NULL default '0', field_type tinyint(2) NOT NULL default '0', regex varchar(255) NOT NULL default '', PRIMARY KEY (custom_id) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_customdata` $sql[] = "CREATE TABLE " . $table_prefix . "pa_customdata ( customdata_file int(50) NOT NULL default '0', customdata_custom int(50) NOT NULL default '0', data text NOT NULL )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_download_info` $sql[] = "CREATE TABLE " . $table_prefix . "pa_download_info ( file_id mediumint(8) NOT NULL default '0', user_id mediumint(8) NOT NULL default '0', downloader_ip varchar(8) NOT NULL default '', downloader_os varchar(255) NOT NULL default '', downloader_browser varchar(255) NOT NULL default '', browser_version varchar(255) NOT NULL default '' )"; // -------------------------------------------------------- $sql[] = "CREATE TABLE " . $table_prefix . "pa_mirrors ( mirror_id mediumint(8) NOT NULL auto_increment, file_id int(10) NOT NULL, unique_name varchar(255) NOT NULL default '', file_dir VARCHAR(255) NOT NULL, file_dlurl varchar(255) NOT NULL default '', mirror_location VARCHAR(255) NOT NULL default '', PRIMARY KEY (mirror_id), KEY file_id (file_id) )"; // Table structure for table `phpbb_pa_license` $sql[] = "CREATE TABLE " . $table_prefix . "pa_license ( license_id int(10) NOT NULL auto_increment, license_name text, license_text text, PRIMARY KEY (license_id) )"; // -------------------------------------------------------- // Table structure for table `phpbb_pa_votes` $sql[] = "CREATE TABLE " . $table_prefix . "pa_votes ( user_id mediumint(8) NOT NULL default '0', votes_ip varchar(50) NOT NULL default '0', votes_file int(50) NOT NULL default '0', rate_point tinyint(3) unsigned NOT NULL default '0', voter_os varchar(255) NOT NULL default '', voter_browser varchar(255) NOT NULL default '', browser_version varchar(8) NOT NULL default '', KEY user_id (user_id), KEY votes_file (votes_file), KEY votes_ip (votes_ip), KEY voter_os (voter_os), KEY voter_browser (voter_browser), KEY browser_version (browser_version), KEY rate_point (rate_point) )"; // Table structure for table `pa_auth` $sql[] = "CREATE TABLE " . $table_prefix . "pa_auth ( group_id mediumint(8) DEFAULT '0' NOT NULL, cat_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL, auth_view tinyint(1) DEFAULT '0' NOT NULL, auth_read tinyint(1) DEFAULT '0' NOT NULL, auth_view_file tinyint(1) DEFAULT '0' NOT NULL, auth_edit_file tinyint(1) DEFAULT '0' NOT NULL, auth_delete_file tinyint(1) DEFAULT '0' NOT NULL, auth_upload tinyint(1) DEFAULT '0' NOT NULL, auth_download tinyint(1) DEFAULT '0' NOT NULL, auth_rate tinyint(1) DEFAULT '0' NOT NULL, auth_email tinyint(1) DEFAULT '0' NOT NULL, auth_view_comment tinyint(1) DEFAULT '0' NOT NULL, auth_post_comment tinyint(1) DEFAULT '0' NOT NULL, auth_edit_comment tinyint(1) DEFAULT '0' NOT NULL, auth_delete_comment tinyint(1) DEFAULT '0' NOT NULL, auth_approval tinyint(1) DEFAULT '0' NOT NULL, auth_approval_edit tinyint(1) DEFAULT '0' NOT NULL, auth_mod tinyint(1) DEFAULT '1' NOT NULL, auth_search tinyint(1) DEFAULT '1' NOT NULL, auth_stats tinyint(1) DEFAULT '1' NOT NULL, auth_toplist tinyint(1) DEFAULT '1' NOT NULL, auth_viewall tinyint(1) DEFAULT '1' NOT NULL, KEY group_id (group_id), KEY cat_id (cat_id) )"; // // Config values // // General $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('enable_module', '0')"; // settings_disable $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('module_name', 'Download Database')"; // settings_dbname $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('wysiwyg_path', 'mx_mod/mx_shared/')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('upload_dir','pafiledb/uploads/')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('screenshots_dir','pafiledb/images/screenshots/')"; // Files $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('max_file_size','262144')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('forbidden_extensions','php, php3, php4, phtml, pl, asp, aspx, cgi')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('hotlink_prevent', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('hotlink_allowed', '')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('tpl_php', '0')"; // Appearance $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('sort_method', 'file_time')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('sort_order', 'DESC')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('pagination', '20')"; // art_pagination & settings_file_page $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('settings_stats', '')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('settings_viewall', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('settings_dbdescription', '')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('settings_topnumber', '10')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_simple_navigation', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('cat_col', '2')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('settings_newdays', '1')"; // Comments $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_comments', '0')"; // comments_show $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('internal_comments', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_wordwrap', '1')"; // formatting_comment_fixup $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_image_resize', '300')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_truncate_links', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('max_comment_subject_chars', '50')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('max_comment_chars', '5000')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_wysiwyg', '0')"; // allow_wysiwyg_comments & allow_wysiwyg $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_html', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_bbcode', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_smilies', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_links', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_images', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('no_comment_image_message', '[No image please]')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('no_comment_link_message', '[No links please]')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allowed_comment_html_tags', 'b,i,u,a')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('del_topic', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('autogenerate_comments', '1')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('comments_pagination', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('comments_forum_id', '0')"; // New // Ratings $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_ratings', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('votes_check_userid', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('votes_check_ip', '1')"; // Instructions $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('show_pretext', '0')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('pt_header', 'File Submission Instructions')"; // NEW $sql[] = "INSERT INTO " . $table_prefix . "pa_config values ('pt_body', 'Please check your references and include as much information as you can.')"; // NEW // Notifications $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('notify', 'pm')"; // pm_notify $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('notify_group', '0')"; // NEW // Permissions $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('auth_search','0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('auth_stats','0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('auth_toplist','0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('auth_viewall','0')"; $message .= mx_do_install_upgrade( $sql ); } else { // Upgrade checks $upgrade_103 = 0; $upgrade_201 = 0; $upgrade_280 = 0; // mxBB 2.8 branch -> $message = "<b>Upgrading!</b><br/><br/>"; // validate before 1.0.3 if ( !$result = $db->sql_query( "SELECT auth_edit_file from " . $table_prefix . "pa_cat" ) ) { $upgrade_103 = 1; $message .= "<b>Upgrading to v. 1.0.3...</b><br/><br/>"; } else { $message .= "<b>Validating v. 1.0.3...ok</b><br/><br/>"; } // validate before 2.0.1 if ( !$result = $db->sql_query( "SELECT auth_approval from " . $table_prefix . "pa_cat" ) ) { $upgrade_201 = 1; $message .= "<b>Validating v. 2.0.1...ok</b><br/><br/>"; } else { $message .= "<b>Validating v. 2.0.1...ok</b><br/><br/>"; } // validate before 2.0.2 $result = $db->sql_query( "SELECT config_value from " . $table_prefix . "pa_config WHERE config_name = 'internal_comments'" ); if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_202 = 1; $message .= "<b>Upgrading to v. 2.0.2...ok</b><br/><br/>"; } else { $message .= "<b>Validating v. 2.0.2...ok</b><br/><br/>"; } // validate before 2.8.0 $result = $db->sql_query( "SELECT config_value from " . $table_prefix . "pa_config WHERE config_name = 'comments_forum_id'" ); if ( $db->sql_numrows( $result ) == 0 ) { $upgrade_280 = 1; $message .= "<b>Upgrading to v. 2.8.0...ok</b><br/><br/>"; } else { $message .= "<b>Validating v. 2.8.0...ok</b><br/><br/>"; } // ------------------------------------------------------------------------------------------------------ if ( $upgrade_103 == 1 ) { $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD auth_edit_file tinyint(2) NOT NULL default '0' AFTER auth_view_file "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD auth_delete_file tinyint(2) NOT NULL default '0' AFTER auth_edit_file "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD cat_allow_ratings tinyint(2) NOT NULL default '-1' AFTER cat_allow_file "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD cat_allow_comments tinyint(2) NOT NULL default '-1' AFTER cat_allow_ratings "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_auth ADD auth_edit_file tinyint(1) DEFAULT '0' NOT NULL AFTER auth_view_file "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_auth ADD auth_delete_file tinyint(1) DEFAULT '0' NOT NULL AFTER auth_edit_file "; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('pm_notify', '0')"; } if ( $upgrade_201 == 1 ) { $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD auth_approval tinyint(2) NOT NULL default '0' AFTER auth_delete_comment "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_auth ADD auth_approval tinyint(1) DEFAULT '0' NOT NULL AFTER auth_delete_comment "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY auth_edit_file tinyint(2) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY auth_delete_file tinyint(2) NOT NULL default '0' "; // Upgrade the config table to avoid duplicate entries /* $sql[] = "ALTER TABLE " . $table_prefix . "pa_config MODIFY config_name VARCHAR(255) NOT NULL default '' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_config MODIFY config_value VARCHAR(255) NOT NULL default '' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_config DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) "; */ } if ( $upgrade_202 == 1 ) { // Upgrade the config table to avoid duplicate entries $sql[] = "ALTER TABLE " . $table_prefix . "pa_config MODIFY config_name VARCHAR(255) NOT NULL default '' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_config MODIFY config_value VARCHAR(255) NOT NULL default '' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_config DROP PRIMARY KEY, ADD PRIMARY KEY (config_name) "; // Configs $sql[] = "UPDATE " . $table_prefix . "pa_config" . " SET config_name = 'enable_module' WHERE config_name = 'settings_disable'"; $sql[] = "UPDATE " . $table_prefix . "pa_config" . " SET config_name = 'module_name' WHERE config_name = 'settings_dbname'"; $sql[] = "UPDATE " . $table_prefix . "pa_config" . " SET config_name = 'pagination' WHERE config_name = 'settings_file_page'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'art_pagination'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'comments_show'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'pm_notify'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'allow_wysiwyg_comments'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'allow_wysiwyg'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'formatting_fixup'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'formatting_comment_fixup'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'need_validation'"; $sql[] = "DELETE FROM " . $table_prefix . "pa_config" . " WHERE config_name = 'validator'"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('wysiwyg_path', 'mx_mod/mx_shared/')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_comments', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('internal_comments', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_wordwrap', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_image_resize', '300')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('formatting_comment_truncate_links', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('max_comment_subject_chars', '50')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('max_comment_chars', '5000')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_wysiwyg', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_html', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_bbcode', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_smilies', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_links', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allow_comment_images', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('no_comment_image_message', '[No image please]')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('no_comment_link_message', '[No links please]')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('allowed_comment_html_tags', 'b,i,u,a')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('del_topic', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('autogenerate_comments', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('comments_pagination', '5')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_ratings', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('votes_check_userid', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('votes_check_ip', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('notify', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('notify_group', '0')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('show_pretext', '1')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('pt_header', 'File Submission Instructions')"; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('pt_body', 'Please check your references and include as much information as you can.')"; // add fields to pa_category table $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD internal_comments tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD autogenerate_comments tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD comments_forum_id mediumint(8) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD show_pretext tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD notify tinyint(2) NOT NULL DEFAULT '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD notify_group mediumint(8) NOT NULL DEFAULT '-1' "; // auth $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat ADD auth_approval_groups tinyint(2) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_auth ADD auth_approval_groups tinyint(1) NOT NULL default '0' "; // add fields to pa_files table $sql[] = "ALTER TABLE " . $table_prefix . "pa_files ADD topic_id mediumint(8) unsigned NOT NULL default '0'"; } if ( $upgrade_280 == 1 ) { $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('comments_forum_id', '0')"; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY cat_allow_ratings tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY cat_allow_comments tinyint(2) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY notify_group mediumint(8) NOT NULL default '-1' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat MODIFY auth_delete_file tinyint(2) NOT NULL default '2' "; // Appearance $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('use_simple_navigation', '1') "; $sql[] = "INSERT INTO " . $table_prefix . "pa_config VALUES ('cat_col', '2') "; // Auth $sql[] = "ALTER TABLE " . $table_prefix . "pa_cat CHANGE auth_approval_groups auth_approval_edit tinyint(2) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $table_prefix . "pa_auth CHANGE auth_approval_groups auth_approval_edit tinyint(2) NOT NULL default '0' "; } else { $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } $message .= mx_do_install_upgrade( $sql ); // // Empty module cache // //include_once( $phpbb_root_path . 'mx_mod/functions_tools.' . $phpEx ); //$module_cache = new module_cache($phpbb_root_path . 'pafiledb/'); //$module_cache->tidy(); //$module_cache->save(); } echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Mod Installation/Upgrading/Uninstalling Information - mod specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . $message . "</span></td></tr>"; echo "</table><br />"; include($phpbb_root_path . 'includes/page_tail.'.$phpEx); ?> |