diff --git a/CHANGELOG.md b/CHANGELOG.md index 32c04bdea..4ad9e73ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ - Used datastore to show statistic for more performance [\#1309](https://github.com/torrentpier/torrentpier/pull/1309) ([belomaxorka](https://github.com/belomaxorka)) - Used `humn_size()` to count average of releases in tr_stats.php [\#1313](https://github.com/torrentpier/torrentpier/pull/1313) ([belomaxorka](https://github.com/belomaxorka)) - Some enhancements in default template [\#1312](https://github.com/torrentpier/torrentpier/pull/1312) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1306](https://github.com/torrentpier/torrentpier/pull/1306), [\#1307](https://github.com/torrentpier/torrentpier/pull/1307), [\#1308](https://github.com/torrentpier/torrentpier/pull/1308) ([belomaxorka](https://github.com/belomaxorka)) +- Minor improvements [\#1306](https://github.com/torrentpier/torrentpier/pull/1306), [\#1307](https://github.com/torrentpier/torrentpier/pull/1307), [\#1308](https://github.com/torrentpier/torrentpier/pull/1308), [\#1315](https://github.com/torrentpier/torrentpier/pull/1315) ([belomaxorka](https://github.com/belomaxorka)) - Updated deps [\#1304](https://github.com/torrentpier/torrentpier/pull/1304), [\#1305](https://github.com/torrentpier/torrentpier/pull/1305) ([belomaxorka](https://github.com/belomaxorka)) ## [v2.4.0](https://github.com/torrentpier/torrentpier/tree/v2.4.0) (2024-01-01) diff --git a/library/ajax/topic_tpl.php b/library/ajax/topic_tpl.php index a18d46ba5..580d2c883 100644 --- a/library/ajax/topic_tpl.php +++ b/library/ajax/topic_tpl.php @@ -88,7 +88,7 @@ switch ($mode) { $this->response['val']['tpl-last-edit-tst'] = $tpl_data['tpl_last_edit_tm']; $this->response['html']['tpl-name-old-save'] = $tpl_data['tpl_name']; $this->response['html']['tpl-last-edit-time'] = bb_date($tpl_data['tpl_last_edit_tm'], 'd-M-y H:i'); - $this->response['html']['tpl-last-edit-by'] = get_username((int)$tpl_data['tpl_last_edit_by']); + $this->response['html']['tpl-last-edit-by'] = profile_url(get_userdata((int)$tpl_data['tpl_last_edit_by'])); $this->response['tpl_rules_href'] = POST_URL . $tpl_data['tpl_rules_post_id'] . '#' . $tpl_data['tpl_rules_post_id']; break; @@ -124,7 +124,7 @@ switch ($mode) { if ($tpl_data['tpl_last_edit_tm'] > $this->request['tpl_l_ed_tst'] && $tpl_data['tpl_last_edit_by'] != $userdata['user_id']) { $last_edit_by_username = get_username((int)$tpl_data['tpl_last_edit_by']); $msg = "Изменения не были сохранены!\n\n"; - $msg .= 'Шаблон был отредактирован: ' . html_entity_decode($last_edit_by_username) . ', ' . delta_time($tpl_data['tpl_last_edit_tm']) . " назад\n\n"; + $msg .= 'Шаблон был отредактирован: ' . htmlCHR($last_edit_by_username) . ', ' . bb_date($tpl_data['tpl_last_edit_tm'], 'd-M-y H:i'); $this->ajax_die($msg); } $sql = "UPDATE " . BB_TOPIC_TPL . " SET " . DB()->build_array('UPDATE', $sql_args) . " WHERE tpl_id = $tpl_id"; diff --git a/library/includes/functions.php b/library/includes/functions.php index 2a3eef73a..76f50206a 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -304,7 +304,7 @@ function auth($type, $forum_id, $ug_data, array $f_access = [], $group_perm = UG } if (empty($f_access)) { - trigger_error(__FUNCTION__ . '(): empty $f_access', E_USER_ERROR); + return []; } // @@ -802,7 +802,7 @@ function generate_user_info($row, bool $have_auth = IS_ADMIN): array $email_uri = ($bb_cfg['board_email_form']) ? ("profile.php?mode=email&" . POST_USERS_URL . "=" . $row['user_id']) : 'mailto:' . $row['user_email']; $email = '' . $row['user_email'] . ''; } else { - $email = $lang['NOSELECT']; + $email = $lang['HIDDEN_USER']; } if ($row['user_website']) { diff --git a/library/includes/posting_tpl.php b/library/includes/posting_tpl.php index a8473a48c..946fbe439 100644 --- a/library/includes/posting_tpl.php +++ b/library/includes/posting_tpl.php @@ -74,7 +74,7 @@ if ($edit_tpl_mode) { 'TPL_COMMENT' => $tpl_data['tpl_comment'], 'TPL_RULES_POST_ID' => $tpl_data['tpl_rules_post_id'], 'TPL_LAST_EDIT_TIME' => bb_date($tpl_data['tpl_last_edit_tm'], 'd-M-y H:i'), - 'TPL_LAST_EDIT_USER' => get_username((int)$tpl_data['tpl_last_edit_by']), + 'TPL_LAST_EDIT_USER' => profile_url(get_userdata((int)$tpl_data['tpl_last_edit_by'])), 'TPL_LAST_EDIT_TIMESTAMP' => $tpl_data['tpl_last_edit_tm'] ]); } diff --git a/styles/templates/posting_tpl.tpl b/styles/templates/posting_tpl.tpl index 4a556ef5e..9ef5e3424 100644 --- a/styles/templates/posting_tpl.tpl +++ b/styles/templates/posting_tpl.tpl @@ -4717,7 +4717,7 @@ $(function(){
Включить/Загрузить
- Шаблоны:   + {L_RELEASE}:   {TPL_SELECT}       @@ -4728,7 +4728,7 @@ $(function(){ В этом форуме шаблоны не включены
- Сейчас в этом форуме включен шаблон {TPL_NAME}
+ Сейчас в этом форуме включен шаблон: {TPL_NAME}
@@ -4745,7 +4745,7 @@ $(function(){
Правила (ссылка на сообщение с правилами или номер сообщения):

-
Комментарий:
+
{L_COMMENT}:
Последний раз редактировалось: {TPL_LAST_EDIT_TIME} by {TPL_LAST_EDIT_USER}
@@ -4769,7 +4769,7 @@ $(function(){
Правила (ссылка на сообщение с правилами или номер сообщения):

-
Комментарий:
+
{L_COMMENT}: