aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2008-02-29 13:10:58 +0000
committerpatdenice <patdenice@piwigo.org>2008-02-29 13:10:58 +0000
commitc38328da6b3bdd931c05e0a9087f0c75174f312d (patch)
treee4b3d6ff7962a2e996272a10990a023c8f9890e4 /include
parentba4f23dd830eedad3de915b6443665ebeb29673c (diff)
Merge from revision 2228.
Resolved bugs: 741 and 793: Added user does not appear in listing. 769: show email address in adviser mode when editing user profil. 800: get_absolute_root_url does not work with https protocol. git-svn-id: http://piwigo.org/svn/trunk@2229 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-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 00511e151..44b592036 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 53d6da3c1..e78ffb01a 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -866,7 +866,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;
}
@@ -1227,7 +1227,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'];
}