Fixed Loading of UDF Fields in FAS if there are only UDF Fields for

Persons
This commit is contained in:
Andreas Österreicher
2018-12-19 07:35:16 +01:00
parent 09a82b1a03
commit 0a23698b7e
+12 -1
View File
@@ -42,6 +42,8 @@ class DB_Model extends FHC_Model
// Loads DB conns and confs
$this->load->database($dbtype);
$this->load->model('system/UDF_model', 'UDFModel');
// Loads the UDF library
$this->load->library('UDFLib');
// Loads the logs library
@@ -681,7 +683,16 @@ class DB_Model extends FHC_Model
*/
public function hasUDF()
{
return $this->fieldExists(UDFLib::COLUMN_NAME);
if($this->fieldExists(UDFLib::COLUMN_NAME))
{
$resultUDFsDefinitions = $this->UDFModel->getUDFsDefinitions($this->dbTable);
if (hasData($resultUDFsDefinitions))
return true;
else
return false;
}
else
return false;
}
/**