本文整理汇总了PHP中build_options函数的典型用法代码示例。如果您正苦于以下问题:PHP build_options函数的具体用法?PHP build_options怎么用?PHP build_options使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了build_options函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: define
define('SCRIPT_REDIRECT', true);
} else {
$sellanguages = array();
while ($language = $db->fetch_array($languages)) {
$sellanguages[$language['languageid']] = $language['title'];
}
$languageids = implode(',', array_keys($sellanguages));
$db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "user\n\t\t\tSET languageid = 0\n\t\t\tWHERE languageid NOT IN ({$languageids})\n\t\t");
if (empty($vbulletin->GPC['languageid'])) {
print_form_header('tools', 'language');
print_table_header('Select the new default language');
print_select_row('Language', 'languageid', $sellanguages, $vbulletin->options['languageid']);
print_submit_row('Submit', '');
} else {
$db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "setting\n\t\t\t\tSET value = " . $vbulletin->GPC['languageid'] . "\n\t\t\t\tWHERE varname = 'languageid'\n\t\t\t");
build_options();
build_language($vbulletin->GPC['languageid']);
build_language_datastore();
define('SCRIPT_REDIRECT', true);
}
}
}
}
}
if (defined('SCRIPT_REDIRECT')) {
echo '<p align="center" class="smallfont"><a href="tools.php" onclick="javascript:clearTimeout(timerID);">' . $vbphrase['processing_complete_proceed'] . '</a></p>';
echo "\n<script type=\"text/javascript\">\n";
echo "myvar = \"\"; timeout = " . 10 . ";\n\tfunction exec_refresh()\n\t{\n\t\twindow.status=\"" . $vbphrase['redirecting'] . "\"+myvar; myvar = myvar + \" .\";\n\t\ttimerID = setTimeout(\"exec_refresh();\", 100);\n\t\tif (timeout > 0)\n\t\t{ timeout -= 1; }\n\t\telse { clearTimeout(timerID); window.status=\"\"; window.location=\"tools.php\"; }\n\t}\n\texec_refresh();";
echo "\n</script>\n";
}
?>
示例2: array
$replace = array(" :: ", "", $friendly);
$prettyprint = ucwords(str_replace($search, $replace, $friendly));
$optionslist[$optionc] = htmlspecialchars($prettyprint);
}
}
return $optionslist;
}
include "head.inc";
display_top_tabs(make_tabs());
if ($input_errors && count($input_errors)) {
print_input_errors($input_errors);
}
$form = new Form(false);
$section = new Form_Section('Graph settings');
$group = new Form_Group('Options');
$group->add(new Form_Select('option', 'Graphs', $curoption, build_options()))->setHelp('Graph');
$group->add(new Form_Select('style', 'Style', $curstyle, $styles))->setHelp('Style');
$group->add(new Form_Select('period', 'Period', $curperiod, $periods))->setHelp('Period');
if ($curcat == 'custom') {
$group->setHelp('Any changes to these option may not take affect until the next auto-refresh.');
}
$section->add($group);
if ($curcat == 'custom') {
$section->addInput(new Form_Input('cat', null, 'hidden', 'custom'));
$tz = date_default_timezone_get();
$tz_msg = gettext("Enter date and/or time. Current timezone:") . " {$tz}";
$start_fmt = strftime("%m/%d/%Y %H:%M:%S", $start);
$end_fmt = strftime("%m/%d/%Y %H:%M:%S", $end);
$group = new Form_Group('');
$group->add(new Form_Input('start', 'Start', 'datetime', $start_fmt))->setHelp('Start');
$group->add(new Form_Input('end', 'End', 'datetime', $end_fmt))->setHelp('End');
示例3: post_install
//.........这里部分代码省略.........
$cron['active'] = $cron['active'] ? 1 : 0;
$cron['loglevel'] = $cron['loglevel'] ? 1 : 0;
$scheduling = $cron['scheduling'];
$scheduling['weekday'] = intval($scheduling['weekday']);
$scheduling['day'] = intval($scheduling['day']);
$scheduling['hour'] = intval($scheduling['hour']);
$scheduling['minute'] = explode(',', preg_replace('#[^0-9,-]#i', '', $scheduling['minute']));
if (count($scheduling['minute']) == 0) {
$scheduling['minute'] = array(0);
} else {
$scheduling['minute'] = array_map('intval', $scheduling['minute']);
}
/*insert query*/
$this->db->query_write("\n\t\t\t\t\tREPLACE INTO " . TABLE_PREFIX . "cron\n\t\t\t\t\t\t(weekday, day, hour, minute, filename, loglevel, active, varname, volatile, product)\n\t\t\t\t\tVALUES\n\t\t\t\t\t\t({$scheduling['weekday']},\n\t\t\t\t\t\t{$scheduling['day']},\n\t\t\t\t\t\t{$scheduling['hour']},\n\t\t\t\t\t\t'" . $this->db->escape_string(serialize($scheduling['minute'])) . "',\n\t\t\t\t\t\t'" . $this->db->escape_string($cron['filename']) . "',\n\t\t\t\t\t\t{$cron['loglevel']},\n\t\t\t\t\t\t{$cron['active']},\n\t\t\t\t\t\t'" . $this->db->escape_string($cron['varname']) . "',\n\t\t\t\t\t\t1,\n\t\t\t\t\t\t'" . $this->db->escape_string($this->productinfo['productid']) . "')\n\t\t\t\t");
$cronid = $this->db->insert_id();
// replace either inserts, or deletes+inserts
if ($cronid) {
build_cron_item($cronid);
}
$rebuild['cron'] = true;
}
}
// ############## import faq
if (!empty($this->productobj['faqentries']['faq']) and is_array($this->productobj['faqentries']['faq'])) {
$faq_entries =& $this->productobj['faqentries']['faq'];
if (!isset($faq_entries[0])) {
$faq_entries = array($faq_entries);
}
$sql = array();
foreach ($faq_entries as $faq) {
$sql[] = "\n\t\t\t\t\t('" . $this->db->escape_string($faq['faqname']) . "',\n\t\t\t\t\t'" . $this->db->escape_string($faq['faqparent']) . "',\n\t\t\t\t\t" . intval($faq['displayorder']) . ",\n\t\t\t\t\t1,\n\t\t\t\t\t'" . $this->db->escape_string($this->productinfo['productid']) . "')\n\t\t\t\t";
}
if ($sql) {
/*insert query*/
$this->db->query_write("\n\t\t\t\t\tREPLACE INTO " . TABLE_PREFIX . "faq\n\t\t\t\t\t\t(faqname, faqparent, displayorder, volatile, product)\n\t\t\t\t\tVALUES\n\t\t\t\t\t\t" . implode(',', $sql) . "\n\t\t\t\t");
}
}
$this->productinfo['process'] = VB_AREA;
$this->productinfo['username'] = 'Product-' . VB_AREA;
import_navigation($this->productobj, $this->productinfo);
$products = fetch_product_list(true);
// Check if the plugin system is disabled. If it is, enable it if this product isn't installed.
if (!$this->registry->options['enablehooks'] and !$products[$this->productinfo['productid']]) {
$this->db->query_write("\n\t\t\t\tUPDATE " . TABLE_PREFIX . "setting\n\t\t\t\tSET value = '1'\n\t\t\t\tWHERE varname = 'enablehooks'\n\t\t\t");
$rebuild['options'] = true;
}
// Now rebuild everything we need...
if ($rebuild['plugins']) {
vBulletinHook::build_datastore($this->db);
if ($this->active) {
$plugin_data = $this->db->query_read("\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM " . TABLE_PREFIX . "datastore\n\t\t\t\t\tWHERE title IN ('pluginlist', 'pluginlistadmin')\n\t\t\t\t");
while ($plugin_info = $this->db->fetch_array($plugin_data)) {
if ($plugin_info['title'] == 'pluginlist') {
$this->registry->pluginlist = unserialize($plugin_info['data']);
} else {
if ($plugin_info['title'] == 'pluginlistadmin') {
$this->registry->pluginlistadmin = unserialize($plugin_info['data']);
}
}
}
// enable any hooks -- this is mainly necessary for importing templates (template_safe_functions hook)
if (!defined('DISABLE_HOOKS') and VB_AREA != 'Upgrade') {
if (!empty($this->registry->pluginlistadmin) and is_array($this->registry->pluginlistadmin)) {
$this->registry->pluginlist = array_merge($this->registry->pluginlist, $this->registry->pluginlistadmin);
unset($this->registry->pluginlistadmin);
}
vBulletinHook::set_pluginlist($this->registry->pluginlist, $vbulletin->options['hookerrors']);
}
}
}
if ($rebuild['templates']) {
if ($error = build_all_styles(0, 0, '', false, 'standard')) {
return $error;
}
if ($error = build_all_styles(0, 0, '', false, 'mobile')) {
return $error;
}
}
if ($rebuild['phrases']) {
require_once DIR . '/includes/adminfunctions_language.php';
build_language();
}
if ($rebuild['options']) {
build_options();
}
if ($rebuild['cron']) {
require_once DIR . '/includes/functions_cron.php';
build_cron_next_run();
}
build_product_datastore();
build_activitystream_datastore();
// build bitfields to remove/add this products bitfields
vB_Bitfield_Builder::save($this->db);
// reload block types
$blockmanager = vB_BlockManager::create($this->registry);
$blockmanager->reloadBlockTypes();
print_dots_stop();
$this->productinfo['need_merge'] = ($rebuild['templates'] and $installed_version);
return $this->productinfo;
}
示例4: log_upgrade_step
function log_upgrade_step()
{
global $vbulletin, $steptitles, $upgradecore_phrases;
if (THIS_SCRIPT == 'finalupgrade.php') {
return;
}
if (defined('SCRIPTCOMPLETE')) {
require_once DIR . '/includes/adminfunctions_template.php';
if (is_newer_version(VERSION, $vbulletin->options['templateversion'])) {
echo "<ul><li>" . $upgradecore_phrases['update_v_number'];
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "setting SET value = '" . VERSION . "' WHERE varname = 'templateversion'");
} else {
echo "<ul><li>" . $upgradecore_phrases['skipping_v_number_update'];
}
build_options();
echo "<b>{$upgradecore_phrases['done']}</b></li></ul>";
}
if (is_numeric($vbulletin->GPC['step']) and !defined('NO_LOG')) {
// use time() not TIMENOW to actually time the script's execution
/*insert query*/
$vbulletin->db->query_write("\n\t\t\tINSERT INTO " . TABLE_PREFIX . "upgradelog(script, steptitle, step, startat, perpage, dateline)\n\t\t\tVALUES ('" . THIS_SCRIPT . "', '" . $vbulletin->db->escape_string($steptitles["{$vbulletin->GPC['step']}"]) . "', " . (defined('SCRIPTCOMPLETE') ? 0 : $vbulletin->GPC['step']) . ", {$vbulletin->GPC['startat']}, {$vbulletin->GPC['perpage']}, " . time() . ")\n\t\t");
}
}
示例5: check_options
/**
* Checks that the options item has come out of the datastore correctly
* and sets the 'versionnumber' variable
*/
function check_options()
{
if (!isset($this->registry->options['templateversion'])) {
// fatal error - options not loaded correctly
require_once DIR . '/includes/adminfunctions.php';
require_once DIR . '/includes/functions.php';
$this->register('options', build_options(), 0);
}
// set the short version number
$this->registry->options['simpleversion'] = SIMPLE_VERSION . $this->registry->config['Misc']['jsver'];
}
示例6: xml_restore_settings
/**
* Restores a settings backup from an XML file
*
* Call as follows:
* $path = './path/to/install/vbulletin-settings.xml';
* xml_import_settings($xml);
*
* @param mixed Either XML string or boolean false to use $path global variable
* @param bool Ignore blacklisted settings
*/
function xml_restore_settings($xml = false, $blacklist = true)
{
global $vbulletin, $vbphrase;
$newsettings = array();
print_dots_start('<b>' . $vbphrase['importing_settings'] . "</b>, {$vbphrase['please_wait']}", ':', 'dspan');
require_once DIR . '/includes/class_xml.php';
$xmlobj = new vB_XML_Parser($xml, $GLOBALS['path']);
if ($xmlobj->error_no == 1) {
print_dots_stop();
print_stop_message('no_xml_and_no_path');
} else {
if ($xmlobj->error_no == 2) {
print_dots_stop();
print_stop_message('please_ensure_x_file_is_located_at_y', 'vbulletin-settings.xml', $GLOBALS['path']);
}
}
if (!($newsettings = $xmlobj->parse())) {
print_dots_stop();
print_stop_message('xml_error_x_at_line_y', $xmlobj->error_string(), $xmlobj->error_line());
}
if (!$newsettings['setting']) {
print_dots_stop();
print_stop_message('invalid_file_specified');
}
$product = empty($newsettings['product']) ? 'vbulletin' : $newsettings['product'];
foreach ($newsettings['setting'] as $setting) {
// Loop to update all the settings
$vbulletin->db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "setting\n\t\t\tSET value='" . $vbulletin->db->escape_string($setting['value']) . "'\n\t\t\tWHERE varname ='" . $vbulletin->db->escape_string($setting['varname']) . "'\n\t\t\t\tAND product ='" . $vbulletin->db->escape_string($product) . "'\n\t\t\t\t" . ($blacklist ? "AND blacklist = 0" : "") . "\n\t\t");
}
unset($newsettings);
// rebuild the $vbulletin->options array
build_options();
// stop the 'dots' counter feedback
print_dots_stop();
}
示例7: toggle_subs
function toggle_subs()
{
global $vbulletin;
// bit of a hack, will most likely change this to a datastore item in the future
$setting = 0;
if ($check = $vbulletin->db->query_first("\n\t\tSELECT paymentapiid\n\t\tFROM " . TABLE_PREFIX . "paymentapi\n\t\tWHERE active = 1\n\t")) {
if ($check = $vbulletin->db->query_first("\n\t\t\tSELECT subscriptionid\n\t\t\tFROM " . TABLE_PREFIX . "subscription\n\t\t\tWHERE active = 1\n\t\t")) {
$setting = 1;
}
}
if ($setting != $vbulletin->options['subscriptionmethods']) {
// update $vboptions
$vbulletin->db->query_write("\n\t\t\tUPDATE " . TABLE_PREFIX . "setting\n\t\t\tSET value = '{$setting}'\n\t\t\tWHERE varname = 'subscriptionmethods'\n\t\t");
build_options();
}
}
示例8: log_upgrade_step
/**
* Log the current location of the upgrade
*
* @param string Upgrade Step
* @param int Startat value for multi step steps
* @param bool Process only the current version upgrade
*/
public function log_upgrade_step($step, $startat = 0, $only = false)
{
$complete = $step == $this->stepcount;
$perpage = 0;
$insertstep = true;
if ($complete) {
$step = 0;
if ($this->SHORT_VERSION == 'final' or $only) {
$this->db->query_write("\n\t\t\t\t\tDELETE FROM " . TABLE_PREFIX . "upgradelog\n\t\t\t\t\tWHERE script IN ('final', 'vbblog', 'vbcms', 'skimlinks', 'forumrunner', 'postrelease')\n\t\t\t\t");
$insertstep = false;
} else {
if (is_newer_version($this->LONG_VERSION, $this->registry->options['templateversion'])) {
$this->db->query_write("UPDATE " . TABLE_PREFIX . "setting SET value = '" . $this->LONG_VERSION . "' WHERE varname = 'templateversion'");
}
if (!defined('SKIPDB')) {
build_options();
}
$this->registry->options['templateversion'] = $this->LONG_VERSION;
}
}
if ($insertstep and !defined('SKIPDB')) {
// use time() not TIMENOW to actually time the script's execution
/*insert query*/
$this->db->query_write("\n\t\t\t\tINSERT INTO " . TABLE_PREFIX . "upgradelog(script, steptitle, step, startat, perpage, dateline, only)\n\t\t\t\tVALUES (\n\t\t\t\t\t'" . $this->db->escape_string($this->SHORT_VERSION) . "',\n\t\t\t\t\t'',\n\t\t\t\t\t{$step},\n\t\t\t\t\t{$startat},\n\t\t\t\t\t{$perpage},\n\t\t\t\t\t" . time() . ",\n\t\t\t\t\t" . intval($only) . "\n\t\t\t)");
}
}
示例9: install_product
//.........这里部分代码省略.........
" . intval($faq['displayorder']) . ",
1,
'" . $db->escape_string($info['productid']) . "')
";
}
if ($sql)
{
/*insert query*/
$db->query_write("
REPLACE INTO " . TABLE_PREFIX . "faq
(faqname, faqparent, displayorder, volatile, product)
VALUES
" . implode(',', $sql) . "
");
}
}
// Check if the plugin system is disabled. If it is, enable it.
if (!$vbulletin->options['enablehooks'])
{
$db->query_write("
UPDATE " . TABLE_PREFIX . "setting
SET value = '1'
WHERE varname = 'enablehooks'
");
$rebuild['options'] = true;
}
// Now rebuild everything we need...
if ($rebuild['plugins'])
{
vBulletinHook::build_datastore($db);
if ($active)
{
$plugin_data = $db->query_read("
SELECT *
FROM " . TABLE_PREFIX . "datastore
WHERE title IN ('pluginlist', 'pluginlistadmin')
");
while ($plugin_info = $db->fetch_array($plugin_data))
{
if ($plugin_info['title'] == 'pluginlist')
{
$vbulletin->pluginlist = unserialize($plugin_info['data']);
}
else if ($plugin_info['title'] == 'pluginlistadmin')
{
$vbulletin->pluginlistadmin = unserialize($plugin_info['data']);
}
}
// enable any hooks -- this is mainly necessary for importing templates (template_safe_functions hook)
if (!defined('DISABLE_HOOKS'))
{
if (!empty($vbulletin->pluginlistadmin) AND is_array($vbulletin->pluginlistadmin))
{
$vbulletin->pluginlist = array_merge($vbulletin->pluginlist, $vbulletin->pluginlistadmin);
unset($vbulletin->pluginlistadmin);
}
vBulletinHook::set_pluginlist($vbulletin->pluginlist);
}
}
}
if ($rebuild['templates'])
{
build_all_styles();
}
if ($rebuild['phrases'])
{
require_once(DIR . '/includes/adminfunctions_language.php');
build_language();
}
if ($rebuild['options'])
{
build_options();
}
if ($rebuild['cron'])
{
require_once(DIR . '/includes/functions_cron.php');
build_cron_next_run();
}
build_product_datastore();
// build bitfields to remove/add this products bitfields
vB_Bitfield_Builder::save($db);
// reload block types
$blockmanager = vB_BlockManager::create($vbulletin);
$blockmanager->reloadBlockTypes();
print_dots_stop();
$info['need_merge'] = ($rebuild['templates'] AND $installed_version);
return $info;
}
示例10: check_options
/**
* Checks that the options item has come out of the datastore correctly
* and sets the 'versionnumber' variable
*/
function check_options()
{
if ($this->checked_options)
{
return;
}
if (!isset($this->registry->options['templateversion']))
{
// fatal error - options not loaded correctly
require_once(DIR . '/includes/adminfunctions.php');
require_once(DIR . '/includes/functions.php');
$this->register('options', build_options(), 0);
}
// set the short version number
$this->registry->options['simpleversion'] = SIMPLE_VERSION . (isset($this->registry->config['Misc']['jsver']) ? $this->registry->config['Misc']['jsver'] : '');
// set the version number variable
$this->registry->versionnumber =& $this->registry->options['templateversion'];
$this->checked_options = true;
}
示例11: build_list
function build_list($name, $table, $valueCol, $displayCol, $selected = '', $where = '1', $leaveBlankOption = false, $order_by = '')
{
$returnData = "<select name='{$name}' id='{$name}'>";
if ($leaveBlankOption) {
$returnData .= "<option></option>";
}
$returnData .= build_options($table, $valueCol, $displayCol, $selected, $where, $order_by);
$returnData .= "</select>";
return $returnData;
}
示例12: update_project_forum_setting
/**
* Called internally, to update the global setting that determines whether any
* projects will be shown in the forum list.
*
* @param bool Whether this project wants to display itself in the forum list
*/
function update_project_forum_setting($display_forum)
{
$db =& $this->registry->db;
if ($display_forum) {
// the setting needs to be enabled
$new_value = '1';
} else {
// check if there are others with this set, if not turn vb option off (else turn it on)
if ($db->query_first("\r\n\t\t\t\tSELECT projectid\r\n\t\t\t\tFROM " . TABLE_PREFIX . "pt_project\r\n\t\t\t\tWHERE afterforumids <> ''\r\n\t\t\t\t\tAND projectid <> " . intval($this->fetch_field('projectid')) . "\r\n\t\t\t\tLIMIT 1\r\n\t\t\t")) {
$new_value = '1';
} else {
$new_value = '0';
}
}
$db->query_write("\r\n\t\t\tUPDATE " . TABLE_PREFIX . "setting SET\r\n\t\t\t\tvalue = '" . $db->escape_string($new_value) . "'\r\n\t\t\tWHERE varname = 'pt_hasprojectforums'\r\n\t\t");
build_options();
}
示例13: form_levels
public function form_levels()
{
return build_options(AppUser::$levels);
}
示例14: build_options
private function build_options()
{
require_once DIR . '/includes/adminfunctions.php';
build_options();
}
示例15: deleteGroupSettings
/**
* Delete group of settings
* @param string $groupTitle
* @return mixed response
*/
public function deleteGroupSettings($groupTitle)
{
$this->checkHasAdminPermission('canadminsettings');
require_once DIR . '/includes/class_xml.php';
require_once DIR . '/includes/functions_file.php';
require_once DIR . '/includes/adminfunctions_options.php';
$response = array();
// get some info
/*$group = $vbulletin->db->query_first("
SELECT *
FROM " . TABLE_PREFIX . "settinggroup
WHERE grouptitle = '" . $vbulletin->db->escape_string($vbulletin->GPC['title']) . "'"
);*/
$group = vB::getDbAssertor()->getRow('settinggroup', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_SELECT, 'grouptitle' => $groupTitle));
//check if the settings have different products from the group.
if (defined('DEV_AUTOEXPORT') and DEV_AUTOEXPORT) {
$products_to_export = array();
$products_to_export[$group['product']] = 1;
// query settings from this group
$settings = array();
/*$sets = $vbulletin->db->query_read("
SELECT product
FROM " . TABLE_PREFIX . "setting
WHERE grouptitle = '$group[grouptitle]'
");*/
$sets = vB::getDbAssertor()->assertQuery('setting', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_SELECT, 'grouptitle' => $group['grouptitle']));
//while ($set = $vbulletin->db->fetch_array($sets))
if ($sets and $sets->valid()) {
foreach ($sets as $set) {
$products_to_export[$set['product']] = 1;
}
}
}
// query settings from this group
$settings = array();
/*$sets = $vbulletin->db->query_read("
SELECT varname
FROM " . TABLE_PREFIX . "setting
WHERE grouptitle = '$group[grouptitle]'
");*/
$sets = vB::getDbAssertor()->assertQuery('setting', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_SELECT, 'grouptitle' => $group['grouptitle']));
//while ($set = $vbulletin->db->fetch_array($sets))
if ($sets and $sets->valid()) {
foreach ($sets as $set) {
$settings[] = $set['varname'];
}
}
// build list of phrases to be deleted
$phrases = array("settinggroup_{$group['grouptitle']}");
foreach ($settings as $varname) {
$phrases[] = 'setting_' . $varname . '_title';
$phrases[] = 'setting_' . $varname . '_desc';
}
// delete phrases
/*$vbulletin->db->query_write("
DELETE FROM " . TABLE_PREFIX . "phrase
WHERE languageid IN (-1,0) AND
fieldname = 'vbsettings' AND
varname IN ('" . implode("', '", $phrases) . "')
");*/
$deletePhrases = vB::getDbAssertor()->assertQuery('vBForum:phrase', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_DELETE, 'languageid' => array(-1, 0), 'fieldname' => 'vbsettings', 'varname' => $phrases));
if ($deletePhrases['errors']) {
$response['errors'] = $deletePhrases['errors'];
}
// delete settings
/*$vbulletin->db->query_write("
DELETE FROM " . TABLE_PREFIX . "setting
WHERE varname IN ('" . implode("', '", $settings) . "')
");*/
if (count($settings) >= 1) {
$deleteSettings = vB::getDbAssertor()->assertQuery('setting', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_DELETE, 'varname' => $settings));
if ($deleteSettings['errors']) {
$response['errors'] = $deleteSettings['errors'];
}
}
// delete group
/*$vbulletin->db->query_write("
DELETE FROM " . TABLE_PREFIX . "settinggroup
WHERE grouptitle = '" . $vbulletin->db->escape_string($group['grouptitle']) . "'
");*/
$deleteGroupSettings = vB::getDbAssertor()->assertQuery('settinggroup', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_DELETE, 'grouptitle' => $group['grouptitle']));
if ($deleteGroupSettings['errors']) {
$response['errors'] = $deleteGroupSettings['errors'];
}
build_options();
if (defined('DEV_AUTOEXPORT') and DEV_AUTOEXPORT) {
require_once DIR . '/includes/functions_filesystemxml.php';
foreach (array_keys($products_to_export) as $product) {
autoexport_write_settings_and_language(-1, $product);
}
}
$response['delete'] = true;
return $response;
}