Skip to content
Snippets Groups Projects
Commit eab60a4d authored by Leif Andersson's avatar Leif Andersson
Browse files

Rensade upp några närmast kosmetiska buggar.

parent e7060a14
Branches
No related tags found
No related merge requests found
......@@ -90,7 +90,7 @@ if (isset($params['maxparticipants'])) {
. 'has already been reached for this event. ';
//echo '<pre>'; print_r($numparticipants); echo'</pre>';
if ($numparticipants < $maxparticipants) {
if ($numParticipants < $maxparticipants) {
$smarty->assign('participants',$partMessage);
} else {
$smarty->assign('tooMany',$tooManyMessage);
......@@ -98,7 +98,7 @@ if (isset($params['maxparticipants'])) {
}
}
if ($params['send']) {
if (isset($params['send'])) {
$fieldsOK = true;
foreach (RegisterUtils::$mandatoryKeys as $key) {
if ($reg->values[$key] == '') {
......
......@@ -54,7 +54,7 @@ class RegisterUtils {
}
foreach (self::$mandatoryKeys as $key) {
$this->values[$key] = '';
if($params[$key]) {
if(isset($params[$key])) {
$val = htmlspecialchars_decode(trim($params[$key]));
$this->mandatory[$key] = $val;
$this->values[$key] = $val;
......@@ -62,7 +62,7 @@ class RegisterUtils {
}
foreach (self::$optionalKeys as $key) {
$this->values[$key] = '';
if($params[$key]) {
if(isset($params[$key])) {
$val = htmlspecialchars_decode(trim($params[$key]));
$this->optional[$key] = $val;
$this->values[$key] = $val;
......@@ -73,9 +73,11 @@ class RegisterUtils {
$check = 'meal'.$i++;
$this->checkBoxes[$key] = $check;
$this->selectedBoxes[$key] = '';
if (isset($params[$check])) {
$res = $params[$check];
if ($res) $this->selectedBoxes[$key] = $res;
}
}
//echo '<pre>'; print_r($this->values); echo '</pre>';
}
public function getNumParticipants(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment