function xoops_module_update_xforum(&$module, $oldversion = null) { $xforumConfig = forum_load_config(); //$oldversion = $module->getVar('version'); //$oldconfig = $module->getVar('hasconfig'); // xforum 1.0 -- no config //if (empty($oldconfig)) { if ($oldversion == 100) { include_once dirname(__FILE__)."/module.v100.php"; xoops_module_update_XFORUM_v100($module); } // xforum 2.* and X-Forum 1.* // change group permission name // change forum moderators if ($oldversion < 220) { include_once dirname(__FILE__)."/module.v220.php"; xoops_module_update_XFORUM_v220($module); } if ($oldversion < 230) { $GLOBALS['xoopsDB']->queryFromFile(XOOPS_ROOT_PATH."/modules/xforum/sql/upgrade_230.sql"); //$module->setErrors("xf_moderates table inserted"); } if ($oldversion < 304) { $GLOBALS['xoopsDB']->queryFromFile(XOOPS_ROOT_PATH."/modules/xforum/sql/mysql.304.sql"); } if ($oldversion < 411) { $GLOBALS['xoopsDB']->queryF("ALTER TABLE " . $GLOBALS['xoopsDB']->prefix('xf_posts') . " ADD COLUMN (`tags` VARCHAR(255) DEFAULT '')"); } if(!empty($xforumConfig["syncOnUpdate"])){ forum_synchronization(); } return true; }
echo '<form action="./admin_forum_manager.php" method="post" name="forummove" id="forummove">'; echo '<input type="hidden" name="op" value="mergeforum" />'; echo '<input type="hidden" name="forum" value=' . $forum_id . ' />'; echo '<table border="0" cellpadding="1" cellspacing="0" align="center" valign="top" width="95%"><tr>'; echo '<td class="bg2" align="center"><strong>' . _AM_XFORUM_MERGETHISFORUM . '</strong></td>'; echo '</tr>'; echo '<tr><td class="bg1" align="center">' . _AM_XFORUM_MERGETO_FORUM . '</td></tr>'; echo '<tr><td class="bg1" align="center">' . $box . '</td></tr>'; echo '<tr><td align="center"><input type="submit" name="save" value=' . _GO . ' class="button" /></td></tr>'; echo '</form></table>'; } break; case 'sync': loadModuleAdminMenu(5, _AM_XFORUM_SYNCFORUM); if (isset($_POST['submit'])) { forum_synchronization(); /* $topic_handler =& xoops_getmodulehandler('topic', 'xforum'); $topic_handler->synchronization(); */ redirect_header("./index.php", 1, _AM_XFORUM_SYNCHING); exit; } else { //loadModuleAdminMenu(3, _AM_XFORUM_SYNCFORUM); echo '<fieldset><legend style="font-weight: bold; color: #900;">' . _AM_XFORUM_SYNCFORUM . '</legend>'; echo '<br /><br /><table width="100%" border="0" cellspacing="1" class="outer"><tr><td class="odd">'; echo '<table border="0" cellpadding="1" cellspacing="1" width="100%">'; echo '<tr class="bg3" align="left">'; echo '<td>' . _AM_XFORUM_CLICKBELOWSYNC . '</td>'; echo '</tr>'; echo '<tr class="bg1" align="center">';