Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #164

Merged
merged 4 commits into from
Apr 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion library/includes/cache/apc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 7 additions & 4 deletions library/includes/cache/memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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');
Expand Down
11 changes: 7 additions & 4 deletions library/includes/cache/redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion library/includes/cache/sqlite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion library/includes/cache/xcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 4 additions & 1 deletion library/includes/core/mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down
2 changes: 1 addition & 1 deletion library/includes/datastore/apc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 7 additions & 4 deletions library/includes/datastore/memcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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');
Expand Down
11 changes: 7 additions & 4 deletions library/includes/datastore/redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion library/includes/datastore/sqlite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion library/includes/datastore/xcache.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down