Переглянути джерело

N°653.2 Lifecycle: Fixed a regression introduced on r4767, transition buttons not working properly when editing an object.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4951 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 7 роки тому
батько
коміт
4a781579d5
2 змінених файлів з 10 додано та 2 видалено
  1. 9 1
      application/cmdbabstract.class.inc.php
  2. 1 1
      pages/UI.php

+ 9 - 1
application/cmdbabstract.class.inc.php

@@ -3764,7 +3764,15 @@ EOF
 			$oPage->add('</fieldset>');
 		}
 	}
-	
+
+    /**
+     * @param $sCurrentState
+     * @param $sStimulus
+     * @param $bOnlyNewOnes
+     * @return array
+     * @throws ApplicationException
+     * @deprecated Since iTop 2.4, use DBObject::GetTransitionAttributes() instead.
+     */
 	public function GetExpectedAttributes($sCurrentState, $sStimulus, $bOnlyNewOnes)
 	{
 		$aTransitions = $this->EnumTransitions();

+ 1 - 1
pages/UI.php

@@ -88,7 +88,7 @@ function ApplyNextAction(Webpage $oP, CMDBObject $oObj, $sNextAction)
 		throw new ApplicationException(Dict::Format('UI:Error:Invalid_Stimulus_On_Object_In_State', $sNextAction, $oObj->GetName(), $oObj->GetStateLabel()));
 	}
 	// Get the list of missing mandatory fields for the target state, considering only the changes from the previous form (i.e don't prompt twice)
-	$aExpectedAttributes = $oObj->GetExpectedAttributes($oObj->GetState(), $sNextAction, true /* $bOnlyNewOnes */);
+	$aExpectedAttributes = $oObj->GetTransitionAttributes($sNextAction);
 	
 	if (count($aExpectedAttributes) == 0)
 	{