protected function ajaxGetNewGroup($setting, $group) { $settings = ConfigurationSettings::singleton(CONF_SETTINGS_BOTH); if ($settings->getSettingType($setting) != 'array') { return array('error', 'notarray'); } $type = $settings->getArrayType($setting); switch ($type) { case 'group-bool': if (isset($GLOBALS[$setting]) && isset($GLOBALS[$setting][$group])) { return array('error', 'exists'); } $row = ConfigurationPage::buildGroupSettingRow($setting, $type, User::getAllRights(), true, $group, array()); // Firefox seems to not like that :( return array('ajax', str_replace(' ', ' ', $row)); case 'promotion-conds': if (isset($GLOBALS[$setting]) && isset($GLOBALS[$setting][$group])) { return array('error', 'exists'); } return array('ajax', ConfigurationPage::buildPromotionCondsSettingRow($setting, true, $group, array())); default: return array('error', 'notvalidarray'); } }