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 improvements #234

Merged
merged 3 commits into from
Sep 3, 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 @@ -10,7 +10,7 @@
- Show renamed topic actions in log actions [\#227](https://github.com/torrentpier/torrentpier-lts/pull/227) ([belomaxorka](https://github.com/belomaxorka))
- Show set/unset downloaded actions in log actions [\#226](https://github.com/torrentpier/torrentpier-lts/pull/226) ([belomaxorka](https://github.com/belomaxorka))
- Show pin & unpin actions in log actions [\#225](https://github.com/torrentpier/torrentpier-lts/pull/225) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#215](https://github.com/torrentpier/torrentpier-lts/pull/215), [\#216](https://github.com/torrentpier/torrentpier-lts/pull/216), [\#217](https://github.com/torrentpier/torrentpier-lts/pull/217), [\#218](https://github.com/torrentpier/torrentpier-lts/pull/218), [\#221](https://github.com/torrentpier/torrentpier-lts/pull/221), [\#222](https://github.com/torrentpier/torrentpier-lts/pull/222), [\#224](https://github.com/torrentpier/torrentpier-lts/pull/224), [\#228](https://github.com/torrentpier/torrentpier-lts/pull/228) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#215](https://github.com/torrentpier/torrentpier-lts/pull/215), [\#216](https://github.com/torrentpier/torrentpier-lts/pull/216), [\#217](https://github.com/torrentpier/torrentpier-lts/pull/217), [\#218](https://github.com/torrentpier/torrentpier-lts/pull/218), [\#221](https://github.com/torrentpier/torrentpier-lts/pull/221), [\#222](https://github.com/torrentpier/torrentpier-lts/pull/222), [\#224](https://github.com/torrentpier/torrentpier-lts/pull/224), [\#228](https://github.com/torrentpier/torrentpier-lts/pull/228), [\#234](https://github.com/torrentpier/torrentpier-lts/pull/234) ([belomaxorka](https://github.com/belomaxorka))

## [v2.1.5-2023.07](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.07) (2023-08-04)
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.06...v2.1.5-2023.07)
Expand Down
6 changes: 3 additions & 3 deletions bt/includes/init_tr.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function connect ()

$connect_type = ($this->cfg['persist']) ? 'mysql_pconnect' : 'mysql_connect';

if (!$link = $connect_type($this->cfg['dbhost'], $this->cfg['dbuser'], $this->cfg['dbpasswd']))
if (!$link = @$connect_type($this->cfg['dbhost'], $this->cfg['dbuser'], $this->cfg['dbpasswd']))
{
$this->log_error();
}
Expand Down Expand Up @@ -163,7 +163,7 @@ function select_db ()
$this->cur_query = 'select db';
$this->debug('start');

if (!mysql_select_db($this->cfg['dbname'], $this->link))
if (!@mysql_select_db($this->cfg['dbname'], $this->link))
{
$this->log_error();
error_exit("Could not select database '{$this->cfg['dbname']}'");
Expand Down Expand Up @@ -486,4 +486,4 @@ function log_error ()
$msg[] = '';
bb_log($msg, 'sql_error_tr');
}
}
}
5 changes: 2 additions & 3 deletions common.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
// Get initial config
if (file_exists(BB_ROOT . 'library/config.local.php'))
{
require_once(BB_ROOT . 'library/config.local.php');
require(BB_ROOT . 'library/config.local.php');
}
else
{
require_once(BB_ROOT . 'library/config.php');
require(BB_ROOT . 'library/config.php');
}

// Load Zend Framework
Expand Down Expand Up @@ -88,7 +88,6 @@ function sqlite3_escape_string ($str)
*/
// Core DB class
require(CORE_DIR . 'dbs.php');
require(CORE_DIR . 'mysql.php');
$DBS = new DBS($bb_cfg);

function DB ($db_alias = 'db1')
Expand Down
2 changes: 1 addition & 1 deletion library/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@

// Check some variable
// Magic quotes
if (get_magic_quotes_gpc()) die('Set magic_quotes off');
if (@get_magic_quotes_gpc()) die('Set magic_quotes off');
// JSON
if (!function_exists('json_encode')) die('Json_encode not installed');
// Mbstring
Expand Down
4 changes: 2 additions & 2 deletions library/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ function show_bt_userdata ($user_id)

if (!$btu = get_bt_userdata($user_id))
{
require(INC_DIR .'functions_torrent.php');
require_once(INC_DIR .'functions_torrent.php');
generate_passkey($user_id, true);
$btu = get_bt_userdata($user_id);
}
Expand Down Expand Up @@ -2584,7 +2584,7 @@ function create_magnet ($infohash, $auth_key)
}
elseif (empty($auth_key))
{
require(INC_DIR .'functions_torrent.php');
require_once(INC_DIR .'functions_torrent.php');
if (!$passkey = generate_passkey($userdata['user_id'], true))
{
bb_die($lang['PASSKEY_ERR_EMPTY']);
Expand Down
1 change: 1 addition & 0 deletions library/includes/init_bb.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ function make_url ($path = '')
require(INC_DIR .'functions.php');
require(INC_DIR .'sessions.php');
require(INC_DIR .'template.php');
require(CORE_DIR .'mysql.php');

define('SQL_LAYER', 'mysql');

Expand Down