]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
add expire_starred option, fix "delete selected" on some themes, new project name...
[friendica.git] / include / items.php
index fd36dcadb9092432af0f81d746b2a150d14214ca..5ccf76b257c2d9837ec5ff6fff459c39f612d4e0 100644 (file)
@@ -2820,11 +2820,14 @@ function item_expire($uid,$days) {
        
        $expire_notes = get_pconfig($uid, 'expire','notes');
        $expire_notes = (($expire_notes===false)?1:intval($expire_notes)); // default if not set: 1
+
+       $expire_starred = get_pconfig($uid, 'expire','starred');
+       $expire_starred = (($expire_starred===false)?1:intval($expire_starred)); // default if not set: 1
        
        $expire_photos = get_pconfig($uid, 'expire','photos');
        $expire_photos = (($expire_photos===false)?0:intval($expire_photos)); // default if not set: 0
  
-       logger('expire: # items=' . count($r). "; expire items: $expire_items, expire notes: $expire_notes, expire photos: $expire_photos");
+       logger('expire: # items=' . count($r). "; expire items: $expire_items, expire notes: $expire_notes, expire starred: $expire_starred, expire photos: $expire_photos");
 
        foreach($r as $item) {
 
@@ -2832,6 +2835,8 @@ function item_expire($uid,$days) {
 
                if($expire_photos==0 && strlen($item['resource-id']))
                        continue;
+               if($expire_starred==0 && intval($item['starred']))
+                       continue;
                if($expire_notes==0 && $item['type']=='note')
                        continue;
                if($expire_items==0 && $item['type']!='note')