diff options
-rwxr-xr-x | include/items.php | 7 | ||||
-rw-r--r-- | include/zot.php | 18 | ||||
-rw-r--r-- | version.inc | 2 | ||||
-rw-r--r-- | view/css/widgets.css | 8 | ||||
-rwxr-xr-x | view/tpl/group_side.tpl | 14 |
5 files changed, 33 insertions, 16 deletions
diff --git a/include/items.php b/include/items.php index c4ae948b8..40343d505 100755 --- a/include/items.php +++ b/include/items.php @@ -3977,7 +3977,12 @@ function drop_item($id,$interactive = true,$stage = DROPITEM_NORMAL) { // send the notification upstream/downstream as the case may be // only send notifications to others if this is the owner's wall item. - if(($item['item_flags'] & ITEM_WALL) && ($stage != DROPITEM_PHASE2)) + // This isn't optimal. We somehow need to pass to this function whether or not + // to call the notifier, or we need to call the notifier from the calling function. + // We'll rely on the undocumented behaviour that DROPITEM_PHASE1 is (hopefully) only + // set if we know we're going to send delete notifications out to others. + + if((($item['item_flags'] & ITEM_WALL) && ($stage != DROPITEM_PHASE2)) || ($stage == DROPITEM_PHASE1)) proc_run('php','include/notifier.php','drop',$notify_id); goaway($a->get_baseurl() . '/' . $_SESSION['return_url']); diff --git a/include/zot.php b/include/zot.php index fda2a2bea..2d674c354 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1716,7 +1716,7 @@ function process_location_delivery($sender,$arr,$deliveries) { $sender['key'] = $r[0]['xchan_pubkey']; $x = sync_locations($sender,$arr,true); - logger('process_location_delivery: results: ' . print_r($x,true), LOGGER_DATA); + logger('process_location_delivery: results: ' . print_r($x,true), LOGGER_DEBUG); } @@ -1740,6 +1740,11 @@ function sync_locations($sender,$arr,$absolute = false) { } } + // Ensure that they have one primary hub + + if(! $has_primary) + $arr['locations'][0]['primary'] = true; + foreach($arr['locations'] as $location) { if(! rsa_verify($location['url'],base64url_decode($location['url_sig']),$sender['key'])) { logger('sync_locations: Unable to verify site signature for ' . $location['url']); @@ -1747,10 +1752,6 @@ function sync_locations($sender,$arr,$absolute = false) { continue; } - // Ensure that they have one primary hub - - if(! $has_primary) - $location['primary'] = true; for($x = 0; $x < count($xisting); $x ++) { if(($xisting[$x]['hubloc_url'] === $location['url']) @@ -1824,6 +1825,8 @@ function sync_locations($sender,$arr,$absolute = false) { q("delete from hubloc where hubloc_id = %d limit 1", intval($r[$h]['hubloc_id']) ); + $what .= 'duplicate_hubloc_removed '; + $changed = true; } } @@ -1850,7 +1853,8 @@ function sync_locations($sender,$arr,$absolute = false) { continue; } - // new hub claiming to be primary. Make it so. + // Existing hubs are dealt with. Now let's process any new ones. + // New hub claiming to be primary. Make it so by removing any existing primaries. if(intval($location['primary'])) { $r = q("update hubloc set hubloc_flags = (hubloc_flags ^ %d), hubloc_updated = '%s' where hubloc_hash = '%s' and (hubloc_flags & %d )", @@ -1893,7 +1897,7 @@ function sync_locations($sender,$arr,$absolute = false) { dbesc(datetime_convert()), intval($x['hubloc_id']) ); - $what .= 'removed_hub'; + $what .= 'removed_hub '; $changed = true; } } diff --git a/version.inc b/version.inc index e509fa400..5c34749ec 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2014-10-10.824 +2014-10-12.826 diff --git a/view/css/widgets.css b/view/css/widgets.css index 5176c6934..cb976e166 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -81,10 +81,16 @@ /* group */ +input.group-edit-checkbox { + margin: unset; +} + +a.group-edit-link { + z-index: 1; +} .group-edit-icon { opacity: 0; - z-index: 1; } li:hover .group-edit-icon { diff --git a/view/tpl/group_side.tpl b/view/tpl/group_side.tpl index 3701f979e..6c5edba27 100755 --- a/view/tpl/group_side.tpl +++ b/view/tpl/group_side.tpl @@ -5,14 +5,16 @@ {{foreach $groups as $group}} <li> {{if $group.cid}} - <input type="checkbox" - class="{{if $group.selected}}ticked{{else}}unticked {{/if}} action" - onclick="contactgroupChangeMember('{{$group.id}}','{{$group.enc_cid}}');return true;" - {{if $group.ismember}}checked="checked"{{/if}} - /> + <a class="pull-right group-edit-link"> + <input type="checkbox" + class="{{if $group.selected}}ticked{{else}}unticked {{/if}} group-edit-checkbox" + onclick="contactgroupChangeMember('{{$group.id}}','{{$group.enc_cid}}');return true;" + {{if $group.ismember}}checked="checked"{{/if}} + /> + </a> {{/if}} {{if $group.edit}} - <a class="pull-right group-edit-icon" href="{{$group.edit.href}}" title="{{$edittext}}"><i class="icon-pencil"></i></a> + <a class="pull-right group-edit-link" href="{{$group.edit.href}}" title="{{$edittext}}"><i class="group-edit-icon icon-pencil"></i></a> {{/if}} <a{{if $group.selected}} class="group-selected"{{/if}} href="{{$group.href}}">{{$group.text}}</a> </li> |