mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 15:45:34 +02:00
Updates related to message.php and transaction update
git-svn-id: file:///svn/phpbb/trunk@547 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
356f845abc
commit
bed1d3ab9a
@ -65,6 +65,7 @@ include('includes/auth.'.$phpEx);
|
||||
include('includes/functions.'.$phpEx);
|
||||
include('includes/db.'.$phpEx);
|
||||
|
||||
|
||||
// Obtain and encode users IP
|
||||
//$get_user_ip = ;
|
||||
$user_ip = encode_ip(($HTTP_X_FORWARDED_FOR) ? $HTTP_X_FORWARDED_FOR : $REMOTE_ADDR);
|
||||
@ -89,7 +90,7 @@ if(!$result = $db->sql_query($sql))
|
||||
$board_config['default_lang'] = "english";
|
||||
$board_config['gzip_compress'] = 0;
|
||||
|
||||
message_die(SQL_QUERY, "Could not query config information", "", __LINE__, __FILE__);
|
||||
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -37,8 +37,8 @@ define(USER, 0);
|
||||
define(ADMIN, 1);
|
||||
|
||||
// Topic state
|
||||
define(UNLOCKED, 0);
|
||||
define(LOCKED, 1);
|
||||
define(TOPIC_UNLOCKED, 0);
|
||||
define(TOPIC_LOCKED, 1);
|
||||
|
||||
// Topic types
|
||||
define(POST_NORMAL, 0);
|
||||
@ -46,22 +46,22 @@ define(POST_STICKY, 1);
|
||||
define(POST_ANNOUNCE, 2);
|
||||
define(POST_GLOBAL_ANNOUNCE, 3);
|
||||
|
||||
// Ban time types
|
||||
define(SECONDS, 1);
|
||||
define(MINUTES, 2);
|
||||
define(HOURS, 3);
|
||||
define(DAYS, 4);
|
||||
define(YEARS, 5);
|
||||
// SQL codes
|
||||
define(BEGIN_TRANSACTION, 1);
|
||||
define(END_TRANSACTION, 2);
|
||||
|
||||
// Error codes
|
||||
define(GENERAL_MESSAGE, 200);
|
||||
define(GENERAL_ERROR, 202);
|
||||
define(CRITICAL_MESSAGE, 203);
|
||||
define(CRITICAL_ERROR, 204);
|
||||
|
||||
define(SQL_CONNECT, 1);
|
||||
define(BANNED, 2);
|
||||
define(QUERY_ERROR, 3);
|
||||
define(SESSION_CREATE, 4);
|
||||
define(NO_TOPICS, 5);
|
||||
define(GENERAL_ERROR, 6);
|
||||
define(LOGIN_FAILED, 7);
|
||||
define(GENERAL_MESSAGE, 10);
|
||||
|
||||
// Private messaging
|
||||
define(PRIVMSGS_READ_MAIL, 0);
|
||||
@ -128,7 +128,8 @@ define('GROUPS_TABLE', $table_prefix.'groups');
|
||||
define('POSTS_TABLE', $table_prefix.'posts');
|
||||
define('POSTS_TEXT_TABLE', $table_prefix.'posts_text');
|
||||
define('PRIVMSGS_TABLE', $table_prefix.'privmsgs');
|
||||
define('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');
|
||||
define('PRIVMSGS_TEXT_TABLE', $table_prefix.'privmsgs_text');
|
||||
define('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore');
|
||||
define('RANKS_TABLE', $table_prefix.'ranks');
|
||||
define('SESSIONS_TABLE', $table_prefix.'session');
|
||||
define('THEMES_TABLE', $table_prefix.'themes');
|
||||
@ -137,4 +138,5 @@ define('USER_GROUP_TABLE', $table_prefix.'user_group');
|
||||
define('USERS_TABLE', $table_prefix.'users');
|
||||
define('WORDS_TABLE', $table_prefix.'words');
|
||||
define('PRUNE_TABLE', $table_prefix.'forum_prune');
|
||||
?>
|
||||
|
||||
?>
|
@ -42,10 +42,9 @@ switch($dbms)
|
||||
|
||||
// Make the database connection.
|
||||
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
|
||||
if(!$db)
|
||||
if(!$db->db_connect_id)
|
||||
{
|
||||
$db_error = $db->sql_error();
|
||||
error_die(SQL_CONNECT, $db_error['message']);
|
||||
message_die(CRITICAL_ERROR, "Could not connect to the database");
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user