aboutsummaryrefslogtreecommitdiff
path: root/app/models/Feed.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-12-04 22:24:41 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2012-12-04 22:24:41 +0100
commit0a0758995a10e28863f827be41c7a59340bc5e59 (patch)
tree3814344adc5676c57125bc005cb3f47c19fe6afa /app/models/Feed.php
parent250c75de2a28d5bd7b724fd170e75e5910c79ddc (diff)
Fix issue #20 (?)
Diffstat (limited to 'app/models/Feed.php')
-rw-r--r--app/models/Feed.php4
1 files changed, 4 insertions, 0 deletions
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 {