summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-30 22:21:35 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-30 22:21:35 -0400
commit792d5a20bcb4926c91311afced67ddd008c3b79e (patch)
tree93ceaa5a5205bcb22fa00eaf91be95d5527bebc6 /app
parent8970fba41f9ecf46e9d4e477aeb11f81f84d96c7 (diff)
Make sure there is always a trailing slash for application_url
Diffstat (limited to 'app')
-rw-r--r--app/Model/Config.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Model/Config.php b/app/Model/Config.php
index 8e51da24..bbc86a88 100644
--- a/app/Model/Config.php
+++ b/app/Model/Config.php
@@ -208,6 +208,11 @@ class Config extends Base
{
foreach ($values as $option => $value) {
+ // Be sure that a trailing slash is there for the url
+ if ($option === 'application_url' && ! empty($value) && substr($value, -1) !== '/') {
+ $value .= '/';
+ }
+
$result = $this->db->table(self::TABLE)->eq('option', $option)->update(array('value' => $value));
if (! $result) {