Merged some fixes from new-attachments branch (#1700)

* Merged some fixes from `new-attachments` branch

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-12-07 20:29:21 +07:00 committed by GitHub
commit 83b465ddd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 13 additions and 10 deletions

View file

@ -116,7 +116,7 @@ switch ($mode) {
$new_tpl_id = $tpl_id;
$this->response['msg'] = "Включен шаблон $tpl_name";
}
DB()->query("UPDATE " . BB_FORUMS . " SET forum_tpl_id = $new_tpl_id WHERE forum_id = $forum_id");
DB()->query("UPDATE " . BB_FORUMS . " SET forum_tpl_id = $new_tpl_id WHERE forum_id = $forum_id LIMIT 1");
break;
// сохранение изменений
@ -127,7 +127,7 @@ switch ($mode) {
$msg .= 'Шаблон был отредактирован: ' . html_ent_decode($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";
$sql = "UPDATE " . BB_TOPIC_TPL . " SET " . DB()->build_array('UPDATE', $sql_args) . " WHERE tpl_id = $tpl_id LIMIT 1";
if (!DB()->query($sql)) {
$sql_error = DB()->sql_error();
}