diff --git a/application/user.preferences.class.inc.php b/application/user.preferences.class.inc.php index 994fa8800..4038fa918 100644 --- a/application/user.preferences.class.inc.php +++ b/application/user.preferences.class.inc.php @@ -130,7 +130,7 @@ class appUserPreferences extends DBObject /** * Call this function if the user has changed (like when doing a logoff...) */ - static public function Reset() + static public function ResetPreferences() { self::$oUserPrefs = null; } diff --git a/core/dbobject.class.php b/core/dbobject.class.php index 089031fe5..7ff304c5c 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -338,7 +338,7 @@ abstract class DBObject implements iDisplay if ($sAttCode == 'finalclass') { // Ignore it - this attribute is set upon object creation and that's it - return; + return false; } $oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode); @@ -416,6 +416,9 @@ abstract class DBObject implements iDisplay // Make sure we do not reload it anymore... before saving it $this->RegisterAsDirty(); + + // This function is eligible as a lifecycle action: returning true upon success is a must + return true; } public function GetLabel($sAttCode) @@ -2075,7 +2078,7 @@ abstract class DBObject implements iDisplay { if (is_string($actionHandler)) { - // Old (pre-2.0.4) action definition without any parameter + // Old (pre-2.1.0) action definition without any parameter $aActionCallSpec = array($this, $sActionHandler); if (!is_callable($aActionCallSpec)) @@ -2183,6 +2186,70 @@ abstract class DBObject implements iDisplay $this->Set($sAttCode, $oSW); } + /** + * Lifecycle action: Recover the default value (aka when an object is being created) + */ + public function Reset($sAttCode) + { + $oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode); + $this->Set($sAttCode, $oAttDef->GetDefaultValue()); + return true; + } + + /** + * Lifecycle action: Copy an attribute to another + */ + public function Copy($sDestAttCode, $sSourceAttCode) + { + $this->Set($sDestAttCode, $this->Get($sSourceAttCode)); + return true; + } + + /** + * Lifecycle action: Set the current date/time for the given attribute + */ + public function SetCurrentDate($sAttCode) + { + $this->Set($sAttCode, time()); + return true; + } + + /** + * Lifecycle action: Set the current logged in user for the given attribute + */ + public function SetCurrentUser($sAttCode) + { + $this->Set($sAttCode, UserRights::GetUserId()); + return true; + } + + /** + * Lifecycle action: Set the time elapsed since a reference point + */ + public function SetElapsedTime($sAttCode, $sRefAttCode, $sWorkingTimeComputer = null) + { + if (is_null($sWorkingTimeComputer)) + { + $sWorkingTimeComputer = class_exists('SLAComputation') ? 'SLAComputation' : 'DefaultWorkingTimeComputer'; + } + $oComputer = new $sWorkingTimeComputer(); + $aCallSpec = array($oComputer, 'GetOpenDuration'); + if (!is_callable($aCallSpec)) + { + throw new CoreException("Unknown class/verb '$sWorkingTimeComputer/GetOpenDuration'"); + } + + $iStartTime = AttributeDateTime::GetAsUnixSeconds($this->Get($sRefAttCode)); + $oStartDate = new DateTime('@'.$iStartTime); // setTimestamp not available in PHP 5.2 + $oEndDate = new DateTime(); // now + $iElapsed = call_user_func($aCallSpec, $this, $oStartDate, $oEndDate); + + $this->Set($sAttCode, $iElapsed); + return true; + } + + + /* * Create query parameters (SELECT ... WHERE service = :this->service_id) * to be used with the APIs DBObjectSearch/DBObjectSet diff --git a/core/ormstopwatch.class.inc.php b/core/ormstopwatch.class.inc.php index 276a6b310..8e70c605a 100644 --- a/core/ormstopwatch.class.inc.php +++ b/core/ormstopwatch.class.inc.php @@ -478,7 +478,7 @@ class CheckStopWatchThresholds implements iBackgroundProcess { if (is_string($def)) { - // Old method (pre-2.0.4) non typed parameters + // Old method (pre-2.1.0) non typed parameters $aValues[] = $def; } else // if(is_array($def)) diff --git a/datamodels/2.x/itop-change-mgmt-itil/datamodel.itop-change-mgmt-itil.xml b/datamodels/2.x/itop-change-mgmt-itil/datamodel.itop-change-mgmt-itil.xml index 520969070..73e65e75d 100755 --- a/datamodels/2.x/itop-change-mgmt-itil/datamodel.itop-change-mgmt-itil.xml +++ b/datamodels/2.x/itop-change-mgmt-itil/datamodel.itop-change-mgmt-itil.xml @@ -902,6 +902,10 @@ + false public StimulusUserAction @@ -912,6 +916,10 @@ }]]> + false public LifecycleAction @@ -1679,7 +1687,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + @@ -1713,7 +1724,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + @@ -3099,7 +3113,10 @@ validated - ResetRejectReason + Reset + + reason + @@ -3236,7 +3253,10 @@ approved - ResetRejectReason + Reset + + reason + @@ -3336,7 +3356,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + @@ -3369,7 +3392,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + @@ -3985,7 +4011,10 @@ approved - ResetRejectReason + Reset + + reason + @@ -4085,7 +4114,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + @@ -4119,7 +4151,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + diff --git a/datamodels/2.x/itop-change-mgmt/datamodel.itop-change-mgmt.xml b/datamodels/2.x/itop-change-mgmt/datamodel.itop-change-mgmt.xml index 8ecbaf921..fadfda52c 100755 --- a/datamodels/2.x/itop-change-mgmt/datamodel.itop-change-mgmt.xml +++ b/datamodels/2.x/itop-change-mgmt/datamodel.itop-change-mgmt.xml @@ -280,10 +280,16 @@ approved - SetApprovalDate + SetCurrentDate + + approval_date + - ResetRejectReason + Reset + + reject_reason + @@ -408,7 +414,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + @@ -445,6 +454,10 @@ + false public LifecycleAction @@ -455,6 +468,10 @@ }]]> + false public LifecycleAction @@ -465,6 +482,10 @@ }]]> + false public LifecycleAction diff --git a/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml b/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml index c361aba13..d898c712a 100755 --- a/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml +++ b/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml @@ -485,7 +485,10 @@ assigned - SetAssignedDate + SetCurrentDate + + assignment_date + @@ -497,10 +500,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -560,7 +575,10 @@ pending - SetLastPendingDate + SetCurrentDate + + last_pending_date + @@ -568,10 +586,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -587,10 +617,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -607,7 +649,10 @@ pending - SetLastPendingDate + SetCurrentDate + + last_pending_date + @@ -615,10 +660,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -630,10 +687,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -669,10 +738,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -766,7 +847,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + @@ -779,10 +863,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -838,6 +934,10 @@ + false public LifecycleAction @@ -848,6 +948,10 @@ }]]> + false public LifecycleAction @@ -858,6 +962,10 @@ }]]> + false public LifecycleAction @@ -870,6 +978,10 @@ }]]> + false public LifecycleAction @@ -973,20 +1085,17 @@ }]]> + false public LifecycleAction Set("date", time()); - $sUserString = CMDBChange::GetCurrentUserName(); - $oMyChange->Set("userinfo", $sUserString."(automatic resolution)"); - $iChangeId = $oMyChange->DBInsert(); if (MetaModel::IsValidClass('UserRequest')) { - $sOQL = "SELECT UserRequest WHERE parent_request_id=:ticket"; + $sOQL = "SELECT UserRequest WHERE parent_incident_id=:ticket"; $oChildRequestSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL), array(), array( @@ -1005,7 +1114,7 @@ $oRequest->set('resolution_code',$this->Get('resolution_code')); $oRequest->set('solution','Automatically resolved by incident:[[Incident:'.$this->Get('ref').']]'); $oRequest->ApplyStimulus('ev_autoresolve'); - $oRequest->DBUpdateTracked($oMyChange); + $oRequest->DBUpdate(); } } } @@ -1029,13 +1138,70 @@ $oIncident->set('resolution_code',$this->Get('resolution_code')); $oIncident->set('solution','Automatically resolved by incident:[[Incident:'.$this->Get('ref').']]'); $oIncident->ApplyStimulus('ev_autoresolve'); - $oIncident->DBUpdateTracked($oMyChange); + $oIncident->DBUpdate(); } } return true; }]]> + + + false + public + LifecycleAction + + + $this->GetKey())); + while($oRequest = $oChildRequestSet->Fetch()) + { + $oRequest->ResolveFrom($this); + } + } + + // Automatically resolve child incidents + $sOQL = "SELECT Incident WHERE parent_incident_id = :ticket AND status != 'resolved'"; + $oChildIncidentSet = new DBObjectSet(DBObjectSearch::FromOQL($sOQL), array(), array('ticket' => $this->GetKey())); + while($oIncident = $oChildIncidentSet->Fetch()) + { + $oIncident->ResolveFrom($this); + } + return true; + }]]> + + + + false + public + Internal + Get('status') != 'resolved') + { + $this->Set('servicesubcategory_id', $oParentTicket->Get('servicesubcategory_id')); + $this->Set('service_id', $oParentTicket->Get('service_id')); + $this->Set('team_id', $oParentTicket->Get('team_id')); + $this->Set('agent_id', $oParentTicket->Get('agent_id')); + $this->Set('resolution_code', $oParentTicket->Get('resolution_code')); + $sParent = '[['.get_class($oParentTicket).':'.$oParentTicket->Get('ref').']]'; + $this->Set('solution', Dict::Format('Tickets:ResolvedFrom', $sParent, MetaModel::GetName(get_class($oParentTicket)))); + $this->ApplyStimulus('ev_autoresolve'); + $this->DBUpdate(); + } + }]]> + false public diff --git a/datamodels/2.x/itop-problem-mgmt/datamodel.itop-problem-mgmt.xml b/datamodels/2.x/itop-problem-mgmt/datamodel.itop-problem-mgmt.xml index dd02a249b..8973bf017 100755 --- a/datamodels/2.x/itop-problem-mgmt/datamodel.itop-problem-mgmt.xml +++ b/datamodels/2.x/itop-problem-mgmt/datamodel.itop-problem-mgmt.xml @@ -259,7 +259,10 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + @@ -311,7 +314,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + @@ -345,6 +351,10 @@ + false public LifecycleAction @@ -355,6 +365,10 @@ }]]> + false public LifecycleAction @@ -365,6 +379,10 @@ }]]> + false public LifecycleAction diff --git a/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml b/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml index 76f95220c..83e8df814 100755 --- a/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml +++ b/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml @@ -509,7 +509,10 @@ assigned - SetAssignedDate + SetCurrentDate + + assignment_date + @@ -525,10 +528,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -547,7 +562,10 @@ assigned - SetAssignedDate + SetCurrentDate + + assignment_date + @@ -591,7 +609,10 @@ pending - SetLastPendingDate + SetCurrentDate + + last_pending_date + @@ -599,10 +620,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -618,10 +651,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -638,7 +683,10 @@ pending - SetLastPendingDate + SetCurrentDate + + last_pending_date + @@ -646,10 +694,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -661,10 +721,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -705,7 +777,10 @@ assigned - SetAssignedDate + SetCurrentDate + + assignment_date + @@ -713,10 +788,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -761,10 +848,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -857,7 +956,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + @@ -870,10 +972,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -929,6 +1043,10 @@ + false public LifecycleAction @@ -939,6 +1057,10 @@ }]]> + false public LifecycleAction @@ -949,6 +1071,10 @@ }]]> + false public LifecycleAction @@ -961,6 +1087,10 @@ }]]> + false public LifecycleAction @@ -971,6 +1101,10 @@ }]]> + false public LifecycleAction @@ -1075,6 +1209,9 @@ }]]> + false public LifecycleAction @@ -1106,6 +1243,52 @@ }]]> + + + false + public + LifecycleAction + + + $this->GetKey())); + while($oRequest = $oChildRequestSet->Fetch()) + { + $oRequest->ResolveFrom($this); + } + return true; + }]]> + + + + false + public + Internal + Get('status') != 'resolved') + { + $this->Set('servicesubcategory_id', $oParentTicket->Get('servicesubcategory_id')); + $this->Set('service_id', $oParentTicket->Get('service_id')); + $this->Set('team_id', $oParentTicket->Get('team_id')); + $this->Set('agent_id', $oParentTicket->Get('agent_id')); + $this->Set('resolution_code', $oParentTicket->Get('resolution_code')); + $sParent = '[['.get_class($oParentTicket).':'.$oParentTicket->Get('ref').']]'; + $this->Set('solution', Dict::Format('Tickets:ResolvedFrom', $sParent, MetaModel::GetName(get_class($oParentTicket)))); + $this->ApplyStimulus('ev_autoresolve'); + $this->DBUpdate(); + } + }]]> + false public diff --git a/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml b/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml index a1e964c11..7b6f18754 100755 --- a/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml +++ b/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml @@ -522,7 +522,10 @@ assigned - SetAssignedDate + SetCurrentDate + + assignment_date + @@ -538,10 +541,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -560,7 +575,10 @@ assigned - SetAssignedDate + SetCurrentDate + + assignment_date + @@ -607,7 +625,10 @@ pending - SetLastPendingDate + SetCurrentDate + + last_pending_date + @@ -615,10 +636,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -634,10 +667,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -654,7 +699,10 @@ pending - SetLastPendingDate + SetCurrentDate + + last_pending_date + @@ -662,10 +710,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -677,10 +737,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -721,7 +793,10 @@ assigned - SetAssignedDate + SetCurrentDate + + assignment_date + @@ -729,10 +804,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -777,10 +864,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -876,7 +975,10 @@ closed - SetClosureDate + SetCurrentDate + + close_date + @@ -889,10 +991,22 @@ resolved - SetResolveDate + SetCurrentDate + + resolution_date + - resolveChilds + SetElapsedTime + + time_spent + start_date + DefaultWorkingTimeComputer + + + + ResolveChildTickets + @@ -948,6 +1062,10 @@ + false public LifecycleAction @@ -958,6 +1076,10 @@ }]]> + false public LifecycleAction @@ -968,6 +1090,10 @@ }]]> + false public LifecycleAction @@ -980,6 +1106,10 @@ }]]> + false public LifecycleAction @@ -990,6 +1120,10 @@ }]]> + false public LifecycleAction @@ -1093,6 +1227,9 @@ }]]> + false public LifecycleAction @@ -1124,6 +1261,52 @@ }]]> + + + false + public + LifecycleAction + + + $this->GetKey())); + while($oRequest = $oChildRequestSet->Fetch()) + { + $oRequest->ResolveFrom($this); + } + return true; + }]]> + + + + false + public + Internal + Get('status') != 'resolved') + { + $this->Set('servicesubcategory_id', $oParentTicket->Get('servicesubcategory_id')); + $this->Set('service_id', $oParentTicket->Get('service_id')); + $this->Set('team_id', $oParentTicket->Get('team_id')); + $this->Set('agent_id', $oParentTicket->Get('agent_id')); + $this->Set('resolution_code', $oParentTicket->Get('resolution_code')); + $sParent = '[['.get_class($oParentTicket).':'.$oParentTicket->Get('ref').']]'; + $this->Set('solution', Dict::Format('Tickets:ResolvedFrom', $sParent, MetaModel::GetName(get_class($oParentTicket)))); + $this->ApplyStimulus('ev_autoresolve'); + $this->DBUpdate(); + } + }]]> + false public diff --git a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml index be184fd0e..17c30c414 100755 --- a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml +++ b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml @@ -213,7 +213,7 @@ } ]]> - +
@@ -772,6 +772,40 @@ + + + + + attcode + true + The field, in the current object, to set to + the current logged in user + + + + + + + + attcode + true + The field, in the current object, to set to + the time elapsed since the date given by the reference field + + + + attcode + true + The reference date or date/time + + + + attcode + false + Leave empty to rely on the standard working hours scheme, or set to "DefaultWorkingTimeComputer" to force a 24x7 scheme + + + diff --git a/datamodels/2.x/itop-tickets/en.dict.itop-tickets.php b/datamodels/2.x/itop-tickets/en.dict.itop-tickets.php index ad7a1e84b..06dd1863d 100755 --- a/datamodels/2.x/itop-tickets/en.dict.itop-tickets.php +++ b/datamodels/2.x/itop-tickets/en.dict.itop-tickets.php @@ -1,5 +1,5 @@ 'SLA report', 'WorkOrder:Details' => 'Details', 'WorkOrder:Moreinfo' => 'More information', - + 'Tickets:ResolvedFrom' => 'Automatically resolved from %1$s' )); - - - - - - - -?> diff --git a/datamodels/2.x/itop-tickets/fr.dict.itop-tickets.php b/datamodels/2.x/itop-tickets/fr.dict.itop-tickets.php index 5ad93a372..367e8147f 100755 --- a/datamodels/2.x/itop-tickets/fr.dict.itop-tickets.php +++ b/datamodels/2.x/itop-tickets/fr.dict.itop-tickets.php @@ -164,6 +164,5 @@ Dict::Add('FR FR', 'French', 'Français', array( 'Ticket:SLA' => 'Rapport SLA', 'WorkOrder:Details' => 'Détails', 'WorkOrder:Moreinfo' => 'Informations complémentaires', - + 'Tickets:ResolvedFrom' => 'Résolu via %1$s' )); -?> diff --git a/setup/compiler.class.inc.php b/setup/compiler.class.inc.php index fcc0ad953..c125eb90a 100644 --- a/setup/compiler.class.inc.php +++ b/setup/compiler.class.inc.php @@ -1247,12 +1247,12 @@ EOF; { $sParamType = 'string'; } - $aActionParams[] = "array('type' => '$sType', 'value' => ".self::QuoteForPHP($oParam->textContent).")"; + $aActionParams[] = "array('type' => '$sParamType', 'value' => ".self::QuoteForPHP($oParam->textContent).")"; } } else { - // Old (pre 2.0.4) format, when no parameter is specified, assume 1 parameter: reference sStimulusCode + // Old (pre 2.1.0) format, when no parameter is specified, assume 1 parameter: reference sStimulusCode $aActionParams[] = "array('type' => 'reference', 'value' => 'sStimulusCode')"; } $sActionParams = 'array('.implode(', ', $aActionParams).')';