From 292b02b58ccb18d10de948d30ccc0cc6ba345d5e Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 22 Nov 2015 14:06:52 -0800 Subject: webpages and design elements weren't being included in the item export query. --- include/identity.php | 3 ++- version.inc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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/version.inc b/version.inc index 05ca8c657..c6bcb1648 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-11-20.1222 +2015-11-22.1224 -- cgit v1.2.3 From a7e4553ea75854e9ab5d94566d0f8d0550e4205b Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 22 Nov 2015 17:12:30 -0800 Subject: delivery report tweaks --- include/ItemObject.php | 15 ++++++++++++++- include/zot.php | 12 ++++++++++++ view/tpl/conv_item.tpl | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) 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/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/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 @@ {{$item.item_photo_menu}} - {{if $item.edpost}} + {{if $item.edpost && $item.dreport}}
  • {{$item.dreport}}
  • {{/if}} -- cgit v1.2.3 From ae1103c5a3f3f76a0269cbb5de11a7cb96496ad3 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 22 Nov 2015 18:20:19 -0800 Subject: doco updates --- doc/hidden_configs.bb | 3 ++- doc/hook/nav.bb | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) 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 + ) + + -- cgit v1.2.3