Skip to content

Commit

Permalink
notify save error
Browse files Browse the repository at this point in the history
  • Loading branch information
karrak1 committed Dec 23, 2022
1 parent c2ec250 commit 21c5a36
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
5 changes: 3 additions & 2 deletions infusions/forum/infusion.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// Infusion general information
$inf_title = $locale['forums']['title'];
$inf_description = $locale['forums']['description'];
$inf_version = '2.2.0';
$inf_version = '2.2.1';
$inf_developer = 'PHP Fusion Development Team';
$inf_email = 'info@phpfusion.com';
$inf_weburl = 'https://phpfusion.com';
Expand Down Expand Up @@ -231,12 +231,13 @@
) ENGINE=MyISAM DEFAULT CHARSET=UTF8 COLLATE=utf8_unicode_ci";

$inf_newtable[] = DB_POST_NOTIFY." (
post_id MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0',
post_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
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";

Expand Down
28 changes: 28 additions & 0 deletions infusions/forum/upgrade/2.2.1.upgrade.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) PHP Fusion Inc
| https://phpfusion.com/
+--------------------------------------------------------+
| Filename: 2.2.1.upgrade.inc
| Author: Core Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
$inf_version = '2.2.1';

$settings = get_settings('forum');
$change_forums = [
'post_id' => " 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;
}
}

0 comments on commit 21c5a36

Please sign in to comment.