瀏覽代碼

Don't mind whether hidden fields are read-only or not.. they are hidden.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2417 a333f486-631f-4898-b8df-5754b55c2be0
etaloc 12 年之前
父節點
當前提交
c0cd1f5126
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      core/metamodel.class.php

+ 4 - 1
core/metamodel.class.php

@@ -1238,7 +1238,10 @@ abstract class MetaModel
 				foreach($aStates[$sState] as $sPrevState)
 				{
 					$iPrevFlags = self::GetAttributeFlags($sClass, $sPrevState, $sAttCode);
-					$bReadOnly = $bReadOnly && (($iPrevFlags & OPT_ATT_READONLY) == OPT_ATT_READONLY); // if it is/was not readonly => then it's not
+					if (($iPrevFlags & OPT_ATT_HIDDEN) != OPT_ATT_HIDDEN)
+					{
+						$bReadOnly = $bReadOnly && (($iPrevFlags & OPT_ATT_READONLY) == OPT_ATT_READONLY); // if it is/was not readonly => then it's not
+					}
 					$bHidden = $bHidden && (($iPrevFlags & OPT_ATT_HIDDEN) == OPT_ATT_HIDDEN); // if it is/was not hidden => then it's not
 				}
 				if ($bReadOnly)