allow BASE_HREF to be defined explicitly

This commit is contained in:
Shish 2015-08-03 15:42:45 +01:00
parent 7762b2c703
commit 654b282ab7

View File

@ -812,6 +812,7 @@ function flash_message(/*string*/ $text, /*string*/ $type="info") {
* @return string
*/
function get_base_href() {
if(defined("BASE_HREF")) return BASE_HREF;
$possible_vars = array('SCRIPT_NAME', 'PHP_SELF', 'PATH_INFO', 'ORIG_PATH_INFO');
$ok_var = null;
foreach($possible_vars as $var) {