Make sure there is always a trailing slash for application_url

This commit is contained in:
Frederic Guillot
2015-09-30 22:21:35 -04:00
parent 8970fba41f
commit 792d5a20bc
3 changed files with 20 additions and 7 deletions

View File

@@ -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) {