|
From: OryNider <ory...@us...> - 2008-01-31 10:22:43
|
Update of /cvsroot/mxbb/mx_counter/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22757/includes Modified Files: Tag: core28x counter_common.php counter_constants.php Log Message: upgrade for 2.8.1 Index: counter_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_counter/includes/counter_common.php,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** counter_common.php 6 Jun 2007 23:49:13 -0000 1.1 --- counter_common.php 31 Jan 2008 10:22:35 -0000 1.1.2.1 *************** *** 20,24 **** // Load language files. // - if( file_exists($module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx) ) { --- 20,23 ---- *************** *** 45,65 **** // ! $counter_config = array(); ! $sql = "SELECT * FROM ".COUNTER_CONFIG_TABLE; ! $result = $db->sql_query($sql); ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Couldn't query counter config table", "", __LINE__, __FILE__, $sql); ! } ! else { ! while( $row = $db->sql_fetchrow($result) ) ! { ! $counter_config[$row['config_name']] = $row['config_value']; ! } } --- 44,67 ---- // ! $counter_config = array(); ! $sql = "SELECT * FROM ".COUNTER_CONFIG_TABLE; ! $result = $db->sql_query($sql); ! /* ! if( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, "Couldn't query counter config table", "", __LINE__, __FILE__, $sql); ! } ! */ ! ! if( ($result = $db->sql_query($sql)) ) ! { ! while( $row = $db->sql_fetchrow($result) ) { ! $counter_config[$row['config_name']] = $row['config_value']; } + } *************** *** 72,79 **** function update_count($newcount) { ! global $counter_config, $board_config, $db, $lang; ! $sql = "UPDATE ". COUNTER_SESSION_TABLE ." ! SET currentcount = '$newcount' WHERE count_id = 1"; --- 74,81 ---- function update_count($newcount) { ! global $db; ! $sql = 'UPDATE ' . COUNTER_SESSION_TABLE . " ! SET currentcount = " . intval($newcount) . " WHERE count_id = 1"; Index: counter_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_counter/includes/counter_constants.php,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** counter_constants.php 6 Jun 2007 23:49:14 -0000 1.1 --- counter_constants.php 31 Jan 2008 10:22:35 -0000 1.1.2.1 *************** *** 15,23 **** // ! // Define table names. // ! !defined('COUNTER_CONFIG_TABLE') ? define('COUNTER_CONFIG_TABLE', $mx_table_prefix.'counter_config') : false; ! !defined('COUNTER_SESSION_TABLE') ? define('COUNTER_SESSION_TABLE', $mx_table_prefix.'counter_session') : false; ! ?> --- 15,22 ---- // ! // If they are not defined in constants.php, define table names. // ! @define('COUNTER_CONFIG_TABLE', $mx_table_prefix.'counter_config'); ! @define('COUNTER_SESSION_TABLE', $mx_table_prefix.'counter_session'); ?> |