From 0a0758995a10e28863f827be41c7a59340bc5e59 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Tue, 4 Dec 2012 22:24:41 +0100 Subject: [PATCH] Fix issue #20 (?) --- app/models/Feed.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/Feed.php b/app/models/Feed.php index 7568069b0..c88a4d527 100644 --- a/app/models/Feed.php +++ b/app/models/Feed.php @@ -43,6 +43,10 @@ class Feed extends Model { } public function _url ($value) { + if (!is_null ($value) && !preg_match ('#^https?://#', $value)) { + $value = 'http://' . $value; + } + if (!is_null ($value) && filter_var ($value, FILTER_VALIDATE_URL)) { $this->url = $value; } else {