Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
patdenice committed Feb 29, 2008
1 parent ba4f23d commit c38328d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion include/functions_url.inc.php
Expand Up @@ -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'];
Expand Down
4 changes: 2 additions & 2 deletions include/functions_user.inc.php
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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'];
}
Expand Down
2 changes: 1 addition & 1 deletion profile.php
Expand Up @@ -228,7 +228,7 @@ function load_profile_in_template($url_action, $url_redirect, $userdata)
array(
'USERNAME'=>$userdata['username'],
'USERID'=>$userdata['id'],
'EMAIL'=>@$userdata['email'],
'EMAIL'=>get_email_address_as_display_text(@$userdata['email']),
'NB_IMAGE_LINE'=>$userdata['nb_image_line'],
'NB_ROW_PAGE'=>$userdata['nb_line_page'],
'RECENT_PERIOD'=>$userdata['recent_period'],
Expand Down

0 comments on commit c38328d

Please sign in to comment.