Skip to content

Commit

Permalink
Merge pull request #4100 from Achal-Aggarwal/typo-get-set
Browse files Browse the repository at this point in the history
Fixes typo in getter and setter of form fields.
  • Loading branch information
roland-d committed Oct 3, 2015
2 parents cc65be5 + 62138fe commit fd65c24
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion libraries/cms/form/field/moduleposition.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __get($name)
switch ($name)
{
case 'clientId':
return $this->$name;
return $this->clientId;
}

return parent::__get($name);
Expand Down
1 change: 0 additions & 1 deletion libraries/joomla/form/fields/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public function __set($name, $value)
{
case 'maxlength':
$value = (int) $value;

case 'format':
case 'filter':
$this->$name = (string) $value;
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/form/fields/checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __get($name)
switch ($name)
{
case 'checked':
return $this->$name;
return $this->checked;
}

return parent::__get($name);
Expand All @@ -72,7 +72,7 @@ public function __set($name, $value)
{
case 'checked':
$value = (string) $value;
$this->$name = ($value == 'true' || $value == $name || $value == '1');
$this->checked = ($value == 'true' || $value == $name || $value == '1');
break;

default:
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/form/fields/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __get($name)
switch ($name)
{
case 'accept':
return $this->$name;
return $this->accept;
}

return parent::__get($name);
Expand All @@ -69,7 +69,7 @@ public function __set($name, $value)
switch ($name)
{
case 'accept':
$this->$name = (string) $value;
$this->accept = (string) $value;
break;

default:
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/form/fields/meter.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ public function __set($name, $value)

case 'active':
$value = (string) $value;
$this->$name = ($value === 'true' || $value === $name || $value === '1');
$this->active = ($value === 'true' || $value === $name || $value === '1');
break;

case 'animated':
$value = (string) $value;
$this->$name = !($value === 'false' || $value === 'off' || $value === '0');
$this->animated = !($value === 'false' || $value === 'off' || $value === '0');
break;

default:
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/form/fields/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __get($name)
switch ($name)
{
case 'folder':
return $this->$name;
return $this->folder;
}

return parent::__get($name);
Expand All @@ -69,7 +69,7 @@ public function __set($name, $value)
switch ($name)
{
case 'folder':
$this->$name = (string) $value;
$this->folder = (string) $value;
break;

default:
Expand Down
5 changes: 3 additions & 2 deletions libraries/joomla/form/fields/text.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ public function __set($name, $value)

case 'dirname':
$value = (string) $value;
$value = ($value == $name || $value == 'true' || $value == '1');
$this->dirname = ($value == $name || $value == 'true' || $value == '1');
break;

case 'inputmode':
$this->name = (string) $value;
$this->inputmode = (string) $value;
break;

default:
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/form/fields/timezone.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function __get($name)
switch ($name)
{
case 'keyField':
return $this->$name;
return $this->keyField;
}

return parent::__get($name);
Expand Down

0 comments on commit fd65c24

Please sign in to comment.