|
From: FlorinCB <ory...@us...> - 2008-08-27 05:18:16
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3560/includes Modified Files: mx_functions_admincp.php mx_functions_core.php Log Message: some missing stuff from phpBB3 backend Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** mx_functions_core.php 15 Jul 2008 22:02:45 -0000 1.99 --- mx_functions_core.php 27 Aug 2008 05:17:35 -0000 1.100 *************** *** 452,455 **** --- 452,456 ---- $sql = "SELECT col.page_id, pag.page_name, + pag.page_desc, pag.page_parent, pag.parents_data, *************** *** 503,506 **** --- 504,508 ---- "page_id" => $row['page_id'], "page_name" => $row['page_name'], + "page_desc" => $row['page_desc'], "page_parent" => $row['page_parent'], "parent_data" => $row['parents_data'], Index: mx_functions_admincp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_admincp.php,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** mx_functions_admincp.php 19 Aug 2008 14:34:58 -0000 1.59 --- mx_functions_admincp.php 27 Aug 2008 05:17:35 -0000 1.60 *************** *** 375,379 **** $ipfilter = addslashes( serialize( $ipfilter ) ); ! $sql = "SELECT MAX(page_id) AS next_id FROM " . PAGE_TABLE; if( !($result = $db->sql_query($sql)) ) { --- 375,379 ---- $ipfilter = addslashes( serialize( $ipfilter ) ); ! $sql = "SELECT MAX(page_id) AS next_id, MAX(page_order) AS next_order FROM " . PAGE_TABLE; if( !($result = $db->sql_query($sql)) ) { *************** *** 382,386 **** $row = $db->sql_fetchrow($result); ! $page_id_new = $row[next_id] + 1; if( empty($page_id_new) ) --- 382,388 ---- $row = $db->sql_fetchrow($result); ! $page_id_new = $row['next_id'] + 1; ! ! $page_order_new = $row['next_order'] + 1; if( empty($page_id_new) ) *************** *** 388,409 **** die('Couldn\'t find max page_id'); } ! $sql = "INSERT INTO " . PAGE_TABLE . " ( page_id, page_name, page_desc, page_parent, page_icon, page_alt_icon, auth_view, default_style, override_user_style, page_header, page_footer, page_main_layout, navigation_block, ip_filter, phpbb_stats ) ! VALUES ( '" . $page_id_new . "', ! '" . $page_name . "', ! '" . $page_desc . "', ! '" . $page_parent . "', ! '" . $page_icon . "', ! '" . $page_alt_icon . "', ! '" . $auth_view . "', ! '" . $default_style . "', ! '" . $override_user_style . "', ! '" . $page_header . "', ! '" . $page_footer . "', ! '" . $page_main_layout . "', ! '" . $navigation_block . "', ! '" . $ipfilter . "', ! '" . $phpbb_stats . "' )"; if( !($result = $db->sql_query($sql)) ) { --- 390,429 ---- die('Couldn\'t find max page_id'); } + + if( empty($page_order_new) ) + { + $page_order_new = 0; + } ! $parents_data = ''; //To do ! ! $page_row = array( ! "page_id" => (int) $page_id_new, ! "page_name" => $page_name, ! "page_desc" => $page_desc, ! "page_parent" => (int) $page_parent, ! "parents_data" => $parents_data, ! "page_order" => (int) $page_order_new, ! "page_icon" => $page_icon , ! "page_alt_icon" => $page_alt_icon, ! //"menu_icon" => $menu_icon, ! //"menu_alt_icon" => $menu_alt_icon, ! //"menu_alt_icon_hot" => $menu_alt_icon_hot, ! //"menu_active" => (int) $menu_active, ! "auth_view" => (int) $auth_view, ! //"auth_view_group" => $auth_view_group, ! //"auth_moderator_group" => $auth_moderator_group, ! "default_style" => (int) $default_style, ! "override_user_style" => (int) $override_user_style, ! "page_header" => $page_header, ! "page_footer" => $page_footer, ! "page_main_layout" => $page_main_layout, ! "navigation_block" => (int) $navigation_block, ! "ip_filter" => $ipfilter , ! "phpbb_stats" => (int) $phpbb_stats, ! ); + $sql = "INSERT INTO " . PAGE_TABLE . $db->sql_build_array('INSERT', $page_row); + if( !($result = $db->sql_query($sql)) ) { |