Fix to complete the commit [3193]: template abusively selected on the user portal

SVN:trunk[3216]
This commit is contained in:
Romain Quetiez
2014-06-17 13:10:41 +00:00
parent 4fccf5c815
commit 7ddd74a95e

View File

@@ -339,11 +339,11 @@ function SelectRequestTemplate($oP, $oUserOrg, $iSvcId = null, $iSubSvcId = null
{
$aParameters = $oP->ReadAllParams(PORTAL_ALL_PARAMS.',template_id');
if ($iSvcId != null)
if (!is_null($iSvcId))
{
$aParameters['service_id'] = $iSvcId;
}
if ($iSubSvcId != null)
if (!is_null($iSubSvcId))
{
$aParameters['servicesubcategory_id'] = $iSubSvcId;
}
@@ -440,15 +440,15 @@ function SelectRequestTemplate($oP, $oUserOrg, $iSvcId = null, $iSubSvcId = null
function RequestCreationForm($oP, $oUserOrg, $iSvcId = null, $iSubSvcId = null, $iTemplateId = null)
{
$aParameters = $oP->ReadAllParams(PORTAL_ALL_PARAMS.',template_id');
if ($iSvcId != null)
if (!is_null($iSvcId))
{
$aParameters['service_id'] = $iSvcId;
}
if ($iSubSvcId != null)
if (!is_null($iSubSvcId))
{
$aParameters['servicesubcategory_id'] = $iSubSvcId;
}
if ($iTemplateId != null)
if (!is_null($iTemplateId))
{
$aParameters['template_id'] = $iTemplateId;
}