Portal: let the administrator specify an alternative URL for the portals (rewriting rules)

SVN:trunk[3848]
This commit is contained in:
Romain Quetiez
2015-12-10 13:06:42 +00:00
parent e92c6e5298
commit ab38ce63a5
2 changed files with 19 additions and 1 deletions

View File

@@ -55,7 +55,16 @@ class PortalDispatcher
public function GetURL()
{
return utils::GetAbsoluteUrlAppRoot().$this->aData['url'];
$aOverloads = MetaModel::GetConfig()->Get('portal_dispatch_urls');
if (array_key_exists($this->sPortalid, $aOverloads))
{
$sRet = $aOverloads[$this->sPortalid];
}
else
{
$sRet = utils::GetAbsoluteUrlAppRoot().$this->aData['url'];
}
return $sRet;
}
public function GetLabel()

View File

@@ -718,6 +718,15 @@ class Config
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'portal_dispatch_urls' => array(
'type' => 'array',
'description' => 'Associative array of sPortalId => Home page URL (relatively to the application root)',
// examples... not used
'default' => array(),
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'max_execution_time_per_loop' => array(
'type' => 'integer',
'description' => 'Maximum execution time requested, per loop, during bulk operations. Zero means no limit.',