#379 GetAbsoluteUrlRoot becomes GetAbsoluteUrlAppRoot which will simplify the development of plugins, fixed a cosmetic issue in export.php (format: html + iTop not installed in the url root path)

SVN:trunk[1259]
This commit is contained in:
Romain Quetiez
2011-05-02 09:34:45 +00:00
parent cc35e41028
commit 938d383efd
2 changed files with 12 additions and 17 deletions

View File

@@ -59,21 +59,13 @@ if (!empty($sExpression))
{
case 'html':
$oP = new NiceWebPage("iTop - Export");
// The HTML output is made for pages located in the /pages/ folder
// since this page is in a different folder, let's adjust the HTML 'base' attribute
// to make the relative hyperlinks in the page work
$sServerName = $_SERVER['SERVER_NAME'];
$sProtocol = (isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS']!='off')) ? 'https' : 'http';
if ($sProtocol == 'http')
{
$sPort = ($_SERVER['SERVER_PORT'] == 80) ? '' : ':'.$_SERVER['SERVER_PORT'];
}
else
{
$sPort = ($_SERVER['SERVER_PORT'] == 443) ? '' : ':'.$_SERVER['SERVER_PORT'];
}
$sUrl = "$sProtocol://{$sServerName}{$sPort}/pages/";
$oP->set_base($sUrl);
$sUrl = utils::GetAbsoluteUrlAppRoot('/webservices/');
$oP->set_base($sUrl.'/pages/');
$oResultBlock = new DisplayBlock($oFilter, 'list', false, array('menu' => false, 'display_limit' => false, 'zlist' => 'details'));
$oResultBlock->Display($oP, 'expresult');
break;