mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 02:27:34 -07:00
Minor improvements (#796)
This commit is contained in:
parent
e6d66d2d7f
commit
a66a0007c3
3 changed files with 5 additions and 5 deletions
|
@ -12,7 +12,7 @@
|
|||
- Fixed null $u_data if user not found [\#783](https://github.com/torrentpier/torrentpier/pull/783) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Added missing properties in User class [\#782](https://github.com/torrentpier/torrentpier/pull/782) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Fixed some deprecations [\#777](https://github.com/torrentpier/torrentpier/pull/777) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Fixed: preg_match(): Passing null to parameter #2 [\#776](https://github.com/torrentpier/torrentpier/pull/776) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Fixed: preg_match(): Passing null to parameter [\#776](https://github.com/torrentpier/torrentpier/pull/776) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Reformated JS [\#770](https://github.com/torrentpier/torrentpier/pull/770), [\#794](https://github.com/torrentpier/torrentpier/pull/794) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Implemented password_hash API 🥳 [\#768](https://github.com/torrentpier/torrentpier/pull/768) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Updated deps [\#763](https://github.com/torrentpier/torrentpier/pull/763) ([belomaxorka](https://github.com/belomaxorka))
|
||||
|
|
|
@ -127,7 +127,7 @@ define('BOT_UID', -746);
|
|||
*/
|
||||
$DBS = new TorrentPier\Legacy\Dbs($bb_cfg);
|
||||
|
||||
function DB($db_alias = 'db')
|
||||
function DB(string $db_alias = 'db')
|
||||
{
|
||||
global $DBS;
|
||||
return $DBS->get_db_obj($db_alias);
|
||||
|
@ -138,7 +138,7 @@ function DB($db_alias = 'db')
|
|||
*/
|
||||
$CACHES = new TorrentPier\Legacy\Caches($bb_cfg);
|
||||
|
||||
function CACHE($cache_name)
|
||||
function CACHE(string $cache_name)
|
||||
{
|
||||
global $CACHES;
|
||||
return $CACHES->get_cache_obj($cache_name);
|
||||
|
|
|
@ -14,7 +14,7 @@ if (!defined('BB_ROOT')) {
|
|||
// Server settings
|
||||
$domain_name = 'torrentpier.com'; // enter here your primary domain name of your site
|
||||
$domain_name = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $domain_name;
|
||||
$domain_ssl = false;
|
||||
$force_ssl = false;
|
||||
|
||||
$bb_cfg = [];
|
||||
|
||||
|
@ -354,7 +354,7 @@ $bb_cfg['show_sidebar2_on_every_page'] = false;
|
|||
|
||||
// Cookie
|
||||
$bb_cfg['cookie_domain'] = in_array($domain_name, [$_SERVER['SERVER_ADDR'], 'localhost'], true) ? '' : ".$domain_name";
|
||||
$bb_cfg['cookie_secure'] = $domain_ssl ? true : \TorrentPier\Helpers\IsHelper::isHTTPS();
|
||||
$bb_cfg['cookie_secure'] = $force_ssl || \TorrentPier\Helpers\IsHelper::isHTTPS();
|
||||
$bb_cfg['cookie_prefix'] = 'bb_'; // 'bb_'
|
||||
$bb_cfg['cookie_same_site'] = 'Lax'; // Lax, None, Strict | https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue