Minor improvements (#192)

* Minor improvements

* fix
This commit is contained in:
Roman Kelesidis 2023-06-24 10:34:10 +07:00 committed by GitHub
parent 5b34808c8e
commit 1412407f0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 8 deletions

View File

@ -9,7 +9,7 @@
- Corrected translations [\#183](https://github.com/torrentpier/torrentpier-lts/pull/183) ([belomaxorka](https://github.com/belomaxorka))
- Fixed $bb_cfg['pm_days_keep'] [\#180](https://github.com/torrentpier/torrentpier-lts/pull/180) ([belomaxorka](https://github.com/belomaxorka))
- IP storage bugfix [\#177](https://github.com/torrentpier/torrentpier-lts/pull/177) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#172](https://github.com/torrentpier/torrentpier-lts/pull/172), [\#175](https://github.com/torrentpier/torrentpier-lts/pull/175), [\#176](https://github.com/torrentpier/torrentpier-lts/pull/176), [\#178](https://github.com/torrentpier/torrentpier-lts/pull/178), [\#179](https://github.com/torrentpier/torrentpier-lts/pull/179), [\#181](https://github.com/torrentpier/torrentpier-lts/pull/181), [\#187](https://github.com/torrentpier/torrentpier-lts/pull/187), [\#186](https://github.com/torrentpier/torrentpier-lts/pull/186), [\#191](https://github.com/torrentpier/torrentpier-lts/pull/191) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#172](https://github.com/torrentpier/torrentpier-lts/pull/172), [\#175](https://github.com/torrentpier/torrentpier-lts/pull/175), [\#176](https://github.com/torrentpier/torrentpier-lts/pull/176), [\#178](https://github.com/torrentpier/torrentpier-lts/pull/178), [\#179](https://github.com/torrentpier/torrentpier-lts/pull/179), [\#181](https://github.com/torrentpier/torrentpier-lts/pull/181), [\#187](https://github.com/torrentpier/torrentpier-lts/pull/187), [\#186](https://github.com/torrentpier/torrentpier-lts/pull/186), [\#191](https://github.com/torrentpier/torrentpier-lts/pull/191), [\#192](https://github.com/torrentpier/torrentpier-lts/pull/192) ([belomaxorka](https://github.com/belomaxorka))
- Fixed empty user search box [\#171](https://github.com/torrentpier/torrentpier-lts/pull/171) ([belomaxorka](https://github.com/belomaxorka))
- Added some placeholders for input fields [\#173](https://github.com/torrentpier/torrentpier-lts/pull/173) ([belomaxorka](https://github.com/belomaxorka))

View File

@ -13,7 +13,7 @@ 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');
if (!defined('BB_SCRIPT')) define('BB_SCRIPT', null);
if (!defined('IN_FORUM') && !defined('IN_TRACKER')) define('IN_FORUM', true);
header('X-Frame-Options: SAMEORIGIN');

View File

@ -380,8 +380,8 @@ $bb_cfg['adv_email'] = "adv@$domain_name";
define('SPHINX_LOG_ERRORS', true); // log sphinx errors
define('SPHINX_LOG_NAME', 'sphinx_errors'); // sphinx log filename
define('DBG_LOG', true); // enable forum debug (off on production)
define('DBG_TRACKER', true); // enable tracker debug (off on production)
define('DBG_LOG', false); // enable forum debug (off on production)
define('DBG_TRACKER', false); // enable tracker debug (off on production)
define('COOKIE_DBG', 'bb_dbg'); // debug cookie name
define('SQL_DEBUG', true); // enable forum sql & cache debug
define('SQL_LOG_NAME', 'sql_error_bb'); // mysql log filename

View File

@ -73,7 +73,12 @@ class sql_db
{
if (!$this->sql_query("SET NAMES {$this->cfg['charset']}"))
{
die("Could not set charset {$this->cfg['charset']}");
$charset_error = "Could not set charset {$this->cfg['charset']}";
if (DBG_USER)
{
dbg_log($charset_error, "{$this->cfg['charset']}-DB-charset-FAIL_" . time());
}
die($charset_error);
}
}
@ -123,8 +128,13 @@ class sql_db
if (!@mysql_select_db($this->cfg['dbname'], $this->link))
{
$database = (DBG_USER) ? $this->cfg['dbhost'] : '';
die("Could not select database $database");
$db_name = (DBG_USER) ? $this->cfg['dbname'] : '';
$select_error = "Could not select database $db_name";
if (DBG_USER)
{
dbg_log($select_error, "{$db_name}-DB-select-FAIL_" . time());
}
die($select_error);
}
$this->debug('stop');