Commit 310bd4a9 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5897-support-for-askme-in-booleanattribute-is-broken' into '1.4-dev'

Resolve "Support for %askme% in BooleanAttribute is broken"

Closes #5897

See merge request fusiondirectory/fd!432
parents 2949fbd9 1db9c044
......@@ -58,7 +58,7 @@ class BooleanAttribute extends Attribute
function inputValue ($value)
{
if ($this->isTemplate() && $this->isTemplatable() && ($value == '%askme%')) {
if ($this->isTemplate() && $this->isTemplatable() && ($value === '%askme%')) {
return $value;
}
return ($value == $this->trueValue);
......@@ -70,7 +70,7 @@ class BooleanAttribute extends Attribute
if ($this->isTemplate() && $this->isTemplatable()) {
if (!isset($_POST[$this->getHtmlId()])) {
$this->setPostValue(FALSE);
} elseif ($_POST[$this->getHtmlId()] == '%askme%') {
} elseif ($_POST[$this->getHtmlId()] === '%askme%') {
$this->setPostValue('%askme%');
} else {
$this->setPostValue($_POST[$this->getHtmlId()] == 'TRUE');
......@@ -83,7 +83,7 @@ class BooleanAttribute extends Attribute
function computeLdapValue ()
{
if ($this->isTemplate() && $this->isTemplatable() && ($this->value == '%askme%')) {
if ($this->isTemplate() && $this->isTemplatable() && ($this->value === '%askme%')) {
return $this->value;
} else {
return ($this->value ? $this->trueValue : $this->falseValue);
......@@ -109,7 +109,7 @@ class BooleanAttribute extends Attribute
{
if ($this->isTemplatable()) {
$id = $this->getHtmlId();
if ($this->getValue() == '%askme%') {
if ($this->getValue() === '%askme%') {
$selected = '%askme%';
} elseif ($this->getValue()) {
$selected = 'TRUE';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment