From 722c4a3a9740506ed4f409fcd9517027f8cbcee5 Mon Sep 17 00:00:00 2001 From: rvelices Date: Fri, 28 May 2010 19:58:51 +0000 Subject: merge r6368,6410 from branch-2.1 to trunk - merged the linkroot integration with the existing gallery_url (unique $conf['gallery_url'] used for RSS, mail homepage root in the browse path) - added an option $conf['debug_mail'] - if set all outgoing mails are saved into local_data_dir git-svn-id: http://piwigo.org/svn/trunk@6411 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_url.inc.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'include/functions_url.inc.php') diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php index a23dd23ed..fe4e5f5e0 100644 --- a/include/functions_url.inc.php +++ b/include/functions_url.inc.php @@ -58,7 +58,7 @@ function get_absolute_root_url($with_scheme=true) $url = ''; if ($with_scheme) { - if (isset($_SERVER['HTTPS']) && + if (isset($_SERVER['HTTPS']) && ((strtolower($_SERVER['HTTPS']) == 'on') or ($_SERVER['HTTPS'] == 1))) { $url .= 'https://'; @@ -727,4 +727,23 @@ function embellish_url($url) return $url; } +/** + * Returns the 'home page' of this gallery + */ +function get_gallery_home_url() +{ + global $conf; + if (!empty($conf['gallery_url'])) + { + if (url_is_remote($conf['gallery_url']) or strncmp($conf['gallery_url'], '/', 1)==0) + { + return $conf['gallery_url']; + } + return get_root_url().$conf['gallery_url']; + } + else + { + return make_index_url(); + } +} ?> \ No newline at end of file -- cgit v1.2.3