diff options
author | friendica <info@friendica.com> | 2015-01-07 14:35:03 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-07 14:35:03 -0800 |
commit | ce953e2f41c2bf8abdda2584dd84c2bd0175f609 (patch) | |
tree | 25a89639cd5de07fc1553c2a4f0c02c6aa171ee6 | |
parent | 3ef487418df8465143cc0393803b2a1ff221697f (diff) | |
download | volse-hubzilla-ce953e2f41c2bf8abdda2584dd84c2bd0175f609.tar.gz volse-hubzilla-ce953e2f41c2bf8abdda2584dd84c2bd0175f609.tar.bz2 volse-hubzilla-ce953e2f41c2bf8abdda2584dd84c2bd0175f609.zip |
syncing connections issue, incorrect return_url after deleting connection
-rwxr-xr-x | boot.php | 2 | ||||
-rw-r--r-- | include/Contact.php | 2 | ||||
-rw-r--r-- | mod/connections.php | 3 | ||||
-rw-r--r-- | mod/connedit.php | 9 | ||||
-rw-r--r-- | version.inc | 2 |
5 files changed, 10 insertions, 8 deletions
@@ -221,7 +221,7 @@ define ( 'PAGE_NORMAL', 0x0000 ); define ( 'PAGE_HIDDEN', 0x0001 ); define ( 'PAGE_AUTOCONNECT', 0x0002 ); define ( 'PAGE_APPLICATION', 0x0004 ); -define ( 'PAGE_DIRECTORY_CHANNEL', 0x0008 ); // system channel used for directory synchronisation + define ( 'PAGE_PREMIUM', 0x0010 ); define ( 'PAGE_ADULT', 0x0020 ); define ( 'PAGE_CENSORED', 0x0040 ); // Site admin has blocked this channel from appearing in casual search results and site feeds diff --git a/include/Contact.php b/include/Contact.php index 233798181..4f7a2a19f 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -519,6 +519,8 @@ function contact_remove($channel_id, $abook_id) { if((! $channel_id) || (! $abook_id)) return false; + logger('removing contact ' . $abook_id . ' for channel ' . $channel_id,LOGGER_DEBUG); + $archive = get_pconfig($channel_id, 'system','archive_removed_contacts'); if($archive) { q("update abook set abook_flags = ( abook_flags | %d ) where abook_id = %d and abook_channel = %d", diff --git a/mod/connections.php b/mod/connections.php index 70e28913a..d36734ccb 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -179,7 +179,8 @@ function connections_content(&$a) { $unconnected = false; $all = false; - $_SESSION['return_url'] = $a->query_string; + if(! $_REQUEST['aj']) + $_SESSION['return_url'] = $a->query_string; $search_flags = 0; $head = ''; diff --git a/mod/connedit.php b/mod/connedit.php index 6729029ac..abab0416e 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -216,10 +216,9 @@ function connedit_post(&$a) { $arr = array('channel_id' => local_user(), 'abook' => $a->poi); call_hooks('accept_follow', $arr); } -dbg(1); + if(! is_null($autoperms)) set_pconfig(local_user(),'system','autoperms',(($autoperms) ? $abook_my_perms : 0)); -dbg(0); connedit_clone($a); @@ -242,7 +241,7 @@ function connedit_clone(&$a) { unset($clone['abook_account']); unset($clone['abook_channel']); - build_sync_packet(0 /* use the current local_user */, array('abook' => array($clone))); + build_sync_packet(0 /* use the current local_user */, array(array('abook' => array($clone)))); } /* @brief Generate content of connection edit page @@ -403,9 +402,9 @@ function connedit_content(&$a) { contact_remove(local_user(), $orig_record[0]['abook_id']); build_sync_packet(0 /* use the current local_user */, - array('abook' => array( + array(array('abook' => array( 'abook_xchan' => $orig_record[0]['abook_xchan'], - 'entry_deleted' => true) + 'entry_deleted' => true)) ) ); diff --git a/version.inc b/version.inc index 9c65a441a..dcc95694a 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-01-06.911 +2015-01-07.912 |