diff --git a/CHANGELOG.md b/CHANGELOG.md index 5064360a..858444f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ - Sync language (html dir) with latest sources [\#152](https://github.com/torrentpier/torrentpier-lts/pull/152) ([belomaxorka](https://github.com/belomaxorka)) - Updated UK lang icons [\#155](https://github.com/torrentpier/torrentpier-lts/pull/155) ([belomaxorka](https://github.com/belomaxorka)) - Hide feed button if feed file doesn't exists [\#161](https://github.com/torrentpier/torrentpier-lts/pull/161) ([belomaxorka](https://github.com/belomaxorka)) -- Minor fixes [\#124](https://github.com/torrentpier/torrentpier-lts/pull/124), [\#133](https://github.com/torrentpier/torrentpier-lts/pull/133), [\#135](https://github.com/torrentpier/torrentpier-lts/pull/135), [\#136](https://github.com/torrentpier/torrentpier-lts/pull/136), [\#139](https://github.com/torrentpier/torrentpier-lts/pull/139), [\#142](https://github.com/torrentpier/torrentpier-lts/pull/142), [\#144](https://github.com/torrentpier/torrentpier-lts/pull/144), [\#145](https://github.com/torrentpier/torrentpier-lts/pull/145), [\#148](https://github.com/torrentpier/torrentpier-lts/pull/148), [\#153](https://github.com/torrentpier/torrentpier-lts/pull/153), [\#154](https://github.com/torrentpier/torrentpier-lts/pull/154), [\#156](https://github.com/torrentpier/torrentpier-lts/pull/156), [\#157](https://github.com/torrentpier/torrentpier-lts/pull/157), [\#158](https://github.com/torrentpier/torrentpier-lts/pull/158), [\#159](https://github.com/torrentpier/torrentpier-lts/pull/159), [\#162](https://github.com/torrentpier/torrentpier-lts/pull/162), [\#163](https://github.com/torrentpier/torrentpier-lts/pull/163) ([belomaxorka](https://github.com/belomaxorka)) +- Minor fixes [\#124](https://github.com/torrentpier/torrentpier-lts/pull/124), [\#133](https://github.com/torrentpier/torrentpier-lts/pull/133), [\#135](https://github.com/torrentpier/torrentpier-lts/pull/135), [\#136](https://github.com/torrentpier/torrentpier-lts/pull/136), [\#139](https://github.com/torrentpier/torrentpier-lts/pull/139), [\#142](https://github.com/torrentpier/torrentpier-lts/pull/142), [\#144](https://github.com/torrentpier/torrentpier-lts/pull/144), [\#145](https://github.com/torrentpier/torrentpier-lts/pull/145), [\#148](https://github.com/torrentpier/torrentpier-lts/pull/148), [\#153](https://github.com/torrentpier/torrentpier-lts/pull/153), [\#154](https://github.com/torrentpier/torrentpier-lts/pull/154), [\#156](https://github.com/torrentpier/torrentpier-lts/pull/156), [\#157](https://github.com/torrentpier/torrentpier-lts/pull/157), [\#158](https://github.com/torrentpier/torrentpier-lts/pull/158), [\#159](https://github.com/torrentpier/torrentpier-lts/pull/159), [\#162](https://github.com/torrentpier/torrentpier-lts/pull/162), [\#163](https://github.com/torrentpier/torrentpier-lts/pull/163), [\#164](https://github.com/torrentpier/torrentpier-lts/pull/164) ([belomaxorka](https://github.com/belomaxorka)) ## [v2.1.5-2023.03](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.03) (2023-04-04) [Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.03...main) diff --git a/library/includes/cache/apc.php b/library/includes/cache/apc.php index 472d79ed..97e8dc03 100644 --- a/library/includes/cache/apc.php +++ b/library/includes/cache/apc.php @@ -12,7 +12,7 @@ function cache_apc ($prefix = null) { if (!$this->is_installed()) { - die('Error: APC extension not installed'); + die("Error: {$this->engine} extension not installed"); } $this->dbg_enabled = sql_dbg_enabled(); $this->prefix = $prefix; diff --git a/library/includes/cache/memcache.php b/library/includes/cache/memcache.php index c1370247..5cf31402 100644 --- a/library/includes/cache/memcache.php +++ b/library/includes/cache/memcache.php @@ -15,7 +15,7 @@ function cache_memcache ($cfg, $prefix = null) { if (!$this->is_installed()) { - die('Error: Memcached extension not installed'); + die("Error: {$this->engine} extension not installed"); } $this->cfg = $cfg; @@ -36,11 +36,14 @@ function connect () $this->connected = true; } - if (DBG_LOG) dbg_log(($this->connected ? "Connected successfully to {$this->engine} server" : "Could not connect to {$this->engine} server"), "{$this->engine}-CACHE-connect". ($this->connected ? '' : '-FAIL')); - if (!$this->connected && $this->cfg['con_required']) { - die('Could not connect to memcached server'); + if (DBG_LOG) + { + dbg_log("Could not connect to {$this->engine} server", "{$this->engine}-CACHE-connect-FAIL_" . time()); + } + + die("Could not connect to {$this->engine} server"); } $this->debug('stop'); diff --git a/library/includes/cache/redis.php b/library/includes/cache/redis.php index 3742d75d..2c413ee4 100644 --- a/library/includes/cache/redis.php +++ b/library/includes/cache/redis.php @@ -15,7 +15,7 @@ function cache_redis ($cfg, $prefix = null) { if (!$this->is_installed()) { - die('Error: Redis extension not installed'); + die("Error: {$this->engine} extension not installed"); } $this->cfg = $cfg; @@ -34,11 +34,14 @@ function connect () $this->connected = true; } - if (DBG_LOG) dbg_log(($this->connected ? "Connected successfully to {$this->engine} server" : "Could not connect to {$this->engine} server"), "{$this->engine}-CACHE-connect". ($this->connected ? '' : '-FAIL')); - if (!$this->connected && $this->cfg['con_required']) { - die('Could not connect to redis server'); + if (DBG_LOG) + { + dbg_log("Could not connect to {$this->engine} server", "{$this->engine}-CACHE-connect-FAIL_" . time()); + } + + die("Could not connect to {$this->engine} server"); } $this->debug('stop'); diff --git a/library/includes/cache/sqlite.php b/library/includes/cache/sqlite.php index 7f8779f5..22c9c16c 100644 --- a/library/includes/cache/sqlite.php +++ b/library/includes/cache/sqlite.php @@ -25,7 +25,7 @@ function cache_sqlite ($cfg, $prefix = null) { if (!$this->is_installed()) { - die('Error: SQLite3 extension not installed'); + die("Error: {$this->db->engine} extension not installed"); } $this->cfg = array_merge($this->cfg, $cfg); diff --git a/library/includes/cache/xcache.php b/library/includes/cache/xcache.php index b1e391f7..1e63bc1e 100644 --- a/library/includes/cache/xcache.php +++ b/library/includes/cache/xcache.php @@ -12,7 +12,7 @@ function cache_xcache ($prefix = null) { if (!$this->is_installed()) { - die('Error: XCache extension not installed'); + die("Error: {$this->engine} extension not installed"); } $this->dbg_enabled = sql_dbg_enabled(); $this->prefix = $prefix; diff --git a/library/includes/core/mysql.php b/library/includes/core/mysql.php index b7915aec..5b3965cc 100644 --- a/library/includes/core/mysql.php +++ b/library/includes/core/mysql.php @@ -95,7 +95,10 @@ function connect () { $server = (DBG_USER) ? $this->cfg['dbhost'] : ''; header("HTTP/1.0 503 Service Unavailable"); - bb_log("Could not connect to mysql server $server", ("db_err/connect_failed_{$this->cfg['dbhost']}_" . time())); + if (DBG_USER) + { + dbg_log("Could not connect to mysql server $server", "{$server}-DB-connect-FAIL_" . time()); + } die("Could not connect to mysql server $server"); } diff --git a/library/includes/datastore/apc.php b/library/includes/datastore/apc.php index 03a52c1f..aab11e13 100644 --- a/library/includes/datastore/apc.php +++ b/library/includes/datastore/apc.php @@ -11,7 +11,7 @@ function datastore_apc ($prefix = null) { if (!$this->is_installed()) { - die('Error: APC extension not installed'); + die("Error: {$this->engine} extension not installed"); } $this->dbg_enabled = sql_dbg_enabled(); $this->prefix = $prefix; diff --git a/library/includes/datastore/memcache.php b/library/includes/datastore/memcache.php index 8d8efa05..090e719d 100644 --- a/library/includes/datastore/memcache.php +++ b/library/includes/datastore/memcache.php @@ -14,7 +14,7 @@ function datastore_memcache ($cfg, $prefix = null) { if (!$this->is_installed()) { - die('Error: Memcached extension not installed'); + die("Error: {$this->engine} extension not installed"); } $this->cfg = $cfg; @@ -35,11 +35,14 @@ function connect () $this->connected = true; } - if (DBG_LOG) dbg_log(($this->connected ? "Connected successfully to {$this->engine} server" : "Could not connect to {$this->engine} server"), "{$this->engine}-CACHE-connect". ($this->connected ? '' : '-FAIL')); - if (!$this->connected && $this->cfg['con_required']) { - die('Could not connect to memcached server'); + if (DBG_LOG) + { + dbg_log("Could not connect to {$this->engine} server", "{$this->engine}-CACHE-connect-FAIL_" . time()); + } + + die("Could not connect to {$this->engine} server"); } $this->debug('stop'); diff --git a/library/includes/datastore/redis.php b/library/includes/datastore/redis.php index be3c0e29..b7601156 100644 --- a/library/includes/datastore/redis.php +++ b/library/includes/datastore/redis.php @@ -14,7 +14,7 @@ function datastore_redis ($cfg, $prefix = null) { if (!$this->is_installed()) { - die('Error: Redis extension not installed'); + die("Error: {$this->engine} extension not installed"); } $this->cfg = $cfg; @@ -33,11 +33,14 @@ function connect () $this->connected = true; } - if (DBG_LOG) dbg_log(($this->connected ? "Connected successfully to {$this->engine} server" : "Could not connect to {$this->engine} server"), "{$this->engine}-CACHE-connect". ($this->connected ? '' : '-FAIL')); - if (!$this->connected && $this->cfg['con_required']) { - die('Could not connect to redis server'); + if (DBG_LOG) + { + dbg_log("Could not connect to {$this->engine} server", "{$this->engine}-CACHE-connect-FAIL_" . time()); + } + + die("Could not connect to {$this->engine} server"); } $this->debug('stop'); diff --git a/library/includes/datastore/sqlite.php b/library/includes/datastore/sqlite.php index 7f614914..e80784d7 100644 --- a/library/includes/datastore/sqlite.php +++ b/library/includes/datastore/sqlite.php @@ -24,7 +24,7 @@ function datastore_sqlite ($cfg, $prefix = null) { if (!$this->is_installed()) { - die('Error: SQLite3 extension not installed'); + die("Error: {$this->engine} extension not installed"); } $this->cfg = array_merge($this->cfg, $cfg); diff --git a/library/includes/datastore/xcache.php b/library/includes/datastore/xcache.php index 2bd5f3fb..b2a6e832 100644 --- a/library/includes/datastore/xcache.php +++ b/library/includes/datastore/xcache.php @@ -11,7 +11,7 @@ function datastore_xcache ($prefix = null) { if (!$this->is_installed()) { - die('Error: XCache extension not installed'); + die("Error: {$this->engine} extension not installed"); } $this->dbg_enabled = sql_dbg_enabled();