From 26139ee06fc47a99c24c3d63096ccba3cb943aeb Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 4 Jan 2016 23:27:06 -0800 Subject: make 'refresh permissions' do something useful for non-zot connections --- mod/connedit.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mod/connedit.php b/mod/connedit.php index 9c46fa999..77b54d262 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -397,7 +397,6 @@ function connedit_content(&$a) { } if($cmd === 'update') { - // pull feed and consume it, which should subscribe to the hub. proc_run('php',"include/poller.php","$contact_id"); goaway($a->get_baseurl(true) . '/connedit/' . $contact_id); @@ -405,8 +404,15 @@ function connedit_content(&$a) { } if($cmd === 'refresh') { - if(! zot_refresh($orig_record[0],get_app()->get_channel())) - notice( t('Refresh failed - channel is currently unavailable.') ); + if($orig_record[0]['xchan_network'] === 'zot') { + if(! zot_refresh($orig_record[0],get_app()->get_channel())) + notice( t('Refresh failed - channel is currently unavailable.') ); + } + else { + + // if you are on a different network we'll force a refresh of the connection basic info + proc_run('php','include/notifier.php','permission_update',$contact_id); + } goaway($a->get_baseurl(true) . '/connedit/' . $contact_id); } -- cgit v1.2.3