new function getBaseUrl()

returns the protocol and host part of the url where seeddms is
available
This commit is contained in:
Uwe Steinmann 2019-11-28 10:00:52 +01:00
parent fd4a821fa8
commit 89c0ca9b88

View File

@ -589,6 +589,15 @@ function sendFile($filename) { /* {{{ */
}
} /* }}} */
/**
* Return protocol and host of url
*
* @return string
*/
function getBaseUrl() { /* {{{ */
return "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'];
} /* }}} */
class SeedDMS_CSRF {
protected $secret;