]> git.mxchange.org Git - friendica.git/commitdiff
added a check for http in homepage url, this should fix issue #768
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 12 Jan 2014 08:16:46 +0000 (09:16 +0100)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 12 Jan 2014 08:16:46 +0000 (09:16 +0100)
mod/profiles.php

index 148c632914a568a16b93e562f400b24b79818533..ad1f9a35126aba44e6e19ca39191318d0f85ca04 100644 (file)
@@ -288,6 +288,10 @@ function profiles_post(&$a) {
 
                $sexual = notags(trim($_POST['sexual']));
                $homepage = notags(trim($_POST['homepage']));
+               if (strpos($homepage, 'http') === false) {
+                   // neither http nor https in URL, add them
+                   $homepage = 'http://'.$homepage;
+               }
                $hometown = notags(trim($_POST['hometown']));
                $politic = notags(trim($_POST['politic']));
                $religion = notags(trim($_POST['religion']));