diff --git a/library/includes/functions.php b/library/includes/functions.php index e08a54f2..907b7ac5 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -1864,12 +1864,6 @@ function bb_die ($msg_text) exit; } -// Alias for bb_die() -function message_die ($msg_code, $msg_text = '') -{ - bb_die($msg_text); -} - function bb_simple_die ($txt) { global $bb_cfg; @@ -1883,6 +1877,19 @@ function bb_simple_die ($txt) die($txt); } +// Alias for bb_die() +function message_die ($msg_code, $msg_text = '') +{ + if ($msg_code == CRITICAL_MESSAGE || $msg_code == CRITICAL_ERROR) + { + bb_simple_die($msg_text); + } + else + { + bb_die($msg_text); + } +} + function bb_realpath ($path) { return (!@function_exists('realpath') || !@realpath(INC_DIR . 'functions.php')) ? $path : @realpath($path); diff --git a/library/includes/init_bb.php b/library/includes/init_bb.php index fdf5c10e..8069c280 100644 --- a/library/includes/init_bb.php +++ b/library/includes/init_bb.php @@ -122,6 +122,12 @@ define('SEARCH_TYPE_TRACKER', 1); define('E_AJAX_GENERAL_ERROR', 1000); define('E_AJAX_NEED_LOGIN', 1001); +// Error codes (Legacy) +define('GENERAL_MESSAGE', 200); +define('GENERAL_ERROR', 202); +define('CRITICAL_MESSAGE', 203); +define('CRITICAL_ERROR', 204); + // Private messaging define('PRIVMSGS_READ_MAIL', 0); define('PRIVMSGS_NEW_MAIL', 1);