diff options
-rw-r--r-- | doc/hidden_configs.bb | 3 | ||||
-rw-r--r-- | doc/hook/nav.bb | 27 | ||||
-rw-r--r-- | include/ItemObject.php | 15 | ||||
-rw-r--r-- | include/identity.php | 3 | ||||
-rw-r--r-- | include/zot.php | 12 | ||||
-rw-r--r-- | version.inc | 2 | ||||
-rwxr-xr-x | view/tpl/conv_item.tpl | 2 |
7 files changed, 59 insertions, 5 deletions
diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb index 44114967b..1323730aa 100644 --- a/doc/hidden_configs.bb +++ b/doc/hidden_configs.bb @@ -152,7 +152,8 @@ This document assumes you're an administrator. Spam prevention. Limits the number of tagged forums which are recognised in any post. Default is 2. Only the first 'n' tags will be delivered as forums, the others will not cause any delivery. [b]system > openssl_conf_file[/b] Needed in some Windows installations to locate the openssl configuration file on the system. - + [b]system > hide_help[/b] + Don't display help documentation link in nav bar [b]Directory config[/b] [b]Directory search defaults[/b] diff --git a/doc/hook/nav.bb b/doc/hook/nav.bb index 847573620..b52f90602 100644 --- a/doc/hook/nav.bb +++ b/doc/hook/nav.bb @@ -1 +1,28 @@ [h2]nav[/h2] + +Called when generating the main navigation bar and menu for a page + +Hook data: + + array( + 'usermenu' => array( 'icon' => photo URL, 'name' => channel name ) + 'nav' => array( + 'usermenu' => usermenu (photo menu) link array + (channel home, profiles, photos, cloud, chats, webapges ...) + 'loginmenu' => login menu link array + 'network' => grid link and grid-notify + 'home' => home link and home-notify + 'intros' => intros link and intros-notify + 'notifications' => notifications link and notifications-notify + 'messages' => PM link and PM-notify + 'all_events' => events link and events notfiy + 'manage' => manage channels link + 'settings' => settings link + 'register' => registration link + 'help' => help/doc link + 'apps' => apps link + 'search' => search link and form + 'directory' => directory link + ) + + diff --git a/include/ItemObject.php b/include/ItemObject.php index 34500efb9..512e12838 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -258,6 +258,15 @@ class Item extends BaseObject { if ($shareable) $share = array( t('Share This'), t('share')); + $dreport = ''; + + $keep_reports = intval(get_config('system','expire_delivery_reports')); + if($keep_reports === 0) + $keep_reports = 30; + + if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC',"now - $keep_reports days")) > 0) + $dreport = t('Delivery Report'); + if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) $indent .= ' shiny'; @@ -277,6 +286,10 @@ class Item extends BaseObject { $comment_count_txt = sprintf( tt('%d comment','%d comments',$total_children),$total_children ); $list_unseen_txt = (($unseen_comments) ? sprintf('%d unseen',$unseen_comments) : ''); + + + + $children = $this->get_children(); $has_tags = (($body['tags'] || $body['categories'] || $body['mentions'] || $body['attachments'] || $body['folders']) ? true : false); @@ -309,7 +322,7 @@ class Item extends BaseObject { 'vwall' => t('via Wall-To-Wall:'), 'profile_url' => $profile_link, 'item_photo_menu' => item_photo_menu($item), - 'dreport' => t('Delivery Report'), + 'dreport' => $dreport, 'name' => $profile_name, 'thumb' => $profile_avatar, 'osparkle' => $osparkle, diff --git a/include/identity.php b/include/identity.php index 4682cf624..95ade3b28 100644 --- a/include/identity.php +++ b/include/identity.php @@ -710,7 +710,8 @@ function identity_export_year($channel_id,$year,$month = 0) { else $maxdate = datetime_convert('UTC','UTC',$year+1 . '-01-01 00:00:00'); - $r = q("select * from item where item_wall = 1 and item_deleted = 0 and uid = %d and created >= '%s' and created < '%s' and resource_type = '' order by created", + $r = q("select * from item where ( item_wall = 1 or item_type != %d ) and item_deleted = 0 and uid = %d and created >= '%s' and created < '%s' and resource_type = '' order by created", + intval(ITEM_TYPE_POST), intval($channel_id), dbesc($mindate), dbesc($maxdate) diff --git a/include/zot.php b/include/zot.php index 23fb9c4ad..2366c1d2d 100644 --- a/include/zot.php +++ b/include/zot.php @@ -3950,6 +3950,10 @@ function delivery_report_is_storable($dr) { if(! $c) return false; + + + + // is the recipient one of our connections, or do we want to store every report? $r = explode(' ', $dr['recipient']); @@ -3958,6 +3962,14 @@ function delivery_report_is_storable($dr) { if($pcf) return true; + // We always add ourself as a recipient to private and relayed posts + // So if a remote site says they can't find us, that's no big surprise + // and just creates a lot of extra report noise + + if(($dr['location'] !== z_root()) && ($dr['sender'] === $rxchan) && ($dr['status'] === 'recipient_not_found')) + return false; + + $r = q("select abook_id from abook where abook_xchan = '%s' and abook_channel = %d limit 1", dbesc($rxchan), intval($c[0]['channel_id']) diff --git a/version.inc b/version.inc index 625be791e..c6bcb1648 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-11-20.1223 +2015-11-22.1224 diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 0d375400c..5257b3ed6 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -143,7 +143,7 @@ <li role="presentation" class="divider"></li> {{$item.item_photo_menu}} - {{if $item.edpost}} + {{if $item.edpost && $item.dreport}} <li role="presentation"><a role="menuitem" href="dreport/{{$item.mid}}">{{$item.dreport}}</a></li> {{/if}} |