aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_url.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2010-05-28 19:55:03 +0000
committerrvelices <rv-github@modusoptimus.com>2010-05-28 19:55:03 +0000
commit1b90ca176434d9e57b8be750216eb637b4685b47 (patch)
tree2ad024e45e0bf98f7d0f545e06081b8ba5df82d2 /include/functions_url.inc.php
parentf0d6ec33ce231f77077ba6535ca8312286f9a40b (diff)
- 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/branches/2.1@6410 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_url.inc.php')
-rw-r--r--include/functions_url.inc.php21
1 files changed, 20 insertions, 1 deletions
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