Fixed regressions in the portal

SVN:trunk[1579]
This commit is contained in:
Romain Quetiez
2011-09-15 15:25:30 +00:00
parent 7301cb9369
commit abd645ca98

View File

@@ -38,6 +38,27 @@ define('VALIDATE_SERVICESUBCATEGORY_QUERY', 'SELECT ServiceSubcategory AS Sub JO
define('ALL_PARAMS', 'from_service_id,org_id,caller_id,service_id,servicesubcategory_id,title,description,impact,urgency,workgroup_id,moreinfo,caller_id,start_date,end_date,duration,impact_duration');
/**
* Direct end-users to the standard Portal application
*/
class MyPortalURLMaker implements iDBObjectURLMaker
{
public static function MakeObjectURL($sClass, $iId)
{
switch($sClass)
{
case 'UserRequest':
$sAbsoluteUrl = utils::GetAbsoluteUrlAppRoot();
$sUrl = "{$sAbsoluteUrl}portal/index.php?operation=details&class=$sClass&id=$iId";
return $sUrl;
default:
return '';
}
}
}
/**
* Displays the portal main menu
* @param WebPage $oP The current web page
@@ -466,7 +487,7 @@ function ListClosedTickets(WebPage $oP)
$iUser = UserRights::GetUserId();
if ($iUser > 0)
{
$oSearch->AddCondition('caller_id', $iUser + 12345);
$oSearch->AddCondition('caller_id', $iUser);
}
$oSet1 = new CMDBObjectSet($oSearch);
$oP->add("<p>\n");
@@ -742,7 +763,7 @@ try
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
LoginWebPage::DoLogin(false /* bMustBeAdmin */, true /* IsAllowedToPortalUsers */); // Check user rights and prompt if needed
ApplicationContext::SetUrlMakerClass('PortalURLMaker');
ApplicationContext::SetUrlMakerClass('MyPortalURLMaker');
$oUserOrg = GetUserOrg();