]> wagnertech.de Git - timetracker.git/commitdiff
Ongoing refactoring - renamed a variable.
authoranuko <support@anuko.com>
Sun, 19 Feb 2017 22:14:28 +0000 (22:14 +0000)
committeranuko <support@anuko.com>
Sun, 19 Feb 2017 22:14:28 +0000 (22:14 +0000)
14 files changed:
WEB-INF/lib/form/Calendar.class.php
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/DateField.class.php
WEB-INF/lib/form/FloatField.class.php
WEB-INF/lib/form/FormElement.class.php
WEB-INF/lib/form/Hidden.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

index 46fcd6eba460a0db0932a3be7eddde3a0f78a9bd..a64a0359d0969221410fe7031d8afe4ebe093738 100644 (file)
@@ -90,7 +90,7 @@ class Calendar extends FormElement {
     function toString($date="") {
       global $i18n;
        
     function toString($date="") {
       global $i18n;
        
-      $indate = $this->mValue;
+      $indate = $this->value;
       if (!$indate) $indate = strftime(DB_DATEFORMAT);
 
       if (!$this->isRenderable()) return "";
       if (!$indate) $indate = strftime(DB_DATEFORMAT);
 
       if (!$this->isRenderable()) return "";
index 8ee4fea03fdc319321558727765a6460855cbb4c..6822adf7f64c1c4922f7ff74458dc34f6cc4d987 100644 (file)
@@ -35,8 +35,8 @@ class Checkbox extends FormElement {
 
        function __construct($name,$value="")
        {
 
        function __construct($name,$value="")
        {
-               $this->name                     = $name;
-               $this->mValue                   = $value;
+               $this->name = $name;
+               $this->value = $value;
        }
 
        function setChecked($value)     { $this->mChecked = $value; }
        }
 
        function setChecked($value)     { $this->mChecked = $value; }
@@ -62,7 +62,7 @@ class Checkbox extends FormElement {
                if ($this->mStyle!="")
                   $html .= " style=\"$this->mStyle\"";
 
                if ($this->mStyle!="")
                   $html .= " style=\"$this->mStyle\"";
 
-               if ($this->mChecked || (($this->mValue == $this->mOptions) && ($this->mValue != null)))
+               if ($this->mChecked || (($this->value == $this->mOptions) && ($this->value != null)))
                   $html .= " checked=\"true\"";
                   
                if (!$this->isEnable())
                   $html .= " checked=\"true\"";
                   
                if (!$this->isEnable())
index 759a0767acb2ab3dee6ad90b7c4061f1c9b63e78..13f207d9a758722bbc26a386dbfd7d6aa9fac8c0 100644 (file)
@@ -41,8 +41,8 @@ class CheckboxGroup extends FormElement {
 
        function __construct($name,$value="")
        {
 
        function __construct($name,$value="")
        {
-               $this->name                     = $name;
-               $this->mValue                   = $value;
+               $this->name = $name;
+               $this->value = $value;
        }
 
        function setChecked($value)     { $this->mChecked = $value; }
        }
 
        function setChecked($value)     { $this->mChecked = $value; }
@@ -87,9 +87,9 @@ class CheckboxGroup extends FormElement {
                                                $optval = $optval[$this->mDataKeys[1]];
                                        }
                                $html = "<input type=\"checkbox\" name=\"$this->name[]\" id=\"$this->id"."_".$i."\"";
                                                $optval = $optval[$this->mDataKeys[1]];
                                        }
                                $html = "<input type=\"checkbox\" name=\"$this->name[]\" id=\"$this->id"."_".$i."\"";
-                               if (is_array($this->mValue)) {
-                                       foreach ($this->mValue as $value) {
-                                               if (($value == $optkey) && ($value != null))
+                               if (is_array($this->value)) {
+                                       foreach ($this->value as $element) {
+                                               if (($element == $optkey) && ($element != null))
                                                        $html .= " checked=\"true\"";
                                        }
                                }
                                                        $html .= " checked=\"true\"";
                                        }
                                }
@@ -115,9 +115,9 @@ class CheckboxGroup extends FormElement {
                                                $optval = $optval[$this->mDataKeys[1]];
                                        }
                                $html = "<input type=\"checkbox\" name=\"$this->name[]\" id=\"$this->id"."_".$i."\"";
                                                $optval = $optval[$this->mDataKeys[1]];
                                        }
                                $html = "<input type=\"checkbox\" name=\"$this->name[]\" id=\"$this->id"."_".$i."\"";
-                               if (is_array($this->mValue)) {
-                                       foreach ($this->mValue as $value) {
-                                               if (($value == $optkey) && ($value != null))
+                               if (is_array($this->value)) {
+                                       foreach ($this->value as $element) {
+                                               if (($element == $optkey) && ($element != null))
                                                        $html .= " checked=\"true\"";
                                        }
                                }
                                                        $html .= " checked=\"true\"";
                                        }
                                }
index 0e8ec06c780b039731f862ce830615c99e829447..082765e826162d8ab8f4cd302d936d066ef42381 100644 (file)
@@ -48,8 +48,8 @@ class Combobox extends FormElement {
 
        function __construct($name,$value="")
        {
 
        function __construct($name,$value="")
        {
-               $this->name                     = $name;
-               $this->mValue                   = $value;
+               $this->name = $name;
+               $this->value = $value;
        }
 
        function setMultiple($value)    { $this->mMultiple = $value; }
        }
 
        function setMultiple($value)    { $this->mMultiple = $value; }
@@ -95,7 +95,7 @@ class Combobox extends FormElement {
                if (is_array($this->mOptionsEmpty) && (count($this->mOptionsEmpty) > 0))
                foreach ($this->mOptionsEmpty as $key=>$value) {
                        $html .= "<option value=\"".$key."\"";
                if (is_array($this->mOptionsEmpty) && (count($this->mOptionsEmpty) > 0))
                foreach ($this->mOptionsEmpty as $key=>$value) {
                        $html .= "<option value=\"".$key."\"";
-                       if (($this->mValue == $value) && ($this->mValue != '')) $html .= " selected";
+                       if (($this->value == $value) && ($this->value != '')) $html .= " selected";
                        $html .= ">".$value."</option>\n";
                }
                if (is_array($this->mOptions) && (count($this->mOptions) > 0))
                        $html .= ">".$value."</option>\n";
                }
                if (is_array($this->mOptions) && (count($this->mOptions) > 0))
@@ -106,7 +106,7 @@ class Combobox extends FormElement {
                                $value = $value[$this->mDataKeys[1]];
                        }
                        $html .= "<option value=\"".$key."\"";
                                $value = $value[$this->mDataKeys[1]];
                        }
                        $html .= "<option value=\"".$key."\"";
-                       if (($this->mValue == $key) && ($this->mValue != '')) $html .= " selected";
+                       if (($this->value == $key) && ($this->value != '')) $html .= " selected";
                        $html .= ">".htmlspecialchars($value)."</option>\n";
                }
                
                        $html .= ">".htmlspecialchars($value)."</option>\n";
                }
                
index 24266a391caa598cb98b3774312587c755a65496..7075c42b7b8130ee17aa86d737d1888e1784f132 100644 (file)
@@ -68,13 +68,13 @@ class DateField extends TextField {
   function setValueSafe($value)  {
     if (isset($value) && (strlen($value) > 0)) {
       $this->mDateObj->parseVal($value, DB_DATEFORMAT);
   function setValueSafe($value)  {
     if (isset($value) && (strlen($value) > 0)) {
       $this->mDateObj->parseVal($value, DB_DATEFORMAT);
-      $this->mValue = $this->mDateObj->toString($this->mDateFormat); //?
+      $this->value = $this->mDateObj->toString($this->mDateFormat); //?
     }
   }
   // get value for storing in session or database
   function getValueSafe() {
     }
   }
   // get value for storing in session or database
   function getValueSafe() {
-    if (strlen($this->mValue)>0) {
-      $this->mDateObj->parseVal($this->mValue, $this->mDateFormat);  //?
+    if (strlen($this->value)>0) {
+      $this->mDateObj->parseVal($this->value, $this->mDateFormat);  //?
       return $this->mDateObj->toString(DB_DATEFORMAT);
     } else {
       return null;
       return $this->mDateObj->toString(DB_DATEFORMAT);
     } else {
       return null;
index 298e09bbe02799936544315f9df40b203b23376b..b5f8d0d4d502ecd7b8f93d88407e1da8f7623085 100644 (file)
@@ -54,19 +54,19 @@ class FloatField extends TextField {
       $value = sprintf('%'.$this->mFFormat.'f', $value);
       $value = str_replace('.', $this->mDelimiter, $value);
     }
       $value = sprintf('%'.$this->mFFormat.'f', $value);
       $value = str_replace('.', $this->mDelimiter, $value);
     }
-    $this->mValue = $value;
+    $this->value = $value;
   }
 
   function setValueSafe($value)        {
     // '.' to ',' , apply delimiter
     if (strlen($value) > 0)
   }
 
   function setValueSafe($value)        {
     // '.' to ',' , apply delimiter
     if (strlen($value) > 0)
-      $this->mValue = str_replace('.', $this->mDelimiter, $value);
+      $this->value = str_replace('.', $this->mDelimiter, $value);
   }
 
   function getValueSafe() {
     // ',' to '.'
   }
 
   function getValueSafe() {
     // ',' to '.'
-    if (strlen($this->mValue) > 0)
-      return str_replace($this->mDelimiter, '.', $this->mValue);
+    if (strlen($this->value) > 0)
+      return str_replace($this->mDelimiter, '.', $this->value);
     return null;
   }
 }
     return null;
   }
 }
index f46e3bf2455c8eda8d31d1ef953bcabb4835bd44..209578dc824bd4b31a9e8e5122554e17ec8e9f83 100644 (file)
 
 // FromElement is the base class for controls on forms.
 class FormElement {
 
 // FromElement is the base class for controls on forms.
 class FormElement {
-  var $id = "";
+  var $id = '';
   var $name;
   var $name;
-  var $form_name = "";
-       var $mValue                     = "";
+  var $form_name = '';
+  var $value = '';
+  // TODO: refactoring ongoing down from here.
        var $mSize                      = "";
        var $mMaxLength         = "";
        var $mTabindex          = "";
        var $mSize                      = "";
        var $mMaxLength         = "";
        var $mTabindex          = "";
@@ -53,17 +54,17 @@ class FormElement {
 
        function getClass()     { return $this->cClassName; }
        
 
        function getClass()     { return $this->cClassName; }
        
-       function setName($name) { $this->name = $name;  }
+       function setName($name) { $this->name = $name; }
        function getName()      { return $this->name; }
        
        function setFormName($name) { $this->form_name = $name; }
        function getFormName()  { return $this->form_name; }
        
        function getName()      { return $this->name; }
        
        function setFormName($name) { $this->form_name = $name; }
        function getFormName()  { return $this->form_name; }
        
-       function setValue($value)       { $this->mValue = $value;}
-       function getValue() { return $this->mValue; }
+       function setValue($value) { $this->value = $value;}
+       function getValue() { return $this->value; }
        
        
-       function setValueSafe($value)   { $this->mValue = $value;}
-       function getValueSafe() { return $this->mValue; }
+       function setValueSafe($value) { $this->value = $value;}
+       function getValueSafe() { return $this->value; }
 
        function setId($id)     { $this->id = $id;      }
        function getId() { return $this->id; }
 
        function setId($id)     { $this->id = $id;      }
        function getId() { return $this->id; }
index 0105de15b5df1366e57cd118adb5b797dbc48a7c..cddb223a0c1dfc1551074f46d6ae83a051b80e9f 100644 (file)
 import('form.FormElement');
        
 class Hidden extends FormElement {
 import('form.FormElement');
        
 class Hidden extends FormElement {
-    var $mValue;
     var $cClassName    = "Hidden";
 
        function __construct($name,$value="")
        {
     var $cClassName    = "Hidden";
 
        function __construct($name,$value="")
        {
-               $this->name                     = $name;
-               $this->mValue                   = $value;
+               $this->name = $name;
+               $this->value = $value;
        }
 
        function toStringControl()      {
        }
 
        function toStringControl()      {
index bcfe3be2ca28f2f290d1568871ef3cd8fd261076..c4a2c0d629768dcef11f472cbbffec8332af9fef 100644 (file)
@@ -33,8 +33,8 @@ class Submit extends FormElement {
 
        function __construct($name,$value="")
        {
 
        function __construct($name,$value="")
        {
-               $this->name                     = $name;
-               $this->mValue                   = $value;
+               $this->name = $name;
+               $this->value = $value;
        }
 
        function toStringControl()      {
        }
 
        function toStringControl()      {
@@ -49,7 +49,7 @@ class Submit extends FormElement {
                        $html .= " disabled=\"true\"";
                }
                
                        $html .= " disabled=\"true\"";
                }
                
-               $html .= " value=\"$this->mValue\"";
+               $html .= " value=\"$this->value\"";
                
                if ($this->mOnClick) {
                        $html .= " onclick=\"".$this->mOnClick."\"";
                
                if ($this->mOnClick) {
                        $html .= " onclick=\"".$this->mOnClick."\"";
index 833bffac98a6873b8da27eceb210b70942371a3e..44685d46c9b029ba056fe1966e28944ad3bab790 100644 (file)
@@ -49,7 +49,7 @@ class Table extends FormElement {
        
   function __construct($name, $value='') {
     $this->name = $name;
        
   function __construct($name, $value='') {
     $this->name = $name;
-    $this->mValue = $value;
+    $this->value = $value;
   }
   
   function setKeyField($value) {
   }
   
   function setKeyField($value) {
@@ -160,8 +160,8 @@ class Table extends FormElement {
         if (0 == $col && strtolower(get_class($this->mColumns[$col]->getRenderer())) == 'checkboxcellrenderer') {
           // Checkbox for the row. Determine if selected.
           $selected = false;
         if (0 == $col && strtolower(get_class($this->mColumns[$col]->getRenderer())) == 'checkboxcellrenderer') {
           // Checkbox for the row. Determine if selected.
           $selected = false;
-          if (is_array($this->mValue)) {
-            foreach ($this->mValue as $p) {
+          if (is_array($this->value)) {
+            foreach ($this->value as $p) {
               if ($p == $this->mData[$row][$this->mKeyField]) {
                $selected = true;
                break;
               if ($p == $this->mData[$row][$this->mKeyField]) {
                $selected = true;
                break;
index ecc2010bacd82b758fb0e9d4d4de7520b7d5b705..6b3b5ee76fbdbd912daad62db9a92d1d124a055f 100644 (file)
@@ -29,7 +29,6 @@
 import('form.FormElement');
        
 class TextArea extends FormElement {
 import('form.FormElement');
        
 class TextArea extends FormElement {
-    var $mValue;
     var $mPassword     = false;
     var $mColumns      = "";
     var $mRows         = "";
     var $mPassword     = false;
     var $mColumns      = "";
     var $mRows         = "";
@@ -37,8 +36,8 @@ class TextArea extends FormElement {
 
        function __construct($name,$value="")
        {
 
        function __construct($name,$value="")
        {
-               $this->name                     = $name;
-               $this->mValue                   = $value;
+               $this->name = $name;
+               $this->value = $value;
        }
        
        function setColumns($value)     { $this->mColumns = $value;     }
        }
        
        function setColumns($value)     { $this->mColumns = $value;     }
index e1259d6998307b053913081d5a64d263d033c92c..4766d91189387a70244b14000f9bd3c9f01ea83f 100644 (file)
 import('form.FormElement');
        
 class TextField extends FormElement {
 import('form.FormElement');
        
 class TextField extends FormElement {
-    var $mValue;
     var $mPassword     = false;
     var $cClassName            = "TextField";
 
        function __construct($name,$value="")
        {
     var $mPassword     = false;
     var $cClassName            = "TextField";
 
        function __construct($name,$value="")
        {
-               $this->name                     = $name;
-               $this->mValue                   = $value;
+               $this->name = $name;
+               $this->value = $value;
        }
        
        function setAsPassword($name)   { $this->mPassword = $name;     }
        }
        
        function setAsPassword($name)   { $this->mPassword = $name;     }
index 98fbe0aa687f0c7982a9fe9f40360173d320766c..97a2a8ca12b41c3b88b1252cdbaa6f446819125a 100644 (file)
 import('form.FormElement');
        
 class UploadFile extends FormElement {
 import('form.FormElement');
        
 class UploadFile extends FormElement {
-    var $mValue;
     var $cClassName            = "UploadFile";
     var $mMaxSize              = 100000;       // 100kb
 
        function __construct($name,$value="")
        {
     var $cClassName            = "UploadFile";
     var $mMaxSize              = 100000;       // 100kb
 
        function __construct($name,$value="")
        {
-               $this->name                     = $name;
-               $this->mValue                   = $value;
+               $this->name = $name;
+               $this->value = $value;
        }
        
        function setMaxSize($value)     { $this->mMaxSize = $value;     }
        }
        
        function setMaxSize($value)     { $this->mMaxSize = $value;     }
index 20116c55f6db967924d2ecc7c52a16b45713fdc7..fc9eb2b0e755760d7082436cc7632a3ead94a72a 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.3594 | 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.3595 | 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>