mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Minor improvements (#711)
This commit is contained in:
parent
95d280175a
commit
8a5bac558f
4 changed files with 5 additions and 5 deletions
|
@ -76,7 +76,7 @@ if (file_exists(BB_PATH . '/library/config.local.php')) {
|
|||
/**
|
||||
* Progressive error reporting
|
||||
*/
|
||||
define('DBG_USER', (isset($_COOKIE[COOKIE_DBG])));
|
||||
define('DBG_USER', isset($_COOKIE[COOKIE_DBG]));
|
||||
\TorrentPier\Dev::initDebug();
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,7 +25,7 @@ if (!empty($template)) {
|
|||
$template->pparse('page_footer');
|
||||
}
|
||||
|
||||
$show_dbg_info = (DBG_USER && IS_ADMIN && !(isset($_GET['pane']) && $_GET['pane'] == 'left'));
|
||||
$show_dbg_info = (DBG_USER && !(isset($_GET['pane']) && $_GET['pane'] == 'left'));
|
||||
|
||||
if (!$bb_cfg['gzip_compress']) {
|
||||
flush();
|
||||
|
@ -74,7 +74,7 @@ echo '
|
|||
</div><!--/body_container-->
|
||||
';
|
||||
|
||||
if (DBG_USER && SQL_DEBUG && !(isset($_GET['pane']) && $_GET['pane'] == 'left')) {
|
||||
if ($show_dbg_info && SQL_DEBUG) {
|
||||
require INC_DIR . '/page_footer_dev.php';
|
||||
}
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ class Ajax
|
|||
{
|
||||
$this->response['action'] = $this->action;
|
||||
|
||||
if (DBG_USER && SQL_DEBUG && !empty($_COOKIE['sql_log'])) {
|
||||
if (Dev::sql_dbg_enabled()) {
|
||||
$this->response['sql_log'] = Dev::get_sql_log();
|
||||
}
|
||||
|
||||
|
|
|
@ -478,7 +478,7 @@ class User
|
|||
if ($c_sdata_curr !== $c_sdata_resv) {
|
||||
bb_setcookie(COOKIE_DATA, $c_sdata_curr, COOKIE_PERSIST, true);
|
||||
}
|
||||
if (isset($bb_cfg['dbg_users'][$this->data['user_id']]) && !isset($_COOKIE[COOKIE_DBG])) {
|
||||
if (isset($bb_cfg['dbg_users'][$this->data['user_id']]) && !DBG_USER) {
|
||||
bb_setcookie(COOKIE_DBG, 1, COOKIE_SESSION);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue