summaryrefslogtreecommitdiff
path: root/app/Helper/Url.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-07-05 12:23:00 -0400
committerFrederic Guillot <fred@kanboard.net>2015-07-05 12:23:00 -0400
commit4438e03c62962ecf6265eddcb3d2c6e761638cda (patch)
tree426da61f5b1721397b56548f13d429c21b3b8976 /app/Helper/Url.php
parent45774afafcae850ecf71ea90b426fffc2c6f0628 (diff)
Set the assignee as organizer for ical events
Diffstat (limited to 'app/Helper/Url.php')
-rw-r--r--app/Helper/Url.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Helper/Url.php b/app/Helper/Url.php
index e133f195..8de63f8d 100644
--- a/app/Helper/Url.php
+++ b/app/Helper/Url.php
@@ -99,6 +99,10 @@ class Url extends \Core\Base
*/
public function server()
{
+ if (empty($_SERVER['SERVER_NAME'])) {
+ return 'http://localhost/';
+ }
+
$self = str_replace('\\', '/', dirname($_SERVER['PHP_SELF']));
$url = Request::isHTTPS() ? 'https://' : 'http://';