Browse Source

Bug fix: properly export boolean attributes to XML (a value of false was creating an empty XML tag)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2154 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 12 years ago
parent
commit
9bbf543eff
1 changed files with 5 additions and 0 deletions
  1. 5 0
      core/attributedef.class.inc.php

+ 5 - 0
core/attributedef.class.inc.php

@@ -1125,6 +1125,11 @@ class AttributeBoolean extends AttributeInteger
 		if ($value) return 1;
 		return 0;
 	}
+
+	public function GetAsXML($sValue, $oHostObject = null)
+	{
+		return $sValue ? '1' : '0';
+	}
 }
 
 /**