소스 검색

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) {
-		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) {