mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Minor improvements (#1408)
* Minor improvements * Update Dev.php * Update IsHelper.php * Update CHANGELOG.md
This commit is contained in:
parent
87034e3ad8
commit
f7ee6d8a57
6 changed files with 33 additions and 30 deletions
|
@ -17,7 +17,7 @@
|
|||
- Fixed Undefined variable $wordCensor [\#1400](https://github.com/torrentpier/torrentpier/pull/1400) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Improved word censor 🤐 [\#1393](https://github.com/torrentpier/torrentpier/pull/1393) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Used hashing for filenames generation [\#1385](https://github.com/torrentpier/torrentpier/pull/1385) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383), [\#1391](https://github.com/torrentpier/torrentpier/pull/1391), [\#1398](https://github.com/torrentpier/torrentpier/pull/1398), [\#1405](https://github.com/torrentpier/torrentpier/pull/1405), [\#1406](https://github.com/torrentpier/torrentpier/pull/1406) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383), [\#1391](https://github.com/torrentpier/torrentpier/pull/1391), [\#1398](https://github.com/torrentpier/torrentpier/pull/1398), [\#1405](https://github.com/torrentpier/torrentpier/pull/1405), [\#1406](https://github.com/torrentpier/torrentpier/pull/1406), [\#1408](https://github.com/torrentpier/torrentpier/pull/1408) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- Some bugfixes [\#1380](https://github.com/torrentpier/torrentpier/pull/1380) ([belomaxorka](https://github.com/belomaxorka))
|
||||
- New Crowdin updates [\#1384](https://github.com/torrentpier/torrentpier/pull/1384), [\#1389](https://github.com/torrentpier/torrentpier/pull/1389), [\#1392](https://github.com/torrentpier/torrentpier/pull/1392), [\#1402](https://github.com/torrentpier/torrentpier/pull/1402), [\#1403](https://github.com/torrentpier/torrentpier/pull/1403) ([Exileum](https://github.com/Exileum))
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ For installation, you need to follow a few simple steps:
|
|||
6. Edit domain name and domain port in the configuration file or a local copy (`$reserved_name` and `$reserved_port`)
|
||||
7. Edit this files:
|
||||
1. **favicon.png** (change on your own)
|
||||
2. **robots.txt** (change the addresses in lines **Host** and **Sitemap** on your own)
|
||||
2. **robots.txt** (change the addresses in lines `Host` and `Sitemap` on your own)
|
||||
3. **opensearch_desc.xml** (change the description and address on your own)
|
||||
4. **opensearch_desc_bt.xml** (change the description and address on your own)
|
||||
8. Log in to the forum with **admin/admin** login/password and finish setting up via admin panel
|
||||
|
|
|
@ -25,7 +25,7 @@ if (!empty($template)) {
|
|||
$template->pparse('page_footer');
|
||||
}
|
||||
|
||||
$show_dbg_info = (!IS_GUEST && APP_DEBUG && !(isset($_GET['pane']) && $_GET['pane'] == 'left'));
|
||||
$show_dbg_info = (APP_DEBUG && !(isset($_GET['pane']) && $_GET['pane'] == 'left'));
|
||||
|
||||
if (!$bb_cfg['gzip_compress']) {
|
||||
flush();
|
||||
|
|
|
@ -216,7 +216,7 @@ class Dev
|
|||
$id = "sql_{$i}_" . random_int(0, mt_getrandmax());
|
||||
$sql = self::short_query($dbg['sql'], true);
|
||||
$time = sprintf('%.4f', $dbg['time']);
|
||||
$perc = @sprintf('[%d%%]', round($dbg['time'] * 100 / $db_obj->sql_timetotal));
|
||||
$perc = '[' . round($dbg['time'] * 100 / $db_obj->sql_timetotal) . '%]';
|
||||
$info = !empty($dbg['info']) ? $dbg['info'] . ' [' . $dbg['src'] . ']' : $dbg['src'];
|
||||
|
||||
$log .= ''
|
||||
|
|
|
@ -22,12 +22,17 @@ class IsHelper
|
|||
*/
|
||||
public static function isHTTPS(): bool
|
||||
{
|
||||
$is_secure = false;
|
||||
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') {
|
||||
$is_secure = true;
|
||||
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
|
||||
$is_secure = true;
|
||||
if (
|
||||
(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|
||||
|| (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
|
||||
|| (!empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on')
|
||||
|| (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)
|
||||
|| (isset($_SERVER['HTTP_X_FORWARDED_PORT']) && $_SERVER['HTTP_X_FORWARDED_PORT'] == 443)
|
||||
|| (isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] == 'https')
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return $is_secure;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
<!-- IF $bb_cfg['show_post_bbcode_button'] -->
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
let loadedText = [];
|
||||
|
||||
ajax.view_post = function (post_id) {
|
||||
|
@ -35,7 +34,6 @@
|
|||
'<div class="tCenter" id="ptx-' + data.post_id + '"><textarea style="width: 99%; height: 200px; line-height: 1.2;">' + data['post_text'] + '</textarea><hr></div>'
|
||||
);
|
||||
};
|
||||
})();
|
||||
</script>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue