mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 05:13:54 -07:00
Fixed admin_terms.php
textarea reset in preview mode (#1371)
* Fixed `admin_terns.php` textarea reset in preview mode * Update CHANGELOG.md
This commit is contained in:
parent
dd70686fa2
commit
97a9b25bdd
2 changed files with 6 additions and 3 deletions
|
@ -26,6 +26,7 @@
|
||||||
- Some enhancements in default template [\#1312](https://github.com/torrentpier/torrentpier/pull/1312) ([belomaxorka](https://github.com/belomaxorka))
|
- Some enhancements in default template [\#1312](https://github.com/torrentpier/torrentpier/pull/1312) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Some enhancements in default template (Part 2) [\#1322](https://github.com/torrentpier/torrentpier/pull/1322) ([belomaxorka](https://github.com/belomaxorka))
|
- Some enhancements in default template (Part 2) [\#1322](https://github.com/torrentpier/torrentpier/pull/1322) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Set response code in some cases [\#1319](https://github.com/torrentpier/torrentpier/pull/1319) ([belomaxorka](https://github.com/belomaxorka))
|
- Set response code in some cases [\#1319](https://github.com/torrentpier/torrentpier/pull/1319) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
- Fixed `admin_terms.php` textarea reset in preview mode [\#1371](https://github.com/torrentpier/torrentpier/pull/1371) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Fixed broken user dl status [\#1351](https://github.com/torrentpier/torrentpier/pull/1351) ([belomaxorka](https://github.com/belomaxorka))
|
- Fixed broken user dl status [\#1351](https://github.com/torrentpier/torrentpier/pull/1351) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Fixed auth(): empty $f_access [\#1329](https://github.com/torrentpier/torrentpier/pull/1329) ([belomaxorka](https://github.com/belomaxorka))
|
- Fixed auth(): empty $f_access [\#1329](https://github.com/torrentpier/torrentpier/pull/1329) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Fixed download counter for torrents [\#1346](https://github.com/torrentpier/torrentpier/pull/1346) ([belomaxorka](https://github.com/belomaxorka))
|
- Fixed download counter for torrents [\#1346](https://github.com/torrentpier/torrentpier/pull/1346) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
|
|
@ -15,7 +15,9 @@ if (!empty($setmodules)) {
|
||||||
require __DIR__ . '/pagestart.php';
|
require __DIR__ . '/pagestart.php';
|
||||||
require INC_DIR . '/bbcode.php';
|
require INC_DIR . '/bbcode.php';
|
||||||
|
|
||||||
if (isset($_POST['post']) && $bb_cfg['terms'] != $_POST['message']) {
|
$preview = isset($_POST['preview']);
|
||||||
|
|
||||||
|
if (isset($_POST['post']) && ($bb_cfg['terms'] !== $_POST['message'])) {
|
||||||
bb_update_config(['terms' => $_POST['message']]);
|
bb_update_config(['terms' => $_POST['message']]);
|
||||||
bb_die($lang['CONFIG_UPDATED']);
|
bb_die($lang['CONFIG_UPDATED']);
|
||||||
}
|
}
|
||||||
|
@ -23,8 +25,8 @@ if (isset($_POST['post']) && $bb_cfg['terms'] != $_POST['message']) {
|
||||||
$template->assign_vars([
|
$template->assign_vars([
|
||||||
'S_ACTION' => 'admin_terms.php',
|
'S_ACTION' => 'admin_terms.php',
|
||||||
'EXT_LINK_NW' => $bb_cfg['ext_link_new_win'],
|
'EXT_LINK_NW' => $bb_cfg['ext_link_new_win'],
|
||||||
'MESSAGE' => $bb_cfg['terms'] ?: '',
|
'MESSAGE' => $preview ? $_POST['message'] : $bb_cfg['terms'],
|
||||||
'PREVIEW_HTML' => isset($_REQUEST['preview']) ? bbcode2html($_POST['message']) : '',
|
'PREVIEW_HTML' => $preview ? bbcode2html($_POST['message']) : '',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
print_page('admin_terms.tpl', 'admin');
|
print_page('admin_terms.tpl', 'admin');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue