function xoops_module_update_tag(&$module, $prev_version = null) { load_functions("config"); mod_clearConfg($module->getVar("dirname", "n")); if ($prev_version <= 150) { $GLOBALS['xoopsDB']->queryFromFile(XOOPS_ROOT_PATH . "/modules/" . $module->getVar("dirname") . "/sql/mysql.150.sql"); } /* Do some synchronization */ mod_loadFunctions("recon", $module->getVar("dirname")); tag_synchronization(); return true; }
function xoops_module_update_newbb(&$module, $oldversion = null) { load_functions("config"); mod_clearConfg($module->getVar("dirname", "n")); $newbbConfig = newbb_load_config(); //$oldversion = $module->getVar('version'); //$oldconfig = $module->getVar('hasconfig'); // NewBB 1.0 -- no config //if (empty($oldconfig)) { if ($oldversion == 100) { include_once dirname(__FILE__) . "/module.v100.php"; xoops_module_update_newbb_v100($module); } // NewBB 2.* and CBB 1.* // change group permission name // change forum moderators if ($oldversion < 220) { include_once dirname(__FILE__) . "/module.v220.php"; xoops_module_update_newbb_v220($module); } if ($oldversion < 230) { $GLOBALS['xoopsDB']->queryFromFile(XOOPS_ROOT_PATH . "/modules/" . $module->getVar("dirname", "n") . "/sql/upgrade_230.sql"); //$module->setErrors("bb_moderates table inserted"); } if ($oldversion < 304) { $GLOBALS['xoopsDB']->queryFromFile(XOOPS_ROOT_PATH . "/modules/" . $module->getVar("dirname", "n") . "/sql/mysql.304.sql"); } if ($oldversion < 400) { $GLOBALS['xoopsDB']->queryFromFile(XOOPS_ROOT_PATH . "/modules/" . $module->getVar("dirname", "n") . "/sql/mysql.400.sql"); include dirname(__FILE__) . "/module.v400.php"; xoops_module_update_newbb_v400($module); } if ($oldversion < 403) { $sql = "\tALTER TABLE " . $GLOBALS['xoopsDB']->prefix("bb_posts") . " CHANGE `poster_ip` `poster_ipd` varchar(15) NOT NULL default '0.0.0.0'"; $GLOBALS['xoopsDB']->queryF($sql); } if (!empty($newbbConfig["syncOnUpdate"])) { mod_loadFunctions("recon", "newbb"); newbb_synchronization(); } return true; }