mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user