From bbeceada71e2e43cbe77dd903ccab35519aa3d7f Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 23 Oct 2016 16:26:58 +0000 Subject: [PATCH] Work in progress renaming variables after PR#24 merge. --- WEB-INF/lib/ttTeamHelper.class.php | 22 +++++++++++----------- profile_edit.php | 10 +++++----- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 6e433109..9a6dc35b 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -701,13 +701,13 @@ class ttTeamHelper { $record_type_v = ''; } - $uncompleted_entries = $fields['uncompleted_entries']; - if ($uncompleted_entries !== null) { - $uncompleted_entries_f = ', uncompleted_indicators'; - $uncompleted_entries_v = ', ' . (int)$uncompleted_entries; + $uncompleted_indicators = $fields['uncompleted_entries']; + if ($uncompleted_indicators !== null) { + $uncompleted_indicators_f = ', uncompleted_indicators'; + $uncompleted_indicators_v = ', ' . (int)$uncompleted_indicators; } else { - $uncompleted_entries_f = ''; - $uncompleted_entries_v = ''; + $uncompleted_indicators_f = ''; + $uncompleted_indicators_v = ''; } $workday_hours = $fields['workday_hours']; @@ -719,11 +719,11 @@ class ttTeamHelper { $workday_hours_v = ''; } - $sql = "insert into tt_teams (name, address, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $record_type_f $uncompleted_entries_f $workday_hours_f) + $sql = "insert into tt_teams (name, address, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $record_type_f $uncompleted_indicators_f $workday_hours_f) values(".$mdb2->quote(trim($fields['name'])). ", ".$mdb2->quote(trim($fields['address'])). ", ".$mdb2->quote(trim($fields['currency']))." $lockspec_v, ".$mdb2->quote($lang). - "$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $record_type_v $uncompleted_entries_v $workday_hours_v)"; + "$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $record_type_v $uncompleted_indicators_v $workday_hours_v)"; $affected = $mdb2->exec($sql); if (!is_a($affected, 'PEAR_Error')) { @@ -751,7 +751,7 @@ class ttTeamHelper { $week_start_part = ''; $tracking_mode_part = ''; $record_type_part = ''; - $uncompleted_entries_part = ''; + $uncompleted_indicators_part = ''; $plugins_part = ''; $lock_spec_part = ''; $workday_hours_part = ''; @@ -765,14 +765,14 @@ class ttTeamHelper { if (isset($fields['week_start'])) $week_start_part = ', week_start = '.intval($fields['week_start']); if (isset($fields['tracking_mode'])) $tracking_mode_part = ', tracking_mode = '.intval($fields['tracking_mode']); if (isset($fields['record_type'])) $record_type_part = ', record_type = '.intval($fields['record_type']); - if (isset($fields['uncompleted_entries'])) $uncompleted_entries_part = ', uncompleted_indicators = '.intval($fields['uncompleted_entries']); + if (isset($fields['uncompleted_entries'])) $uncompleted_indicators_part = ', uncompleted_indicators = '.intval($fields['uncompleted_entries']); if (isset($fields['plugins'])) $plugins_part = ', plugins = '.$mdb2->quote($fields['plugins']); if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']); if (isset($fields['workday_hours'])) $workday_hours_part = ', workday_hours = '.$mdb2->quote($fields['workday_hours']); $sql = "update tt_teams set $name_part $addr_part $currency_part $lang_part $decimal_mark_part $date_format_part $time_format_part $week_start_part $tracking_mode_part $record_type_part - $uncompleted_entries_part $plugins_part $lock_spec_part $workday_hours_part where id = $team_id"; + $uncompleted_indicators_part $plugins_part $lock_spec_part $workday_hours_part where id = $team_id"; $affected = $mdb2->exec($sql); if (is_a($affected, 'PEAR_Error')) return false; diff --git a/profile_edit.php b/profile_edit.php index 546d634c..bc056a64 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -170,11 +170,11 @@ if ($user->canManageTeam()) { $record_type_options[TYPE_DURATION] = $i18n->getKey('form.profile.type_duration'); $form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type)); - // Prepare uncompleted entries choices. - $uncompleted_entries_options = array(); - $uncompleted_entries_options[UNCOMPLETED_INDICATORS_NONE] = $i18n->getKey('form.profile.uncompleted_indicators_none'); - $uncompleted_entries_options[UNCOMPLETED_INDICATORS] = $i18n->getKey('form.profile.uncompleted_indicators_show'); - $form->addInput(array('type'=>'combobox','name'=>'uncompleted_entries','style'=>'width: 150px;','data'=>$uncompleted_entries_options,'value'=>$cl_uncompleted_entries)); + // Prepare uncompleted indicators choices. + $uncompleted_indicators_options = array(); + $uncompleted_indicators_options[UNCOMPLETED_INDICATORS_NONE] = $i18n->getKey('form.profile.uncompleted_indicators_none'); + $uncompleted_indicators_options[UNCOMPLETED_INDICATORS] = $i18n->getKey('form.profile.uncompleted_indicators_show'); + $form->addInput(array('type'=>'combobox','name'=>'uncompleted_entries','style'=>'width: 150px;','data'=>$uncompleted_indicators_options,'value'=>$cl_uncompleted_entries)); $form->addInput(array('type'=>'checkbox','name'=>'charts','data'=>1,'value'=>$cl_charts)); $form->addInput(array('type'=>'checkbox','name'=>'clients','data'=>1,'value'=>$cl_clients,'onchange'=>'handlePluginCheckboxes()')); -- 2.20.1