Merge with master

This commit is contained in:
Romain Neutron
2012-01-05 14:56:13 +01:00
5 changed files with 33 additions and 27 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
/nbproject/*
/config/*
!.gitignore
/vendor/.composer/

View File

@@ -539,14 +539,16 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper
return $this;
}
$user = User_adapter::getInstance(array_pop($this->users), appbox::get_instance());
$users = $this->users;
$user = \User_adapter::getInstance(array_pop($users), appbox::get_instance());
if ($user->is_template())
{
return $this;
}
$appbox = appbox::get_instance();
$appbox = \appbox::get_instance();
$session = $appbox->get_session();
$request = \http_request::getInstance();
@@ -567,13 +569,9 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper
$parm = $request->get_parms_from_serialized_datas($infos, 'user_infos');
foreach ($this->users as $usr_id)
{
if (!\mail::validateEmail($parm['email']))
throw new \Exception_InvalidArgument(_('Email addess is not valid'));
$user = User_Adapter::getInstance($usr_id, $appbox);
$user->set_firstname($parm['first_name'])
->set_lastname($parm['last_name'])
->set_email($parm['email'])
@@ -585,7 +583,6 @@ class Edit extends \Alchemy\Phrasea\Helper\Helper
->set_company($parm['company'])
->set_tel($parm['telephone'])
->set_fax($parm['fax']);
}
return $this;
}

View File

@@ -801,7 +801,7 @@ function sqlFromFilters($usr, $filters)
$params[':like1'] = $start . $filter->fieldsearch . $end;
break;
case "NAME" :
$precise.=" (usr_nom " . $like . " :like2 OR usr_prenom like like2bis)";
$precise.=" (usr_nom " . $like . " :like2 OR usr_prenom like :like2bis)";
$params[':like2'] = $start . $filter->fieldsearch . $end;
$params[':like2bis'] = $start . $filter->fieldsearch . $end;
break;
@@ -845,7 +845,7 @@ function sqlFromFilters($usr, $filters)
$c['country' . $n] = $country;
}
$n++;
$precise.=" AND usr.pays IN (" . implode(", ", array_keys($c)) . ")";
$precise.=" AND usr.pays IN (:" . implode(", :", array_keys($c)) . ")";
$params = array_merge($params, $c);
}
if (count($filters->activite) > 0 && trim($filters->activite[0]) != '')
@@ -857,7 +857,7 @@ function sqlFromFilters($usr, $filters)
$c['activite' . $n] = $activite;
}
$n++;
$precise.=" AND usr.activite IN ('" . implode(", ", array_keys($c)) . "')";
$precise.=" AND usr.activite IN (:" . implode(", :", array_keys($c)) . ")";
$params = array_merge($params, $c);
}
if (count($filters->fonction) > 0 && trim($filters->fonction[0]) != '')
@@ -869,7 +869,7 @@ function sqlFromFilters($usr, $filters)
$c['fonction' . $n] = $fonction;
}
$n++;
$precise.=" AND usr.fonction IN ('" . implode(", ", array_keys($c)) . "')";
$precise.=" AND usr.fonction IN (:" . implode(", :", array_keys($c)) . ")";
$params = array_merge($params, $c);
}
if (count($filters->societe) > 0 && trim($filters->societe[0]) != '')
@@ -881,7 +881,7 @@ function sqlFromFilters($usr, $filters)
$c['societe' . $n] = $societe;
}
$n++;
$precise.=" AND usr.societe IN ('" . implode(", ", array_keys($c)) . "')";
$precise.=" AND usr.societe IN (:" . implode(", :", array_keys($c)) . ")";
$params = array_merge($params, $c);
}
if (count($filters->template) > 0 && trim($filters->template[0]) != '')
@@ -893,7 +893,7 @@ function sqlFromFilters($usr, $filters)
$c['template' . $n] = $template;
}
$n++;
$precise.=" AND usr.lastModel IN ('" . implode(", ", array_keys($c)) . "')";
$precise.=" AND usr.lastModel IN (:" . implode(", :", array_keys($c)) . ")";
$params = array_merge($params, $c);
}
}

View File

@@ -208,7 +208,7 @@ class eventsmanager_notify_validationdone extends eventsmanager_notifyAbstract
$subject = sprintf(
_('push::mail:: Rapport de validation de %1$s pour %2$s'),
$to['name'],
$from['name'],
$basket->getName()
);

View File

@@ -334,6 +334,8 @@ if ($act == "STEP2")
$htmlacti = '<option value="">Toutes</option>';
foreach ($rs as $row)
{
if(trim($row['activite']) === '')
continue;
$htmlacti .= '<option value="' . $row['activite'] . '">' . $row['activite'] . '</option>';
}
@@ -341,6 +343,8 @@ if ($act == "STEP2")
$htmlfonction = '<option value="">Toutes</option>';
foreach ($rs as $row)
{
if(trim($row['fonction']) === '')
continue;
$htmlfonction .= '<option value="' . $row['fonction'] . '">' . $row['fonction'] . '</option>';
}
@@ -357,6 +361,8 @@ if ($act == "STEP2")
$htmlsocie = '<option value="">Toutes</option>';
foreach ($rs as $row)
{
if(trim($row['societe']) === '')
continue;
$htmlsocie .= '<option value="' . $row['societe'] . '">' . $row['societe'] . '</option>';
}
@@ -364,6 +370,8 @@ if ($act == "STEP2")
$htmltemplate = '<option value="">Toutes</option>';
foreach ($rs as $row)
{
if(trim($row['lastModel']) === '')
continue;
$htmltemplate .= '<option value="' . $row['lastModel'] . '">' . $row['lastModel'] . '</option>';
}
?>