Finalized the display of Enumeration attributes (the label may now be different than the value)

Finalized the verification of the DB structure, which could not detect wrong field types so far

SVN:trunk[263]
This commit is contained in:
Romain Quetiez
2010-01-18 07:43:26 +00:00
parent 9250cb3c13
commit 2e26062560
3 changed files with 53 additions and 6 deletions

View File

@@ -342,6 +342,15 @@ class CMDBSource
return (strtolower($aFieldData["Null"]) == "yes");
}
public static function GetFieldType($sTable, $sField)
{
$aTableInfo = self::GetTableInfo($sTable);
if (empty($aTableInfo)) return false;
if (!array_key_exists($sField, $aTableInfo["Fields"])) return false;
$aFieldData = $aTableInfo["Fields"][$sField];
return ($aFieldData["Type"]);
}
public static function HasIndex($sTable, $sField)
{
$aTableInfo = self::GetTableInfo($sTable);