aboutsummaryrefslogtreecommitdiffstats
path: root/mod/salmon.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-07-05 07:11:57 +0200
committerfabrixxm <fabrix.xm@gmail.com>2011-07-05 07:11:57 +0200
commit4e7a5dc56ebb8d99ed06b0b303c4ee24460ae6a8 (patch)
tree84184bd3aa80c896b8dceaf5a017297c7267f2cb /mod/salmon.php
parentcfd59f6ac8848c19a0c451c378d2b770cafcbef0 (diff)
parent2359783b9f6c0ec754c641453026712cf22e7cb6 (diff)
downloadvolse-hubzilla-4e7a5dc56ebb8d99ed06b0b303c4ee24460ae6a8.tar.gz
volse-hubzilla-4e7a5dc56ebb8d99ed06b0b303c4ee24460ae6a8.tar.bz2
volse-hubzilla-4e7a5dc56ebb8d99ed06b0b303c4ee24460ae6a8.zip
Merge branch 'dispy' of github.com:fabrixxm/friendika into dispy
Diffstat (limited to 'mod/salmon.php')
-rw-r--r--mod/salmon.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/mod/salmon.php b/mod/salmon.php
index c2f76aa0a..721eae437 100644
--- a/mod/salmon.php
+++ b/mod/salmon.php
@@ -1,14 +1,11 @@
<?php
-// TODO:
-// add relevant contacts so they can use this
-
// There is a lot of debug stuff in here because this is quite a
// complicated process to try and sort out.
require_once('include/salmon.php');
-require_once('simplepie/simplepie.inc');
+require_once('library/simplepie/simplepie.inc');
function salmon_return($val) {
@@ -133,9 +130,9 @@ function salmon_post(&$a) {
// Setup RSA stuff to verify the signature
- set_include_path(get_include_path() . PATH_SEPARATOR . 'phpsec');
+ set_include_path(get_include_path() . PATH_SEPARATOR . 'library' . PATH_SEPARATOR . 'phpsec');
- require_once('phpsec/Crypt/RSA.php');
+ require_once('library/phpsec/Crypt/RSA.php');
$key_info = explode('.',$key);
@@ -186,7 +183,11 @@ function salmon_post(&$a) {
if(! count($r)) {
logger('mod-salmon: Author unknown to us.');
}
- if((count($r)) && ($r[0]['readonly'])) {
+
+ // is this a follower? Or have we ignored the person?
+ // If so we can not accept this post.
+
+ if((count($r)) && (($r[0]['readonly']) || ($r[0]['rel'] == REL_VIP) || ($r[0]['blocked']))) {
logger('mod-salmon: Ignoring this author.');
salmon_return(202);
// NOTREACHED