]> wagnertech.de Git - timetracker.git/commitdiff
Refactoring - removed not used default parameters from constructors.
authoranuko <support@anuko.com>
Fri, 3 Mar 2017 17:06:34 +0000 (17:06 +0000)
committeranuko <support@anuko.com>
Fri, 3 Mar 2017 17:06:34 +0000 (17:06 +0000)
13 files changed:
WEB-INF/lib/form/Checkbox.class.php
WEB-INF/lib/form/CheckboxGroup.class.php
WEB-INF/lib/form/Combobox.class.php
WEB-INF/lib/form/Form.class.php
WEB-INF/lib/form/Hidden.class.php
WEB-INF/lib/form/PasswordField.class.php
WEB-INF/lib/form/Submit.class.php
WEB-INF/lib/form/Table.class.php
WEB-INF/lib/form/TextArea.class.php
WEB-INF/lib/form/TextField.class.php
WEB-INF/lib/form/UploadFile.class.php
WEB-INF/templates/footer.tpl
reports.php

index 999bff873e741585d45f8a0b927ce4892f7324f6..c27cab24c8a1705cfbc0bc2694fbf0b3b26a2528 100644 (file)
@@ -32,10 +32,9 @@ class Checkbox extends FormElement {
   var $checked = false;
     var $mOptions      = null;
 
   var $checked = false;
     var $mOptions      = null;
 
-  function __construct($name, $value = '') {
+  function __construct($name) {
     $this->class = 'Checkbox';
     $this->name = $name;
     $this->class = 'Checkbox';
     $this->name = $name;
-    $this->value = $value;
   }
 
        function setChecked($value) { $this->checked = $value; }
   }
 
        function setChecked($value) { $this->checked = $value; }
index f6722704bfacfb36b165dc466b3c13e8db6ce48e..0bb3ac42df39da71afc3a0af9abc2b718cb88d61 100644 (file)
@@ -38,10 +38,9 @@ class CheckboxGroup extends FormElement {
     var $lSelAll       = "All";
     var $lSelNone      = "None";
 
     var $lSelAll       = "All";
     var $lSelNone      = "None";
 
-  function __construct($name, $value = '') {
+  function __construct($name) {
     $this->class = 'CheckboxGroup';
     $this->name = $name;
     $this->class = 'CheckboxGroup';
     $this->name = $name;
-    $this->value = $value;
   }
 
        function setChecked($value)     { $this->mChecked = $value; }
   }
 
        function setChecked($value)     { $this->mChecked = $value; }
index 97c9c50e7b218283f71bb559b61023679f33e432..88f0b50a933c3ebff149a0e257921bbf12a04573 100644 (file)
@@ -45,10 +45,9 @@ class Combobox extends FormElement {
     var $mDataDeep = 1;
     var $mDataKeys = array();
 
     var $mDataDeep = 1;
     var $mDataKeys = array();
 
-  function __construct($name, $value = '') {
+  function __construct($name) {
     $this->class = 'Combobox';
     $this->name = $name;
     $this->class = 'Combobox';
     $this->name = $name;
-    $this->value = $value;
   }
 
        function setMultiple($value)    { $this->mMultiple = $value; }
   }
 
        function setMultiple($value)    { $this->mMultiple = $value; }
index be2c901fc5f878201e0586f95eb5d6bc28345dfe..e871743d0bb1e1af5141c3d07db317702d5a9538 100644 (file)
@@ -85,7 +85,7 @@ class Form {
       case 'checkbox':
         import('form.Checkbox');
         $el = new Checkbox($params['name']);
       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"]);
 
 // TODO: refactoring ongoing down from here.
                            $el->setData(@$params["data"]);
index 3693f84c4b7729c63f1b0d89ef4347260821dd88..6e59bc8e1a43b1e218a90890672e95827bc5e151 100644 (file)
@@ -30,10 +30,9 @@ import('form.FormElement');
 
 class Hidden extends FormElement {
 
 
 class Hidden extends FormElement {
 
-  function __construct($name, $value = '') {
+  function __construct($name) {
     $this->class = 'Hidden';
     $this->name = $name;
     $this->class = 'Hidden';
     $this->name = $name;
-    $this->value = $value;
   }
 
   function getHtml() {
   }
 
   function getHtml() {
index 7fd6624ef39a24b0a09ae045bb64fa3cf0990b96..747a6ac45caf8c8999f5f23625b330bc83187a99 100644 (file)
@@ -30,11 +30,10 @@ import('form.FormElement');
 
 class PasswordField extends FormElement {
 
 
 class PasswordField extends FormElement {
 
-  function __construct($name, $value='')
+  function __construct($name)
   {
     $this->class = 'PasswordField';
     $this->name = $name;
   {
     $this->class = 'PasswordField';
     $this->name = $name;
-    $this->value = $value;
   }
 
   function getHtml() {
   }
 
   function getHtml() {
index 91123c5519a34c4a8708f664069f2e0be5b6a8e1..35eb6df3df54f9bfe5a0ea1577b0903ff79d97f0 100644 (file)
@@ -30,11 +30,10 @@ import('form.FormElement');
        
 class Submit extends FormElement {
 
        
 class Submit extends FormElement {
 
-  function __construct($name, $value = '')
+  function __construct($name)
   {
     $this->class = 'Submit';
     $this->name = $name;
   {
     $this->class = 'Submit';
     $this->name = $name;
-    $this->value = $value;
   }
 
   function getHtml() {
   }
 
   function getHtml() {
index ec3510c80eae8b090b6459a04253706e4223fa69..78fddf5045556ca868a32118aca0f7ab28f5a76b 100644 (file)
@@ -46,10 +46,9 @@ class Table extends FormElement {
   var $mHeaderOptions = array();
   var $mProccessed    = false;
        
   var $mHeaderOptions = array();
   var $mProccessed    = false;
        
-  function __construct($name, $value='') {
+  function __construct($name) {
     $this->class = 'Table';
     $this->name = $name;
     $this->class = 'Table';
     $this->name = $name;
-    $this->value = $value;
   }
   
   function setKeyField($value) {
   }
   
   function setKeyField($value) {
index 66101b98d9affb210b06caef49760e2463978fc5..5d48466853b8fcb8537e340724bc71b41f633dbd 100644 (file)
@@ -33,13 +33,12 @@ class TextArea extends FormElement {
     var $mRows         = "";
     var $mOnKeyPress   = "";
 
     var $mRows         = "";
     var $mOnKeyPress   = "";
 
-  function __construct($name, $value = '')
+  function __construct($name)
   {
     $this->class = 'TextArea';
     $this->name = $name;
   {
     $this->class = 'TextArea';
     $this->name = $name;
-    $this->value = $value;
   }
   }
-       
+
        function setColumns($value)     { $this->mColumns = $value;     }
        function getColumns()   { return $this->mColumns; }
 
        function setColumns($value)     { $this->mColumns = $value;     }
        function getColumns()   { return $this->mColumns; }
 
index 044b3d6de0ebdeb9b68f5fd0681abf2925f5d480..4904e248195cf84806b5de50cf81a654bbc1dc8e 100644 (file)
@@ -30,11 +30,10 @@ import('form.FormElement');
 
 class TextField extends FormElement {
 
 
 class TextField extends FormElement {
 
-  function __construct($name, $value = '')
+  function __construct($name)
   {
     $this->class = 'TextField';
     $this->name = $name;
   {
     $this->class = 'TextField';
     $this->name = $name;
-    $this->value = $value;
   }
 
   // TODO: refactoring ongoing down from here.
   }
 
   // TODO: refactoring ongoing down from here.
index cfb671209e6046ca1e441bb8f5a6b3ba88484d5b..e46f29d3128e4e07650115ec30e45f56c14b4b09 100644 (file)
@@ -31,11 +31,10 @@ import('form.FormElement');
 class UploadFile extends FormElement {
     var $mMaxSize              = 100000;       // 100kb // TODO: refactor this.
 
 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->class = 'UploadFile';
     $this->name = $name;
-    $this->value = $value;
   }
 
 // TODO: refactoring ongoing down from here.
   }
 
 // TODO: refactoring ongoing down from here.
index 0d8c306577399c2acd8f136de80bc317f7cdb13d..0d3bef46c0fc0859755ce4c5d82f85ce0e16ae01 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.10.38.3619 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.10.38.3620 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index cc6edcc287eb11d75c628bea464675e2454f118c..989bf5f3c66034cbcd72f08650655b87959aa943 100644 (file)
@@ -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'=>'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.
 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.