diff --git a/common.php b/common.php index 9738720c..0931e9dc 100644 --- a/common.php +++ b/common.php @@ -10,6 +10,7 @@ if (empty($_SERVER['REMOTE_ADDR'])) $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; if (empty($_SERVER['HTTP_USER_AGENT'])) $_SERVER['HTTP_USER_AGENT'] = ''; if (empty($_SERVER['HTTP_REFERER'])) $_SERVER['HTTP_REFERER'] = ''; if (empty($_SERVER['SERVER_NAME'])) $_SERVER['SERVER_NAME'] = ''; +if (empty($_SERVER['SERVER_ADDR'])) $_SERVER['SERVER_ADDR'] = getenv('SERVER_ADDR'); if (!defined('BB_ROOT')) define('BB_ROOT', './'); if (!defined('BB_SCRIPT')) define('BB_SCRIPT', 'undefined'); @@ -521,4 +522,4 @@ else if (defined('IN_TRACKER')) dummy_exit(mt_rand(60, 2400)); } } -} \ No newline at end of file +} diff --git a/library/config.php b/library/config.php index e95d10d0..afaaf677 100644 --- a/library/config.php +++ b/library/config.php @@ -331,7 +331,7 @@ $page_cfg['show_sidebar2'] = array( ); // Cookie -$bb_cfg['cookie_domain'] = in_array($domain_name, array(getenv('SERVER_ADDR'), 'localhost')) ? '' : ".$domain_name"; +$bb_cfg['cookie_domain'] = in_array($domain_name, array($_SERVER['SERVER_ADDR'], 'localhost')) ? '' : ".$domain_name"; $bb_cfg['cookie_secure'] = ($domain_ssl ? 1 : (((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') || (isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] === 'https') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')) ? 1 : 0)); $bb_cfg['cookie_prefix'] = 'bb_'; // 'bb_' @@ -415,6 +415,7 @@ define('LOG_MAX_SIZE', 1048576); // bytes // Error reporting ini_set('error_reporting', E_ALL); ini_set('display_errors', 0); +ini_set('display_startup_errors', 0); ini_set('log_errors', 1); ini_set('error_log', LOG_DIR .'php_err.log'); @@ -639,4 +640,4 @@ if (file_exists(BB_ROOT. '/library/config.local.php')) include_once(BB_ROOT. '/library/config.local.php'); } -define('BB_CFG_LOADED', true); \ No newline at end of file +define('BB_CFG_LOADED', true); diff --git a/library/includes/init_bb.php b/library/includes/init_bb.php index b2609ba1..46a8c852 100644 --- a/library/includes/init_bb.php +++ b/library/includes/init_bb.php @@ -71,6 +71,7 @@ if (DBG_USER) { ini_set('error_reporting', E_ALL); ini_set('display_errors', 1); + ini_set('display_startup_errors', 1); } else { @@ -563,4 +564,4 @@ function cron_disable_board () { rename(BB_ENABLED, BB_DISABLED); } -} \ No newline at end of file +} diff --git a/library/includes/page_footer.php b/library/includes/page_footer.php index 884ef770..9b9eb9c3 100644 --- a/library/includes/page_footer.php +++ b/library/includes/page_footer.php @@ -40,7 +40,7 @@ if ($show_dbg_info) $sql_t = $DBS->sql_timetotal; $sql_time_txt = ($sql_t) ? sprintf('%.3f '.$lang['SEC'].' (%d%%) · ', $sql_t, round($sql_t*100/$gen_time)) : ''; $num_q = $DBS->num_queries; - $stat .= " | MySQL: {$sql_time_txt}{$num_q} " . $lang['QUERIES']; + $stat .= " | {$DBS->get_db_obj()->engine}: {$sql_time_txt}{$num_q} " . $lang['QUERIES']; } $stat .= " | $gzip_text"; @@ -93,4 +93,4 @@ if (defined('REQUESTED_PAGE') && !defined('DISABLE_CACHING_OUTPUT')) } } -bb_exit(); \ No newline at end of file +bb_exit(); diff --git a/styles/templates/admin/admin_log.tpl b/styles/templates/admin/admin_log.tpl index cf4d44d8..1036d458 100644 --- a/styles/templates/admin/admin_log.tpl +++ b/styles/templates/admin/admin_log.tpl @@ -6,7 +6,7 @@ table.log_filters td { } -
+{L_BAN_EXPLAIN_WARN}
\ No newline at end of file +{L_BAN_EXPLAIN_WARN}
diff --git a/styles/templates/default/group.tpl b/styles/templates/default/group.tpl index a52b2a10..5216fade 100644 --- a/styles/templates/default/group.tpl +++ b/styles/templates/default/group.tpl @@ -65,7 +65,9 @@{S_TIMEZONE}
- \ No newline at end of file + diff --git a/styles/templates/default/page_header.tpl b/styles/templates/default/page_header.tpl index 2b5f5983..c9b77a40 100644 --- a/styles/templates/default/page_header.tpl +++ b/styles/templates/default/page_header.tpl @@ -1,16 +1,24 @@ - +