mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -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))
|
- 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))
|
- 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))
|
- 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))
|
- 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))
|
- 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`)
|
6. Edit domain name and domain port in the configuration file or a local copy (`$reserved_name` and `$reserved_port`)
|
||||||
7. Edit this files:
|
7. Edit this files:
|
||||||
1. **favicon.png** (change on your own)
|
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)
|
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)
|
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
|
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');
|
$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']) {
|
if (!$bb_cfg['gzip_compress']) {
|
||||||
flush();
|
flush();
|
||||||
|
|
|
@ -216,7 +216,7 @@ class Dev
|
||||||
$id = "sql_{$i}_" . random_int(0, mt_getrandmax());
|
$id = "sql_{$i}_" . random_int(0, mt_getrandmax());
|
||||||
$sql = self::short_query($dbg['sql'], true);
|
$sql = self::short_query($dbg['sql'], true);
|
||||||
$time = sprintf('%.4f', $dbg['time']);
|
$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'];
|
$info = !empty($dbg['info']) ? $dbg['info'] . ' [' . $dbg['src'] . ']' : $dbg['src'];
|
||||||
|
|
||||||
$log .= ''
|
$log .= ''
|
||||||
|
|
|
@ -22,12 +22,17 @@ class IsHelper
|
||||||
*/
|
*/
|
||||||
public static function isHTTPS(): bool
|
public static function isHTTPS(): bool
|
||||||
{
|
{
|
||||||
$is_secure = false;
|
if (
|
||||||
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') {
|
(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
|
||||||
$is_secure = true;
|
|| (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
|
||||||
} 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') {
|
|| (!empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on')
|
||||||
$is_secure = true;
|
|| (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,27 +15,25 @@
|
||||||
|
|
||||||
<!-- IF $bb_cfg['show_post_bbcode_button'] -->
|
<!-- IF $bb_cfg['show_post_bbcode_button'] -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function () {
|
let loadedText = [];
|
||||||
let loadedText = [];
|
|
||||||
|
|
||||||
ajax.view_post = function (post_id) {
|
ajax.view_post = function (post_id) {
|
||||||
if (loadedText[post_id] != null) {
|
if (loadedText[post_id] != null) {
|
||||||
$('#ptx-' + post_id).toggle();
|
$('#ptx-' + post_id).toggle();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ajax.exec({
|
ajax.exec({
|
||||||
action: 'view_post',
|
action: 'view_post',
|
||||||
post_id: post_id,
|
post_id: post_id,
|
||||||
return_text: true,
|
return_text: true,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
ajax.callback.view_post = function (data) {
|
ajax.callback.view_post = function (data) {
|
||||||
loadedText[data.post_id] = true;
|
loadedText[data.post_id] = true;
|
||||||
$('#post_' + data.post_id + ' div.post_body').prepend(
|
$('#post_' + data.post_id + ' div.post_body').prepend(
|
||||||
'<div class="tCenter" id="ptx-' + data.post_id + '"><textarea style="width: 99%; height: 200px; line-height: 1.2;">' + data['post_text'] + '</textarea><hr></div>'
|
'<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>
|
</script>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue