From: anuko Date: Fri, 3 Mar 2017 17:06:34 +0000 (+0000) Subject: Refactoring - removed not used default parameters from constructors. X-Git-Tag: timetracker_1.19-1~1532 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4fdb2cd8b1c8990a7ea8ed40b275dc51174e6585;p=timetracker.git Refactoring - removed not used default parameters from constructors. --- diff --git a/WEB-INF/lib/form/Checkbox.class.php b/WEB-INF/lib/form/Checkbox.class.php index 999bff87..c27cab24 100644 --- a/WEB-INF/lib/form/Checkbox.class.php +++ b/WEB-INF/lib/form/Checkbox.class.php @@ -32,10 +32,9 @@ class Checkbox extends FormElement { var $checked = false; var $mOptions = null; - function __construct($name, $value = '') { + function __construct($name) { $this->class = 'Checkbox'; $this->name = $name; - $this->value = $value; } function setChecked($value) { $this->checked = $value; } diff --git a/WEB-INF/lib/form/CheckboxGroup.class.php b/WEB-INF/lib/form/CheckboxGroup.class.php index f6722704..0bb3ac42 100644 --- a/WEB-INF/lib/form/CheckboxGroup.class.php +++ b/WEB-INF/lib/form/CheckboxGroup.class.php @@ -38,10 +38,9 @@ class CheckboxGroup extends FormElement { var $lSelAll = "All"; var $lSelNone = "None"; - function __construct($name, $value = '') { + function __construct($name) { $this->class = 'CheckboxGroup'; $this->name = $name; - $this->value = $value; } function setChecked($value) { $this->mChecked = $value; } diff --git a/WEB-INF/lib/form/Combobox.class.php b/WEB-INF/lib/form/Combobox.class.php index 97c9c50e..88f0b50a 100644 --- a/WEB-INF/lib/form/Combobox.class.php +++ b/WEB-INF/lib/form/Combobox.class.php @@ -45,10 +45,9 @@ class Combobox extends FormElement { var $mDataDeep = 1; var $mDataKeys = array(); - function __construct($name, $value = '') { + function __construct($name) { $this->class = 'Combobox'; $this->name = $name; - $this->value = $value; } function setMultiple($value) { $this->mMultiple = $value; } diff --git a/WEB-INF/lib/form/Form.class.php b/WEB-INF/lib/form/Form.class.php index be2c901f..e871743d 100644 --- a/WEB-INF/lib/form/Form.class.php +++ b/WEB-INF/lib/form/Form.class.php @@ -85,7 +85,7 @@ class Form { case 'checkbox': import('form.Checkbox'); $el = new Checkbox($params['name']); - if (isset($params['checked'])) $el->setChecked(true); + if (isset($params['checked'])) $el->setChecked($params['checked']); // TODO: refactoring ongoing down from here. $el->setData(@$params["data"]); diff --git a/WEB-INF/lib/form/Hidden.class.php b/WEB-INF/lib/form/Hidden.class.php index 3693f84c..6e59bc8e 100644 --- a/WEB-INF/lib/form/Hidden.class.php +++ b/WEB-INF/lib/form/Hidden.class.php @@ -30,10 +30,9 @@ import('form.FormElement'); class Hidden extends FormElement { - function __construct($name, $value = '') { + function __construct($name) { $this->class = 'Hidden'; $this->name = $name; - $this->value = $value; } function getHtml() { diff --git a/WEB-INF/lib/form/PasswordField.class.php b/WEB-INF/lib/form/PasswordField.class.php index 7fd6624e..747a6ac4 100644 --- a/WEB-INF/lib/form/PasswordField.class.php +++ b/WEB-INF/lib/form/PasswordField.class.php @@ -30,11 +30,10 @@ import('form.FormElement'); class PasswordField extends FormElement { - function __construct($name, $value='') + function __construct($name) { $this->class = 'PasswordField'; $this->name = $name; - $this->value = $value; } function getHtml() { diff --git a/WEB-INF/lib/form/Submit.class.php b/WEB-INF/lib/form/Submit.class.php index 91123c55..35eb6df3 100644 --- a/WEB-INF/lib/form/Submit.class.php +++ b/WEB-INF/lib/form/Submit.class.php @@ -30,11 +30,10 @@ import('form.FormElement'); class Submit extends FormElement { - function __construct($name, $value = '') + function __construct($name) { $this->class = 'Submit'; $this->name = $name; - $this->value = $value; } function getHtml() { diff --git a/WEB-INF/lib/form/Table.class.php b/WEB-INF/lib/form/Table.class.php index ec3510c8..78fddf50 100644 --- a/WEB-INF/lib/form/Table.class.php +++ b/WEB-INF/lib/form/Table.class.php @@ -46,10 +46,9 @@ class Table extends FormElement { var $mHeaderOptions = array(); var $mProccessed = false; - function __construct($name, $value='') { + function __construct($name) { $this->class = 'Table'; $this->name = $name; - $this->value = $value; } function setKeyField($value) { diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 66101b98..5d484668 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -33,13 +33,12 @@ class TextArea extends FormElement { var $mRows = ""; var $mOnKeyPress = ""; - function __construct($name, $value = '') + function __construct($name) { $this->class = 'TextArea'; $this->name = $name; - $this->value = $value; } - + function setColumns($value) { $this->mColumns = $value; } function getColumns() { return $this->mColumns; } diff --git a/WEB-INF/lib/form/TextField.class.php b/WEB-INF/lib/form/TextField.class.php index 044b3d6d..4904e248 100644 --- a/WEB-INF/lib/form/TextField.class.php +++ b/WEB-INF/lib/form/TextField.class.php @@ -30,11 +30,10 @@ import('form.FormElement'); class TextField extends FormElement { - function __construct($name, $value = '') + function __construct($name) { $this->class = 'TextField'; $this->name = $name; - $this->value = $value; } // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/lib/form/UploadFile.class.php b/WEB-INF/lib/form/UploadFile.class.php index cfb67120..e46f29d3 100644 --- a/WEB-INF/lib/form/UploadFile.class.php +++ b/WEB-INF/lib/form/UploadFile.class.php @@ -31,11 +31,10 @@ import('form.FormElement'); class UploadFile extends FormElement { var $mMaxSize = 100000; // 100kb // TODO: refactor this. - function __construct($name, $value = '') + function __construct($name) { $this->class = 'UploadFile'; $this->name = $name; - $this->value = $value; } // TODO: refactoring ongoing down from here. diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0d8c3065..0d3bef46 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.10.38.3619 | Copyright © Anuko | +  Anuko Time Tracker 1.10.38.3620 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/reports.php b/reports.php index cc6edcc2..989bf5f3 100644 --- a/reports.php +++ b/reports.php @@ -184,7 +184,7 @@ if ((TYPE_START_FINISH == $user->record_type) || (TYPE_ALL == $user->record_type $form->addInput(array('type'=>'checkbox','name'=>'chfinish','data'=>1)); } $form->addInput(array('type'=>'checkbox','name'=>'chduration','data'=>1)); -$form->addInput(array('type'=>'checkbox','name'=>'chnote','data'=>1)); +$form->addInput(array('type'=>'checkbox','name'=>'chnote','checked'=>true, 'data'=>1)); if (defined('COST_ON_REPORTS') && isTrue(COST_ON_REPORTS)) $form->addInput(array('type'=>'checkbox','name'=>'chcost','data'=>1)); // If we have a custom field - add a checkbox for it.