Skip to content

Commit

Permalink
Merge pull request #155 from ggoffy/master
Browse files Browse the repository at this point in the history
fixed bug (missing column) when saving article
  • Loading branch information
mambax7 authored Jan 5, 2021
2 parents 70e25ba + 4c81448 commit fefa383
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/onupdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ function xoops_module_update_publisher(\XoopsModule $module, $previousVersion =
$sql = 'ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix($module->getVar('dirname', 'n') . '_items') . " ADD `dateexpire` INT(11) NULL DEFAULT '0' AFTER `datesub`";
$GLOBALS['xoopsDB']->queryF($sql);
}
// check table items for field `votetype`
if (!$GLOBALS['xoopsDB']->query('SELECT votetype FROM ' . $GLOBALS['xoopsDB']->prefix($module->getVar('dirname', 'n') . '_items'))) {
$sql = 'ALTER TABLE ' . $GLOBALS['xoopsDB']->prefix($module->getVar('dirname', 'n') . '_items') . " ADD `votetype` TINYINT(1) NOT NULL DEFAULT '0' AFTER `item_tag`";
$GLOBALS['xoopsDB']->queryF($sql);
}

return true;
}

0 comments on commit fefa383

Please sign in to comment.