diff options
-rw-r--r-- | Zotlabs/Daemon/Expire.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Dreport.php | 1 | ||||
-rwxr-xr-x | include/items.php | 27 | ||||
-rw-r--r-- | view/tpl/dreport.tpl | 9 |
4 files changed, 19 insertions, 20 deletions
diff --git a/Zotlabs/Daemon/Expire.php b/Zotlabs/Daemon/Expire.php index 0ba83b240..215513e87 100644 --- a/Zotlabs/Daemon/Expire.php +++ b/Zotlabs/Daemon/Expire.php @@ -38,7 +38,7 @@ class Expire { logger('site_expire: ' . $site_expire); - $r = q("SELECT channel_id, channel_address, channel_pageflags, channel_expire_days from channel where true"); + $r = q("SELECT channel_id, channel_system, channel_address, channel_expire_days from channel where true"); if ($r) { foreach ($r as $rr) { diff --git a/Zotlabs/Module/Dreport.php b/Zotlabs/Module/Dreport.php index 17ed6515e..d2933b464 100644 --- a/Zotlabs/Module/Dreport.php +++ b/Zotlabs/Module/Dreport.php @@ -146,6 +146,7 @@ class Dreport extends \Zotlabs\Web\Controller { '$title' => sprintf( t('Delivery report for %1$s'),substr($mid,0,32)) . '...', '$table' => $table, '$mid' => urlencode($mid), + '$options' => t('Options'), '$push' => t('Redeliver'), '$entries' => $entries )); diff --git a/include/items.php b/include/items.php index 48358c0e4..72f0896ad 100755 --- a/include/items.php +++ b/include/items.php @@ -3286,15 +3286,17 @@ function item_expire($uid,$days) { $item_normal = item_normal(); - $r = q("SELECT * FROM `item` - WHERE `uid` = %d - AND `created` < %s - INTERVAL %s - AND `id` = `parent` - $sql_extra + $r = q("SELECT id FROM item + WHERE uid = %d + AND created < %s - INTERVAL %s AND item_retained = 0 - $item_normal LIMIT $expire_limit ", + AND item_thread_top = 1 + AND resource_type = '' + AND item_starred = 0 + $sql_extra $item_normal LIMIT $expire_limit ", intval($uid), - db_utcnow(), db_quoteinterval(intval($days).' DAY') + db_utcnow(), + db_quoteinterval(intval($days).' DAY') ); if(! $r) @@ -3312,17 +3314,6 @@ function item_expire($uid,$days) { continue; } - // Only expire posts, not photos and photo comments - - if($item['resource_type'] === 'photo') { - retain_item($item['id']); - continue; - } - if(intval($item['item_starred'])) { - retain_item($item['id']); - continue; - } - drop_item($item['id'],false); } diff --git a/view/tpl/dreport.tpl b/view/tpl/dreport.tpl index 7d5524a6a..8aa5e2cd1 100644 --- a/view/tpl/dreport.tpl +++ b/view/tpl/dreport.tpl @@ -1,7 +1,14 @@ <div class="generic-content-wrapper"> <div class="section-title-wrapper"> {{if $table == 'item'}} - <a href="dreport/push/{{$mid}}"><button class="btn btn-default btn-xs pull-right">{{$push}}</button></a> + <div class="dropdown pull-right"> + <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{$options}}"> + <i class="fa fa-sort-desc"></i> + </button> + <ul class="dropdown-menu"> + <li><a href="dreport/push/{{$mid}}">{{$push}}</a></li> + </ul> + </div> {{/if}} <h2>{{$title}}</h2> </div> |