aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/functions_url.inc.php10
-rw-r--r--include/functions_user.inc.php4
2 files changed, 11 insertions, 3 deletions
diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php
index 99d30acf5..fb94cb4b4 100644
--- a/include/functions_url.inc.php
+++ b/include/functions_url.inc.php
@@ -60,7 +60,15 @@ function get_absolute_root_url($with_scheme=true)
$url = '';
if ($with_scheme)
{
- $url .= 'http://'.$_SERVER['HTTP_HOST'];
+ if (empty($_SERVER['HTTPS']))
+ {
+ $url .= 'http://';
+ }
+ else
+ {
+ $url .= 'https://';
+ }
+ $url .= $_SERVER['HTTP_HOST'];
if ($_SERVER['SERVER_PORT'] != 80)
{
$url_port = ':'.$_SERVER['SERVER_PORT'];
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 14666da7f..6817ec263 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -838,7 +838,7 @@ function create_user_infos($arg_id, $override_values = null)
else
{
$user_ids = array();
- if (is_integer($arg_id))
+ if (is_numeric($arg_id))
{
$user_ids[] = $arg_id;
}
@@ -1233,7 +1233,7 @@ function get_email_address_as_display_text($email_address)
}
else
{
- if (is_adviser())
+ if (script_basename() == 'admin' and is_adviser())
{
return 'adviser.mode@'.$_SERVER['SERVER_NAME'];
}