Commit 7b47c0aa authored by tbrehm's avatar tbrehm
Browse files

Merged revisions 4069-4117 from stable branch.

parent 2332b227
......@@ -163,7 +163,23 @@ class installer_dist extends installer_base {
if(!is_group($cf['vmail_groupname'])) caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
$command = 'useradd -g '.$cf['vmail_groupname'].' -u '.$cf['vmail_userid'].' '.$cf['vmail_username'].' -d '.$cf['vmail_mailbox_base'].' -m';
if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* These postconf commands will be executed on installation and update
$server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ".$conf['server_id']);
$server_ini_array = ini_to_array(stripslashes($server_ini_rec['config']));
unset($server_ini_rec);
//* If there are RBL's defined, format the list and add them to smtp_recipient_restrictions to prevent removeal after an update
$rbl_list = '';
if (@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') {
$rbl_hosts = explode(",",str_replace(" ", "", $server_ini_array['mail']['realtime_blackhole_list']));
foreach ($rbl_hosts as $key => $value) {
$rbl_list .= ", reject_rbl_client ". $value;
}
}
unset($rbl_hosts);
unset($server_ini_array);
//* These postconf commands will be executed on installation and update
$postconf_placeholders = array('{config_dir}' => $config_dir,
......
......@@ -178,6 +178,22 @@ class installer_dist extends installer_base {
if($cf['vmail_mailbox_base'] != '' && strlen($cf['vmail_mailbox_base']) >= 10 && $this->is_update === false) exec('chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base']);
//* These postconf commands will be executed on installation and update
$server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ".$conf['server_id']);
$server_ini_array = ini_to_array(stripslashes($server_ini_rec['config']));
unset($server_ini_rec);
//* If there are RBL's defined, format the list and add them to smtp_recipient_restrictions to prevent removeal after an update
$rbl_list = '';
if (@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') {
$rbl_hosts = explode(",",str_replace(" ", "", $server_ini_array['mail']['realtime_blackhole_list']));
foreach ($rbl_hosts as $key => $value) {
$rbl_list .= ", reject_rbl_client ". $value;
}
}
unset($rbl_hosts);
unset($server_ini_array);
//* These postconf commands will be executed on installation and update
$postconf_placeholders = array('{config_dir}' => $config_dir,
'{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
......
......@@ -571,7 +571,8 @@ if($install_mode == 'standard') {
}*/
//** Configure ISPConfig :-)
if(strtolower($inst->simple_query('Install ISPConfig Web Interface',array('y','n'),'y')) == 'y') {
$install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] == 'y')?'n':'y';
if(strtolower($inst->simple_query('Install ISPConfig Web Interface',array('y','n'),$install_ispconfig_interface_default)) == 'y') {
swriteln('Installing ISPConfig');
//** We want to check if the server is a module or cgi based php enabled server
......
......@@ -400,7 +400,7 @@ class installer_base {
$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
}
$query = "GRANT SELECT, UPDATE(`status`) ON ".$value['db'].".`sys_datalog` TO '".$value['user']."'@'".$host."' ";
$query = "GRANT SELECT, UPDATE(`status`, `error`) ON ".$value['db'].".`sys_datalog` TO '".$value['user']."'@'".$host."' ";
if ($verbose){
echo $query ."\n";
}
......@@ -2094,8 +2094,8 @@ class installer_base {
}
$root_cron_jobs = array(
"* * * * * ".$install_dir."/server/server.sh > /dev/null 2>> ".$conf['ispconfig_log_dir']."/cron.log",
"30 00 * * * ".$install_dir."/server/cron_daily.sh > /dev/null 2>> ".$conf['ispconfig_log_dir']."/cron.log"
"* * * * * ".$install_dir."/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` \"\$line\" >> ".$conf['ispconfig_log_dir']."/cron.log; done",
"30 00 * * * ".$install_dir."/server/cron_daily.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` \"\$line\" >> ".$conf['ispconfig_log_dir']."/cron.log; done"
);
if ($conf['nginx']['installed'] == true) {
......
......@@ -35,7 +35,7 @@ class db
var $dbUser = ""; // database authorized user
var $dbPass = ""; // user's password
var $dbCharset = ""; // what charset comes and goes to mysql: utf8 / latin1
var $linkId = 0; // last result of mysql_connect()
var $linkId = false; // last result of mysql_connect()
var $queryId = 0; // last result of mysql_query()
var $record = array(); // last record fetched
var $autoCommit = 1; // Autocommit Transactions
......@@ -61,8 +61,8 @@ class db
// error handler
function updateError($location)
{
$this->errorNumber = mysql_errno();
$this->errorMessage = mysql_error();
$this->errorNumber = mysqli_errno($this->linkId);
$this->errorMessage = mysqli_error($this->linkId);
$this->errorLocation = $location;
if($this->errorNumber && $this->show_error_messages)
{
......@@ -73,16 +73,16 @@ class db
function connect()
{
if($this->linkId == 0)
if(!$this->linkId)
{
$this->linkId = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);
$this->linkId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass);
if(!$this->linkId)
{
$this->updateError('DB::connect()<br />mysql_connect');
$this->updateError('DB::connect()<br />mysqli_connect');
return false;
}
$this->queryId = @mysql_query('SET NAMES '.$this->dbCharset, $this->linkId);
$this->queryId = @mysqli_query($this->linkId, 'SET NAMES '.$this->dbCharset);
}
return true;
}
......@@ -94,14 +94,14 @@ class db
return false;
}
if($this->dbName != '') {
if(!mysql_select_db($this->dbName, $this->linkId))
if(!mysqli_select_db($this->linkId, $this->dbName))
{
$this->updateError('DB::connect()<br />mysql_select_db');
$this->updateError('DB::connect()<br />mysqli_select_db');
return false;
}
}
$this->queryId = @mysql_query($queryString, $this->linkId);
$this->updateError('DB::query('.$queryString.')<br />mysql_query');
$this->queryId = @mysqli_query($this->linkId, $queryString);
$this->updateError('DB::query('.$queryString.')<br />mysqli_query');
if(!$this->queryId)
{
return false;
......@@ -138,8 +138,8 @@ class db
// returns the next record in an array
function nextRecord()
{
$this->record = mysql_fetch_assoc($this->queryId);
$this->updateError('DB::nextRecord()<br />mysql_fetch_array');
$this->record = mysqli_fetch_assoc($this->queryId);
$this->updateError('DB::nextRecord()<br />mysqli_fetch_array');
if(!$this->record || !is_array($this->record))
{
return false;
......@@ -151,18 +151,18 @@ class db
// returns number of rows returned by the last select query
function numRows()
{
return mysql_num_rows($this->queryId);
return mysqli_num_rows($this->queryId);
}
function affectedRows()
{
return mysql_affected_rows($this->linkId);
return mysqli_affected_rows($this->linkId);
}
// returns mySQL insert id
function insertID()
{
return mysql_insert_id($this->linkId);
return mysqli_insert_id($this->linkId);
}
// Check der variablen
......@@ -175,7 +175,7 @@ class db
// Check der variablen
function quote($formfield)
{
return mysql_real_escape_string($formfield);
return mysqli_real_escape_string($this->linkId, $formfield);
}
// Check der variablen
......@@ -359,11 +359,22 @@ class db
if($database_name == ''){
$database_name = $this->dbName;
}
$result = mysql_query("SHOW TABLES FROM `$database_name`");
$tables = $this->queryAllRecords("SHOW TABLES FROM `$database_name`");
$tb_names = array();
if(is_array($tables) && !empty($tables)){
for($i = 0; $i < sizeof($tables); $i++){
$tb_names[$i] = $tables[$i]['Tables_in_'.$database_name];
}
}
/*
$result = mysqli_query("SHOW TABLES FROM `$database_name`");
$tb_names = array();
for ($i = 0; $i < mysql_num_rows($result); $i++) {
for ($i = 0; $i < mysqli_num_rows($result); $i++) {
$tb_names[$i] = mysql_tablename($result, $i);
}
*/
return $tb_names;
}
......@@ -438,35 +449,7 @@ class db
} else {
return false;
}
//$this->createTable('tester',$columns);
/*
$result = mysql_list_fields($go_info["server"]["db_name"],$table_name);
$fields = mysql_num_fields ($result);
$i = 0;
$table = mysql_field_table ($result, $i);
while ($i < $fields) {
$name = mysql_field_name ($result, $i);
$type = mysql_field_type ($result, $i);
$len = mysql_field_len ($result, $i);
$flags = mysql_field_flags ($result, $i);
print_r($flags);
$columns = array(name => $name,
type => "",
defaultValue => "",
isnull => 1,
option => "");
$returnvar[] = $columns;
$i++;
}
*/
}
function mapType($metaType,$typeValue) {
......
ALTER TABLE `web_backup` CHANGE `backup_type` `backup_type` enum('web','mongodb','mysql') NOT NULL DEFAULT 'web';
ALTER TABLE `web_database_user` ADD `database_password_mongo` varchar(32) DEFAULT NULL AFTER `database_password`;
ALTER TABLE `sys_datalog` ADD `error` MEDIUMTEXT NULL DEFAULT NULL;
CREATE TABLE `client_template_assigned` (
`assigned_template_id` bigint(20) NOT NULL auto_increment,
`client_id` bigint(11) NOT NULL DEFAULT '0',
`client_template_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`assigned_template_id`),
KEY `client_id` (`client_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
ALTER TABLE `client` ADD `gender` enum('','m','f') NOT NULL DEFAULT '' AFTER `company_id`,
ADD `locked` enum('n','y') NOT NULL DEFAULT 'n' AFTER `created_at`,
ADD `canceled` enum('n','y') NOT NULL DEFAULT 'n' AFTER `locked`,
ADD `tmp_data` mediumblob AFTER `canceled` ;
......@@ -145,6 +145,7 @@ CREATE TABLE `client` (
`sys_perm_other` varchar(5) DEFAULT NULL,
`company_name` varchar(64) DEFAULT NULL,
`company_id` varchar(30) DEFAULT NULL,
`gender` enum('','m','f') NOT NULL DEFAULT '',
`contact_name` varchar(64) DEFAULT NULL,
`customer_no` varchar(64) DEFAULT NULL,
`vat_id` varchar(64) DEFAULT NULL,
......@@ -225,6 +226,9 @@ CREATE TABLE `client` (
`template_master` int(11) unsigned NOT NULL DEFAULT '0',
`template_additional` text NOT NULL DEFAULT '',
`created_at` bigint(20) DEFAULT NULL,
`locked` enum('n','y') NOT NULL DEFAULT 'n',
`canceled` enum('n','y') NOT NULL DEFAULT 'n',
`tmp_data` mediumblob,
`id_rsa` varchar(2000) NOT NULL DEFAULT '',
`ssh_rsa` varchar(600) NOT NULL DEFAULT '',
PRIMARY KEY (`client_id`)
......@@ -315,6 +319,19 @@ CREATE TABLE `client_template` (
-- --------------------------------------------------------
--
-- Table structure for table `client_template_assigned`
--
CREATE TABLE `client_template_assigned` (
`assigned_template_id` bigint(20) NOT NULL auto_increment,
`client_id` bigint(11) NOT NULL DEFAULT '0',
`client_template_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`assigned_template_id`),
KEY `client_id` (`client_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `country`
--
......@@ -1428,6 +1445,7 @@ CREATE TABLE `sys_datalog` (
`user` varchar(255) NOT NULL default '',
`data` longtext NOT NULL,
`status` set('pending','ok','warning','error') NOT NULL default 'ok',
`error` mediumtext,
PRIMARY KEY (`datalog_id`),
KEY `server_id` (`server_id`,`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......@@ -2179,6 +2197,6 @@ INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`,
-- Dumping data for table `sys_config`
--
INSERT INTO sys_config VALUES ('1','db','db_version','3.0.5.2');
INSERT INTO sys_config VALUES ('1','db','db_version','3.0.5.3');
SET FOREIGN_KEY_CHECKS = 1;
......@@ -56,7 +56,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
//** Application
define('ISPC_APP_TITLE', 'ISPConfig');
define('ISPC_APP_VERSION', '3.0.5.2');
define('ISPC_APP_VERSION', '3.0.5.3');
define('DEVSYSTEM', 0);
......
......@@ -41,3 +41,9 @@ tab_change_warning=n
use_loadindicator=y
use_combobox=y
maintenance_mode=n
admin_dashlets_left=
admin_dashlets_right=
reseller_dashlets_left=
reseller_dashlets_right=
client_dashlets_left=
client_dashlets_right=
......@@ -9,7 +9,94 @@
class client_templates {
function apply_client_templates($clientId) {
/**
* - check for old-style templates and change to new style
* - update assigned templates
*/
function update_client_templates($clientId, $templates = array()) {
global $app, $conf;
if(!is_array($templates)) return false;
$new_tpl = array();
$used_assigned = array();
$needed_types = array();
$old_style = true;
foreach($templates as $item) {
$item = trim($item);
if($item == '') continue;
$tpl_id = 0;
$assigned_id = 0;
if(strpos($item, ':') === false) {
$tpl_id = $item;
} else {
$old_style = false; // has new-style assigns
list($assigned_id, $tpl_id) = explode(':', $item, 2);
if(substr($assigned_id, 0, 1) === 'n') $assigned_id = 0; // newly inserted items
}
if(array_key_exists($tpl_id, $needed_types) == false) $needed_types[$tpl_id] = 0;
$needed_types[$tpl_id]++;
if($assigned_id > 0) {
$used_assigned[] = $assigned_id; // for comparison with database
} else {
$new_tpl[] = $tpl_id;
}
}
if($old_style == true) {
// we have to take care of this in an other way
$in_db = $app->db->queryAllRecords('SELECT `assigned_template_id`, `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $clientId);
if(is_array($in_db) && count($in_db) > 0) {
foreach($in_db as $item) {
if(array_key_exists($item['client_template_id'], $needed_types) == false) $needed_types[$item['client_template_id']] = 0;
$needed_types[$item['client_template_id']]--;
}
}
foreach($needed_types as $tpl_id => $count) {
if($count > 0) {
// add new template to client (includes those from old-style without assigned_template_id)
for($i = $count; $i > 0; $i--) {
$app->db->query('INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (' . $clientId . ', ' . $tpl_id . ')');
}
} elseif($count < 0) {
// remove old ones
for($i = $count; $i < 0; $i++) {
$app->db->query('DELETE FROM `client_template_assigned` WHERE client_id = ' . $clientId . ' AND client_template_id = ' . $tpl_id . ' LIMIT 1');
}
}
}
} else {
// we have to take care of this in an other way
$in_db = $app->db->queryAllRecords('SELECT `assigned_template_id`, `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $clientId);
if(is_array($in_db) && count($in_db) > 0) {
// check which templates were removed from this client
foreach($in_db as $item) {
if(in_array($item['assigned_template_id'], $used_assigned) == false) {
// delete this one
$app->db->query('DELETE FROM `client_template_assigned` WHERE `assigned_template_id` = ' . $item['assigned_template_id']);
}
}
}
if(count($new_tpl) > 0) {
foreach($new_tpl as $item) {
// add new template to client (includes those from old-style without assigned_template_id)
$app->db->query('INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (' . $clientId . ', ' . $item . ')');
}
}
}
unset($new_tpl);
unset($in_db);
unset($templates);
unset($used_assigned);
return true;
}
function apply_client_templates($clientId) {
global $app;
include('../client/form/client.tform.php');
......@@ -20,8 +107,14 @@ class client_templates {
$sql = "SELECT template_master, template_additional FROM client WHERE client_id = " . $app->functions->intval($clientId);
$record = $app->db->queryOneRecord($sql);
$masterTemplateId = $record['template_master'];
$additionalTemplateStr = $record['template_additional'];
if($record['template_additional'] != '') {
// we have to call the update_client_templates function
$templates = explode('/', $record['template_additional']);
$this->update_client_templates($clientId, $templates);
$app->db->query('UPDATE `client` SET `template_additional` = \'\' WHERE `client_id` = ' . $app->functions->intval($clientId));
}
/*
* if the master-Template is custom there is NO changing
*/
......@@ -40,82 +133,82 @@ class client_templates {
* if != -1)
*/
$addTpl = explode('/', $additionalTemplateStr);
foreach ($addTpl as $item){
if (trim($item) != ''){
$sql = "SELECT * FROM client_template WHERE template_id = " . $app->functions->intval($item);
$addLimits = $app->db->queryOneRecord($sql);
$app->log('Template processing subtemplate ' . $item . ' for client ' . $clientId, LOGLEVEL_DEBUG);
/* maybe the template is deleted in the meantime */
if (is_array($addLimits)){
foreach($addLimits as $k => $v){
/* we can remove this condition, but it is easier to debug with it (don't add ids and other non-limit values) */
if (strpos($k, 'limit') !== false or $k == 'ssh_chroot' or $k == 'web_php_options' or $k == 'force_suexec'){
$app->log('Template processing key ' . $k . ' for client ' . $clientId, LOGLEVEL_DEBUG);
$addTpls = $app->db->queryAllRecords('SELECT `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $app->functions->intval($clientId));
foreach ($addTpls as $addTpl){
$item = $addTpl['client_template_id'];
$sql = "SELECT * FROM client_template WHERE template_id = " . $app->functions->intval($item);
$addLimits = $app->db->queryOneRecord($sql);
$app->log('Template processing subtemplate ' . $item . ' for client ' . $clientId, LOGLEVEL_DEBUG);
/* maybe the template is deleted in the meantime */
if (is_array($addLimits)){
foreach($addLimits as $k => $v){
/* we can remove this condition, but it is easier to debug with it (don't add ids and other non-limit values) */
if (strpos($k, 'limit') !== false or $k == 'ssh_chroot' or $k == 'web_php_options' or $k == 'force_suexec'){
$app->log('Template processing key ' . $k . ' for client ' . $clientId, LOGLEVEL_DEBUG);
/* process the numerical limits */
if (is_numeric($v)){
/* switch for special cases */
switch ($k){
case 'limit_cron_frequency':
if ($v < $limits[$k]) $limits[$k] = $v;
/* silent adjustment of the minimum cron frequency to 1 minute */
/* maybe this control test should be done via validator definition in tform.php file, but I don't know how */
if ($limits[$k] < 1) $limits[$k] = 1;
break;
/* process the numerical limits */
if (is_numeric($v)){
/* switch for special cases */
switch ($k){
case 'limit_cron_frequency':
if ($v < $limits[$k]) $limits[$k] = $v;
/* silent adjustment of the minimum cron frequency to 1 minute */
/* maybe this control test should be done via validator definition in tform.php file, but I don't know how */
if ($limits[$k] < 1) $limits[$k] = 1;
break;
default:
if ($limits[$k] > -1){
if ($v == -1){
$limits[$k] = -1;
}
else {
$limits[$k] += $v;
}
default:
if ($limits[$k] > -1){
if ($v == -1){
$limits[$k] = -1;
}
else {
$limits[$k] += $v;
}
}
}
/* process the string limits (CHECKBOXARRAY, SELECT etc.) */
elseif (is_string($v)){
switch ($form["tabs"]["limits"]["fields"][$k]['formtype']){
case 'CHECKBOXARRAY':
if (!isset($limits[$k])){
$limits[$k] = array();
}
}
/* process the string limits (CHECKBOXARRAY, SELECT etc.) */
elseif (is_string($v)){
switch ($form["tabs"]["limits"]["fields"][$k]['formtype']){
case 'CHECKBOXARRAY':
if (!isset($limits[$k])){
$limits[$k] = array();
}
$limits_values = $limits[$k];
if (is_string($limits[$k])){
$limits_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits[$k]);
}
$additional_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$v);
$app->log('Template processing key ' . $k . ' type CHECKBOXARRAY, lim / add: ' . implode(',', $limits_values) . ' / ' . implode(',', $additional_values) . ' for client ' . $clientId, LOGLEVEL_DEBUG);
/* unification of limits_values (master template) and additional_values (additional template) */
$limits_unified = array();
foreach($form["tabs"]["limits"]["fields"][$k]["value"] as $key => $val){
if (in_array($key,$limits_values) || in_array($key,$additional_values)) $limits_unified[] = $key;
$limits_values = $limits[$k];
if (is_string($limits[$k])){
$limits_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits[$k]);
}
$additional_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$v);
$app->log('Template processing key ' . $k . ' type CHECKBOXARRAY, lim / add: ' . implode(',', $limits_values) . ' / ' . implode(',', $additional_values) . ' for client ' . $clientId, LOGLEVEL_DEBUG);
/* unification of limits_values (master template) and additional_values (additional template) */
$limits_unified = array();
foreach($form["tabs"]["limits"]["fields"][$k]["value"] as $key => $val){
if (in_array($key,$limits_values) || in_array($key,$additional_values)) $limits_unified[] = $key;
}
$limits[$k] = implode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits_unified);
break;
case 'CHECKBOX':
if($k == 'force_suexec') {
// 'n' is less limited than y
if (!isset($limits[$k])){
$limits[$k] = 'y';
}
$limits[$k] = implode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits_unified);
break;
case 'CHECKBOX':
if($k == 'force_suexec') {
// 'n' is less limited than y
if (!isset($limits[$k])){
$limits[$k] = 'y';
}
if($limits[$k] == 'n' || $v == 'n') $limits[$k] = 'n';
} else {
// 'y' is less limited than n
if (!isset($limits[$k])){
$limits[$k] = 'n';
}
if($limits[$k] == 'y' || $v == 'y') $limits[$k] = 'y';
if($limits[$k] == 'n' || $v == 'n') $limits[$k] = 'n';
} else {
// 'y' is less limited than n
if (!isset($limits[$k])){
$limits[$k] = 'n';
}
break;
case 'SELECT':
$limit_values = array_keys($form["tabs"]["limits"]["fields"][$k]["value"]);
/* choose the lower index of the two SELECT items */
$limits[$k] = $limit_values[min(array_search($limits[$k], $limit_values), array_search($v, $limit_values))];
break;
if($limits[$k] == 'y' || $v == 'y') $limits[$k] = 'y';
}
break;