|
From: Markus P. <mar...@us...> - 2005-04-26 22:51:54
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5268 Modified Files: admin_mx_chkobjs.php admin_mx_menu.php admin_mx_module.php admin_mx_page_setting.php Log Message: Minimizing duplicated function names in ACP. This is the first step to make something compatible with PHP5. ;-) Index: admin_mx_chkobjs.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_chkobjs.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_mx_chkobjs.php 19 Apr 2005 21:05:20 -0000 1.8 --- admin_mx_chkobjs.php 26 Apr 2005 22:51:44 -0000 1.9 *************** *** 170,174 **** case 'db_delete': $sql = "DELETE FROM ".$table." WHERE $key0 = $val0 AND $key1 = $val1"; ! if( !dbQuery($sql) ) { message_die(GENERAL_ERROR, "Couldn't DELETE data from table : " . $table, --- 170,174 ---- case 'db_delete': $sql = "DELETE FROM ".$table." WHERE $key0 = $val0 AND $key1 = $val1"; ! if( !chkobjs_dbQuery($sql) ) { message_die(GENERAL_ERROR, "Couldn't DELETE data from table : " . $table, *************** *** 260,264 **** else { ! if( !($field_value = dbFetchField($ftab[$i], $field.'='.$row[$field], $fnam[$i])) ) { $field_key = '<font color=red><b>'.$row[$field].'</b></font>'; --- 260,264 ---- else { ! if( !($field_value = chkobjs_dbFetchField($ftab[$i], $field.'='.$row[$field], $fnam[$i])) ) { $field_key = '<font color=red><b>'.$row[$field].'</b></font>'; *************** *** 303,315 **** // DB Utilities // ! function dbFetchField($tbname, $where, $field) { $sql = "SELECT * FROM ".$tbname." WHERE ".$where; ! if( !($row = dbFetchRow($sql)) ) return false; return $row[$field]; } ! function dbFetchRow($sql) { global $db; --- 303,315 ---- // DB Utilities // ! function chkobjs_dbFetchField($tbname, $where, $field) { $sql = "SELECT * FROM ".$tbname." WHERE ".$where; ! if( !($row = chkobjs_dbFetchRow($sql)) ) return false; return $row[$field]; } ! function chkobjs_dbFetchRow($sql) { global $db; *************** *** 321,325 **** } ! function dbQuery($sql) { global $db; --- 321,325 ---- } ! function chkobjs_dbQuery($sql) { global $db; Index: admin_mx_menu.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_menu.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** admin_mx_menu.php 17 Mar 2005 11:30:34 -0000 1.21 --- admin_mx_menu.php 26 Apr 2005 22:51:44 -0000 1.22 *************** *** 105,109 **** } ! function renumber_order( $mode, $cat = 0 ) { global $db, $portalpage; --- 105,109 ---- } ! function renumber_menu_order( $mode, $cat = 0 ) { global $db, $portalpage; *************** *** 1030,1034 **** } ! renumber_order( 'menu', $menu_info['cat_id'] ); $show_index = true; --- 1030,1034 ---- } ! renumber_menu_order( 'menu', $menu_info['cat_id'] ); $show_index = true; *************** *** 1050,1054 **** } ! renumber_order( 'category' ); $show_index = true; --- 1050,1054 ---- } ! renumber_menu_order( 'category' ); $show_index = true; Index: admin_mx_page_setting.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_setting.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** admin_mx_page_setting.php 6 Mar 2005 01:10:13 -0000 1.13 --- admin_mx_page_setting.php 26 Apr 2005 22:51:45 -0000 1.14 *************** *** 71,75 **** } ! function renumber_order( $mode, $column = 0, $page_id ) { global $db; --- 71,75 ---- } ! function renumber_page_order( $mode, $column = 0, $page_id ) { global $db; *************** *** 180,184 **** } ! renumber_order( 'block', $column_id, $page_id ); $show_index = true; --- 180,184 ---- } ! renumber_page_order( 'block', $column_id, $page_id ); $show_index = true; *************** *** 203,207 **** } ! renumber_order( 'column', 0, $page_id ); $show_index = true; --- 203,207 ---- } ! renumber_page_order( 'column', 0, $page_id ); $show_index = true; *************** *** 234,238 **** } ! renumber_order( 'block', $column_id, $page_id ); $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_page_admin'], "<a href=\"" . append_sid( "admin_mx_page_setting.php?page_id=$page_id" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( "index.php?pane=right" ) . "\">", "</a>" ); --- 234,238 ---- } ! renumber_page_order( 'block', $column_id, $page_id ); $message = $lang['Page_Config_updated'] . "<br /><br />" . sprintf( $lang['Click_return_page_admin'], "<a href=\"" . append_sid( "admin_mx_page_setting.php?page_id=$page_id" ) . "\">", "</a>" ) . "<br /><br />" . sprintf( $lang['Click_return_admin_index'], "<a href=\"" . append_sid( "index.php?pane=right" ) . "\">", "</a>" ); Index: admin_mx_module.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_module.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** admin_mx_module.php 13 Apr 2005 21:08:55 -0000 1.28 --- admin_mx_module.php 26 Apr 2005 22:51:44 -0000 1.29 *************** *** 888,892 **** // DB Utilities // ----------------------------------------------------------------- ! function dbFetchRow( $sql ) { global $db; --- 888,892 ---- // DB Utilities // ----------------------------------------------------------------- ! function moduleACP_dbFetchRow( $sql ) { global $db; *************** *** 905,914 **** }; ! function getMaxId( $table_name, $table_key ) { global $db; $sql = "SELECT max(" . $table_key . ") AS max_id FROM " . $table_name; ! if ( !$row = dbFetchRow( $sql ) ) return -1; return $row['max_id']; --- 905,914 ---- }; ! function moduleACP_getMaxId( $table_name, $table_key ) { global $db; $sql = "SELECT max(" . $table_key . ") AS max_id FROM " . $table_name; ! if ( !$row = moduleACP_dbFetchRow( $sql ) ) return -1; return $row['max_id']; *************** *** 948,956 **** global $template, $lang, $db, $board_config, $theme, $HTTP_POST_VARS, $delimeter; ! $module_id_max = getMaxId( MODULE_TABLE, 'module_id' ); ! $function_id_max = getMaxId( FUNCTION_TABLE, 'function_id' ); ! $parameter_id_max = getMaxId( PARAMETER_TABLE, 'parameter_id' ); ! $option_id_max = getMaxId( PARAMETER_OPTION_TABLE, 'option_id' ); ! $block_id_max = getMaxId( BLOCK_TABLE, 'block_id' ); $upgrade_module = false; // not really used --- 948,956 ---- global $template, $lang, $db, $board_config, $theme, $HTTP_POST_VARS, $delimeter; ! $module_id_max = moduleACP_getMaxId( MODULE_TABLE, 'module_id' ); ! $function_id_max = moduleACP_getMaxId( FUNCTION_TABLE, 'function_id' ); ! $parameter_id_max = moduleACP_getMaxId( PARAMETER_TABLE, 'parameter_id' ); ! $option_id_max = moduleACP_getMaxId( PARAMETER_OPTION_TABLE, 'option_id' ); ! $block_id_max = moduleACP_getMaxId( BLOCK_TABLE, 'block_id' ); $upgrade_module = false; // not really used |