function install_mod() { global $context, $mod_name, $has_db_changes; $context['mod_name'] = $mod_name; $context['sub_template'] = 'install_script'; $context['page_title_html_safe'] = 'Install script of the mod: ' . $mod_name; if (isset($_GET['action'])) { $context['uninstalling'] = $_GET['action'] == 'uninstall' ? true : false; } $context['html_headers'] .= ' <style type="text/css"> .buttonlist ul { margin:0 auto; display:table; } </style>'; $context['has_db_changes'] = false; $context['apply_db_changes'] = false; $context['warning_missing_db_changes'] = false; if ($has_db_changes) { $context['has_db_changes'] = true; if (file_exists(dirname(__FILE__) . '/install_db.php')) { require_once dirname(__FILE__) . '/install_db.php'; $context['apply_db_changes'] = true; } else { $context['warning_missing_db_changes'] = true; } } else { $context['has_db_changes']; } // Sorry, only logged in admins... isAllowedTo('admin_forum'); loadLanguage('install'); if (isset($context['uninstalling'])) { setup_hooks(); if ($context['apply_db_changes']) { $context['db_changes'] = setup_dbchanges($context['uninstalling']); } } }
function install_mod() { global $context, $mod_name; $context['mod_name'] = $mod_name; $context['sub_template'] = 'install_script'; $context['page_title_html_safe'] = 'Install script of the mod: ' . $mod_name; if (isset($_GET['action'])) { $context['uninstalling'] = $_GET['action'] == 'uninstall' ? true : false; } $context['html_headers'] .= ' <style type="text/css"> .buttonlist ul { margin:0 auto; display:table; } </style>'; // Sorry, only logged in admins... isAllowedTo('admin_forum'); if (isset($context['uninstalling'])) { setup_hooks(); } }