aboutsummaryrefslogtreecommitdiffstats
path: root/mod/follow.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2011-12-22 15:42:01 -0800
committerfriendica <info@friendica.com>2011-12-22 15:42:01 -0800
commit95b4bc55bf54c3dffdb714b8a1d8f38cc78355aa (patch)
treeced1f9a8bc579f85e0b74f76239de76ea95cedc0 /mod/follow.php
parented725df5f1c1ea2484c689283e93f8f825591384 (diff)
parentb602203e6c9ae4b380fa615450e1a573f47cb756 (diff)
downloadvolse-hubzilla-95b4bc55bf54c3dffdb714b8a1d8f38cc78355aa.tar.gz
volse-hubzilla-95b4bc55bf54c3dffdb714b8a1d8f38cc78355aa.tar.bz2
volse-hubzilla-95b4bc55bf54c3dffdb714b8a1d8f38cc78355aa.zip
Merge branch 'master' into notify
Diffstat (limited to 'mod/follow.php')
-rw-r--r--mod/follow.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/mod/follow.php b/mod/follow.php
index 2d643400a..f8964885e 100644
--- a/mod/follow.php
+++ b/mod/follow.php
@@ -2,7 +2,7 @@
require_once('Scrape.php');
-function follow_post(&$a) {
+function follow_init(&$a) {
if(! local_user()) {
notice( t('Permission denied.') . EOL);
@@ -10,7 +10,7 @@ function follow_post(&$a) {
// NOTREACHED
}
- $url = $orig_url = notags(trim($_POST['url']));
+ $url = $orig_url = notags(trim($_REQUEST['url']));
// remove ajax junk, e.g. Twitter
@@ -22,6 +22,14 @@ function follow_post(&$a) {
// NOTREACHED
}
+
+ if(! $url) {
+ notice( t('Connect URL missing.') . EOL);
+ goaway($_SESSION['return_url']);
+ // NOTREACHED
+ }
+
+
$ret = probe_url($url);
if($ret['network'] === NETWORK_DFRN) {
@@ -202,7 +210,9 @@ function follow_post(&$a) {
}
}
- goaway($a->get_baseurl() . '/contacts/' . $contact_id);
-// goaway($_SESSION['return_url']);
+ if(strstr($_SESSION['return_url'],'contacts'))
+ goaway($a->get_baseurl() . '/contacts/' . $contact_id);
+
+ goaway($_SESSION['return_url']);
// NOTREACHED
}