|
From: Jon O. <jon...@us...> - 2005-12-05 22:25:27
|
Update of /cvsroot/mxbb/core27x/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32005/core27x/includes Modified Files: mx_auth.php mx_cache.php mx_constants.php mx_functions.php mx_functions_phpbb.php Added Files: mx_functions_admincp.php Log Message: Updated - more is backported - some is fixed Index: mx_cache.php =================================================================== RCS file: /cvsroot/mxbb/core27x/includes/mx_cache.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mx_cache.php 5 Dec 2005 19:25:26 -0000 1.2 --- mx_cache.php 5 Dec 2005 22:25:12 -0000 1.3 *************** *** 271,276 **** $sql = "SELECT blk.*, mdl.module_path, ! fnc.function_file, ! fnc.function_admin FROM " . BLOCK_TABLE . " blk, " . FUNCTION_TABLE . " fnc, --- 271,276 ---- $sql = "SELECT blk.*, mdl.module_path, ! fnc.function_file, fnc.function_id, fnc.function_admin ! FROM " . BLOCK_TABLE . " blk, " . FUNCTION_TABLE . " fnc, *************** *** 290,293 **** --- 290,295 ---- while ( $row = $db->sql_fetchrow( $result ) ) { + $block_id = $row['block_id']; + $block_row = array( "block_id" => $row['block_id'], *************** *** 306,310 **** "module_root_path" => $row['module_path'], "block_file" => $row['function_file'], ! "block_edit_file" => $row['function_admin'] ); --- 308,313 ---- "module_root_path" => $row['module_path'], "block_file" => $row['function_file'], ! "block_edit_file" => $row['function_admin'], ! "function_id" => $row['function_id'] ); *************** *** 316,326 **** // Generate block parameter data $sql = "SELECT blk.*, ! sys.parameter_id, ! par.parameter_name, ! sys.parameter_value, ! sys.bbcode_uid, mdl.module_path, ! fnc.function_file, ! fnc.function_admin FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, " . PARAMETER_TABLE . " par, --- 319,327 ---- // Generate block parameter data $sql = "SELECT blk.*, ! sys.parameter_id, sys.parameter_value, sys.bbcode_uid, ! par.parameter_name, par.parameter_type, par.parameter_function, par.parameter_default, mdl.module_path, ! fnc.function_file, fnc.function_admin ! FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, " . PARAMETER_TABLE . " par, *************** *** 371,376 **** --- 372,381 ---- $param_row = array( "parameter_id" => $row['parameter_id'], + "function_id" => $row['function_id'], "parameter_name" => $row['parameter_name'], + "parameter_type" => $row['parameter_type'], "parameter_value" => $row['parameter_value'], + "parameter_default" => $row['parameter_default'], + "parameter_function" => $row['parameter_function'], "bbcode_uid" => $row['bbcode_uid'] ); *************** *** 583,597 **** // var $show_stats = true; ! var $auth_view = ''; ! var $auth_view_group = ''; ! var $auth_edit = ''; ! var $auth_edit_group = ''; ! ! // var $block_time = ''; ! // var $editor_id = ''; var $module_root_path = ''; var $block_file = ''; var $block_edit_file = ''; // var $dynamic_block_id = ''; --- 588,599 ---- // var $show_stats = true; ! var $auth_view = false; ! var $auth_edit = false; ! var $auth_mod = false; var $module_root_path = ''; var $block_file = ''; var $block_edit_file = ''; + var $function_id = ''; // var $dynamic_block_id = ''; *************** *** 622,625 **** --- 624,630 ---- global $userdata; + // $this->block_info = $this->block_config[$block_id]['block_info']; + // $this->block_parameters = $this->block_config[$block_id]['block_parameters']; + $this->block_id = $this->block_config[$block_id]['block_id']; $this->block_title = $this->block_config[$block_id]['block_title']; *************** *** 645,648 **** --- 650,654 ---- $this->block_file = $this->block_config[$block_id]['block_file']; $this->block_edit_file = $this->block_config[$block_id]['block_edit_file']; + $this->function_id = $this->block_info['function_id']; // $this->is_dynamic = $unset ? false : $this->_is_dynamic( $block_id ); *************** *** 694,700 **** var $total_block = ''; ! var $auth_view = ''; ! var $auth_view_group = ''; ! // ------------------------------ // Properties --- 700,705 ---- var $total_block = ''; ! var $auth_view = false; ! // ------------------------------ // Properties *************** *** 741,745 **** } ! function drop( $page_id ) { global $mx_cache; --- 746,750 ---- } ! function kill_me( $page_id ) { global $mx_cache; Index: mx_constants.php =================================================================== RCS file: /cvsroot/mxbb/core27x/includes/mx_constants.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_constants.php 5 Dec 2005 19:25:26 -0000 1.3 --- mx_constants.php 5 Dec 2005 22:25:12 -0000 1.4 *************** *** 24,51 **** } ! ! // Page numbers for session handling ! define('PAGE_FORUM' , -20); ! define('PAGE_ADS' , -21); ! define('PAGE_WELCOME' , -23); ! define('PAGE_LAST_MSG' , -24); ! define('PAGE_WELCOME_ADMIN' , -25); ! define('PAGE_POLL' , -26); ! define('PAGE_URL' , -27); ! define('PAGE_NEWS' , -37); ! define('PAGE_MENU_NAV' , -29); ! ! define('PAGE_MENU_ADMIN' , -31); ! define('PAGE_MODULE_ADMIN' , -32); ! define('PAGE_PORTAL_ADMIN' , -33); ! define('PAGE_META_ADMIN' , -34); ! define('PAGE_ADS_ADMIN' , -35); ! define('PAGE_ANNOUNCEMENT' , -36); ! define('PAGE_ANNOUNCEMENT_ADMIN' , -35); ! ! // Table names ! ! define('PORTAL_TABLE', $mx_table_prefix.'portal'); define('MENU_NAV_TABLE', $mx_table_prefix.'menu_nav'); --- 24,30 ---- } ! // // Table names ! // define('PORTAL_TABLE', $mx_table_prefix.'portal'); define('MENU_NAV_TABLE', $mx_table_prefix.'menu_nav'); Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core27x/includes/mx_functions_phpbb.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mx_functions_phpbb.php 5 Dec 2005 19:25:26 -0000 1.2 --- mx_functions_phpbb.php 5 Dec 2005 22:25:12 -0000 1.3 *************** *** 445,448 **** --- 445,462 ---- } + // + // Fix for correcting possible "bad" links to phpBB + // + if (!(strpos($msg_text, 'href') === false)) + { + $msg_text = str_replace('<a href="index', '<a href="'.$phpbb_root_path.'index', $msg_text); + $msg_text = str_replace('<a href="viewforum', '<a href="'.$phpbb_root_path.'viewforum', $msg_text); + $msg_text = str_replace('<a href="viewtopic', '<a href="'.$phpbb_root_path.'viewtopic', $msg_text); + $msg_text = str_replace('<a href="modcp', '<a href="'.$phpbb_root_path.'modcp', $msg_text); + $msg_text = str_replace('<a href="groupcp', '<a href="'.$phpbb_root_path.'groupcp', $msg_text); + $msg_text = str_replace('<a href="posting', '<a href="'.$phpbb_root_path.'posting', $msg_text); + + } + $template->assign_vars(array( 'MESSAGE_TITLE' => $msg_title, *************** *** 553,557 **** // Prevent from reading pages information more than once. // ! if( $pages_data === false ) { $sql = "SELECT page_id, page_name FROM " . PAGE_TABLE . " ORDER BY page_id"; --- 567,571 ---- // Prevent from reading pages information more than once. // ! if( $mx_pages_data === false ) { $sql = "SELECT page_id, page_name FROM " . PAGE_TABLE . " ORDER BY page_id"; Index: mx_auth.php =================================================================== RCS file: /cvsroot/mxbb/core27x/includes/mx_auth.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mx_auth.php 5 Dec 2005 19:25:26 -0000 1.2 --- mx_auth.php 5 Dec 2005 22:25:12 -0000 1.3 *************** *** 26,30 **** * - menu_auth * - get_auth_forum ! * - mx_auth_group * - mx_get_groups */ --- 26,30 ---- * - menu_auth * - get_auth_forum ! * - mx_is_group_member (old mx_auth_group) * - mx_get_groups */ --- NEW FILE: mx_functions_admincp.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: mx_functions_admincp.php,v 1.1 2005/12/05 22:25:12 jonohlsson Exp $ */ /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ [...3102 lines suppressed...] $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; while ( $sql[$n] ) { if ( !$result = $db->sql_query( $sql[$n] ) ) { $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; $inst_error = true; } else { $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; } $n++; } $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating modules'; return $message; } ?> Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core27x/includes/mx_functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_functions.php 5 Dec 2005 19:25:26 -0000 1.3 --- mx_functions.php 5 Dec 2005 22:25:12 -0000 1.4 *************** *** 145,149 **** function get_list_static($name_select, $row, $id) { ! $rows_count = ( count($row) < '25' ) ? count($row) : '25'; $column_list = '<select name="' . $name_select . '" size="' . $rows_count . '">'; --- 145,149 ---- function get_list_static($name_select, $row, $id) { ! $rows_count = ( count($row) < '7' ) ? count($row) : '7'; $column_list = '<select name="' . $name_select . '" size="' . $rows_count . '">'; |