From c4d088459634d8148620a27c56ba06b33814668f Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 3 Feb 2014 14:03:43 -0800 Subject: accept new connection broke yesterday --- boot.php | 1 + mod/connections.php | 2 ++ mod/connedit.php | 5 ++++- view/tpl/abook_edit.tpl | 6 +++--- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index c58580312..18a4ff888 100755 --- a/boot.php +++ b/boot.php @@ -398,6 +398,7 @@ define ( 'TERM_PCATEGORY', 4 ); define ( 'TERM_FILE', 5 ); define ( 'TERM_SAVEDSEARCH', 6 ); define ( 'TERM_THING', 7 ); +define ( 'TERM_BOOKMARK', 8 ); define ( 'TERM_OBJ_POST', 1 ); define ( 'TERM_OBJ_PHOTO', 2 ); diff --git a/mod/connections.php b/mod/connections.php index 2119c69c7..3da9cec74 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -74,6 +74,7 @@ function connections_post(&$a) { $abook_flags = $orig_record[0]['abook_flags']; $new_friend = false; + if(($_REQUEST['pending']) && ($abook_flags & ABOOK_FLAG_PENDING)) { $abook_flags = ( $abook_flags ^ ABOOK_FLAG_PENDING ); $new_friend = true; @@ -88,6 +89,7 @@ function connections_post(&$a) { intval($contact_id), intval(local_user()) ); + if($r) info( t('Connection updated.') . EOL); else diff --git a/mod/connedit.php b/mod/connedit.php index b7101fcab..3f507cc3b 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -32,7 +32,7 @@ function connedit_init(&$a) { } function connedit_post(&$a) { - + if(! local_user()) return; @@ -86,6 +86,8 @@ function connedit_post(&$a) { $abook_flags = $orig_record[0]['abook_flags']; $new_friend = false; + + if(($_REQUEST['pending']) && ($abook_flags & ABOOK_FLAG_PENDING)) { $abook_flags = ( $abook_flags ^ ABOOK_FLAG_PENDING ); $new_friend = true; @@ -100,6 +102,7 @@ function connedit_post(&$a) { intval($contact_id), intval(local_user()) ); + if($r) info( t('Connection updated.') . EOL); else diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 265a1a953..274d0d5de 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -30,6 +30,9 @@ {{/if}} +
+ + {{if $is_pending}} @@ -50,9 +53,6 @@

{{$permlbl}}

{{$permnote}}
- - - {{* {{if $noperms}}
{{$noperms}}
-- cgit v1.2.3