From a5b96952d2e3d83fbc811658ccd440d188e087ac Mon Sep 17 00:00:00 2001 From: karrak1 Date: Sat, 31 Dec 2022 04:49:04 +0100 Subject: [PATCH] mood save git --- infusions/forum/classes/threads/mood.php | 2 +- infusions/forum/infusion.php | 5 ++-- infusions/forum/upgrade/2.2.1.upgrade.inc | 28 ----------------------- 3 files changed, 3 insertions(+), 32 deletions(-) delete mode 100644 infusions/forum/upgrade/2.2.1.upgrade.inc diff --git a/infusions/forum/classes/threads/mood.php b/infusions/forum/classes/threads/mood.php index c0dcae628c..322cb30251 100644 --- a/infusions/forum/classes/threads/mood.php +++ b/infusions/forum/classes/threads/mood.php @@ -64,7 +64,7 @@ public function postMood() { $has_reacted = (bool)$this->moodExists($notify_data['notify_sender'], $notify_data['notify_mood_id'], $notify_data['post_id']); if ($mood_exists === TRUE && $has_reacted === FALSE) { - dbquery_insert(DB_POST_NOTIFY, $notify_data, 'save'); + dbquery_insert(DB_POST_NOTIFY, $notify_data, 'save', ['primary_key' => 'post_id']); $response = TRUE; } } diff --git a/infusions/forum/infusion.php b/infusions/forum/infusion.php index 5821f9e64a..08550be812 100644 --- a/infusions/forum/infusion.php +++ b/infusions/forum/infusion.php @@ -25,7 +25,7 @@ // Infusion general information $inf_title = $locale['forums']['title']; $inf_description = $locale['forums']['description']; -$inf_version = '2.2.1'; +$inf_version = '2.2.0'; $inf_developer = 'PHP Fusion Development Team'; $inf_email = 'info@phpfusion.com'; $inf_weburl = 'https://phpfusion.com'; @@ -231,13 +231,12 @@ ) ENGINE=MyISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci"; $inf_newtable[] = DB_POST_NOTIFY." ( - post_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, + post_id MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', notify_mood_id MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', notify_datestamp INT(10) UNSIGNED NOT NULL DEFAULT '0', notify_user MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', notify_sender MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', notify_status tinyint(1) UNSIGNED NOT NULL DEFAULT '1', - PRIMARY KEY (post_id), KEY notify_datestamp (notify_datestamp) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci"; diff --git a/infusions/forum/upgrade/2.2.1.upgrade.inc b/infusions/forum/upgrade/2.2.1.upgrade.inc deleted file mode 100644 index ea0421099e..0000000000 --- a/infusions/forum/upgrade/2.2.1.upgrade.inc +++ /dev/null @@ -1,28 +0,0 @@ - " CHANGE post_id post_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, add PRIMARY KEY (post_id)", -]; -foreach ($change_forums as $key => $value) { - if (column_exists(DB_POST_NOTIFY, $key, FALSE)) { - $inf_altertable[] = DB_POST_NOTIFY.$value; - } -}