aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-07 20:42:49 -0700
committerfriendica <info@friendica.com>2014-08-07 20:42:49 -0700
commit50be78d7dc55b1669866e97f57d932af0dc8eef1 (patch)
treed6d8d3e0c84abf1d469386d6a505a84223834787
parentad1472abf008147df0d3142d34dd9e20ec8cab96 (diff)
downloadvolse-hubzilla-50be78d7dc55b1669866e97f57d932af0dc8eef1.tar.gz
volse-hubzilla-50be78d7dc55b1669866e97f57d932af0dc8eef1.tar.bz2
volse-hubzilla-50be78d7dc55b1669866e97f57d932af0dc8eef1.zip
fix ignore of unapproved connection
-rw-r--r--mod/connedit.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/mod/connedit.php b/mod/connedit.php
index 7d20890fa..b7535550d 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -264,12 +264,10 @@ function connedit_content(&$a) {
$cmd = argv(2);
$orig_record = q("SELECT abook.*, xchan.* FROM abook left join xchan on abook_xchan = xchan_hash
- WHERE abook_id = %d AND abook_channel = %d AND NOT ( abook_flags & %d ) and not ( abook_flags & %d ) LIMIT 1",
+ WHERE abook_id = %d AND abook_channel = %d AND NOT ( abook_flags & %d ) LIMIT 1",
intval($contact_id),
intval(local_user()),
- intval(ABOOK_FLAG_SELF),
- // allow drop even if pending, just duplicate the self query
- intval(($cmd === 'drop') ? ABOOK_FLAG_SELF : ABOOK_FLAG_PENDING)
+ intval(ABOOK_FLAG_SELF)
);
if(! count($orig_record)) {
@@ -339,7 +337,8 @@ function connedit_content(&$a) {
goaway($a->get_baseurl(true) . '/connedit/' . $contact_id);
}
- // We'll prevent somebody from unapproving a contact.
+ // We'll prevent somebody from unapproving an already approved contact.
+ // Though maybe somebody will want this eventually (??)
if($cmd === 'approve') {
if($orig_record[0]['abook_flags'] & ABOOK_FLAG_PENDING) {