ソースを参照

DataSource fix fetch field default value

Piotr Labudda 11 年 前
コミット
96414f4909
1 ファイル変更3 行追加6 行削除
  1. 3 6
      SE/se-lib/Data_Source.php

+ 3 - 6
SE/se-lib/Data_Source.php

@@ -75,12 +75,9 @@ class Data_Source {
 	}
 	}
 
 
 	public function getColDefault($fieldName) {
 	public function getColDefault($fieldName) {
-		if (array_key_exists($fieldName, $this->_types)) {
-			if (!empty($this->_types[$fieldName]['default'])) {
-				return $this->_types[$fieldName]['default'];
-			}
-		}
-		return '';
+		$fldType = V::get($fieldName, '', $this->_types);
+		if (!$fldType) return '';
+		return V::get('default', '', $fldType);
 	}
 	}
 
 
 	function setVirtualCols($cols) {
 	function setVirtualCols($cols) {