From 792d5a20bcb4926c91311afced67ddd008c3b79e Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 30 Sep 2015 22:21:35 -0400 Subject: Make sure there is always a trailing slash for application_url --- app/Model/Config.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app') 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) { -- cgit v1.2.3