Browse Source

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

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3216 a333f486-631f-4898-b8df-5754b55c2be0
romainq 11 years ago
parent
commit
d5e4d240e1
1 changed files with 5 additions and 5 deletions
  1. 5 5
      portal/index.php

+ 5 - 5
portal/index.php

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