mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Added polyfills (#214)
* Added polyfills * Update polyfills.php * Update polyfills.php * Updated
This commit is contained in:
parent
adad3948a1
commit
82dfc414da
@ -1,5 +1,13 @@
|
||||
# 📖 Change Log
|
||||
|
||||
## [v2.1.5-2023.08](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.08) (2023-09-04) (В разработке)
|
||||
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.07...v2.1.5-2023.08)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Release v2.1.5-2023.08 🎉
|
||||
- Added polyfills [\#214](https://github.com/torrentpier/torrentpier-lts/pull/214) ([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)
|
||||
|
||||
|
@ -28,6 +28,9 @@ if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
|
||||
// Get initial config
|
||||
require(BB_ROOT . 'library/config.php');
|
||||
|
||||
// Load polyfills
|
||||
require(BB_ROOT . 'library/includes/polyfills.php');
|
||||
|
||||
// Load Zend Framework
|
||||
use Zend\Loader\StandardAutoloader;
|
||||
require(BB_ROOT . 'library/Zend/Loader/StandardAutoloader.php');
|
||||
@ -71,11 +74,6 @@ define('TOR_TYPE_SILVER', 2);
|
||||
define('GUEST_UID', -1);
|
||||
define('BOT_UID', -746);
|
||||
|
||||
function sqlite3_escape_string ($str)
|
||||
{
|
||||
return SQLite3::escapeString($str);
|
||||
}
|
||||
|
||||
/**
|
||||
* Database
|
||||
*/
|
||||
|
@ -15,8 +15,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
|
||||
$domain_ssl = false;
|
||||
|
||||
// Version info
|
||||
$bb_cfg['tp_version'] = '2.1.5-2023.07';
|
||||
$bb_cfg['tp_release_date'] = '04-08-2023';
|
||||
$bb_cfg['tp_version'] = '2.1.5-2023.08';
|
||||
$bb_cfg['tp_release_date'] = '04-09-2023';
|
||||
$bb_cfg['tp_release_state'] = 'LTS';
|
||||
$bb_cfg['tp_zf_version'] = '2.4.13';
|
||||
|
||||
|
59
library/includes/polyfills.php
Normal file
59
library/includes/polyfills.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||
|
||||
function sqlite3_escape_string($str)
|
||||
{
|
||||
return SQLite3::escapeString($str);
|
||||
}
|
||||
|
||||
if (!function_exists('boolval')) {
|
||||
function boolval($val)
|
||||
{
|
||||
return (bool)$val;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('trait_exists')) {
|
||||
function trait_exists($class, $autoload = true)
|
||||
{
|
||||
return $autoload && \class_exists($class, $autoload) && false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('class_uses')) {
|
||||
function class_uses($class, $autoload = true)
|
||||
{
|
||||
if (\is_object($class) || \class_exists($class, $autoload) || \interface_exists($class, false)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (50509 === PHP_VERSION_ID && 4 === PHP_INT_SIZE) {
|
||||
// Missing functions in PHP 5.5.9 - affects 32 bit builds of Ubuntu 14.04LTS
|
||||
// See https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1315888
|
||||
|
||||
if (!function_exists('gzopen') && function_exists('gzopen64')) {
|
||||
function gzopen($filename, $mode, $use_include_path = 0)
|
||||
{
|
||||
return gzopen64($filename, $mode, $use_include_path);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('gzseek') && function_exists('gzseek64')) {
|
||||
function gzseek($fp, $offset, $whence = SEEK_SET)
|
||||
{
|
||||
return gzseek64($fp, $offset, $whence);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('gztell') && function_exists('gztell64')) {
|
||||
function gztell($fp)
|
||||
{
|
||||
return gztell64($fp);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user