aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_url.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2010-05-28 19:58:51 +0000
committerrvelices <rv-github@modusoptimus.com>2010-05-28 19:58:51 +0000
commit722c4a3a9740506ed4f409fcd9517027f8cbcee5 (patch)
treef2df91637c418d6aacf07a4059fbe0a8923167cf /include/functions_url.inc.php
parentef50e468d4f7115e6e9ee7b54165230c8831109f (diff)
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
Diffstat (limited to '')
-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