X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fitems.php;h=4666211d82ca655410f82fed751f2c0e451ef468;hb=0b598dedd04c185a17f28c5197a05472e1a54c12;hp=fd36dcadb9092432af0f81d746b2a150d14214ca;hpb=ea04263f52dc30ca21e2bfb61ff41cf4428f69f2;p=friendica.git diff --git a/include/items.php b/include/items.php index fd36dcadb9..4666211d82 100644 --- a/include/items.php +++ b/include/items.php @@ -143,7 +143,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) $salmon = feed_salmonlinks($owner_nick); $atom .= replace_macros($feed_template, array( - '$version' => xmlify(FRIENDIKA_VERSION), + '$version' => xmlify(FRIENDICA_VERSION), '$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner_nick), '$feed_title' => xmlify($owner['name']), '$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now' , ATOM_TIME)) , @@ -1824,6 +1824,20 @@ function local_delivery($importer,$data) { // send email notification if requested. + $notif_params = array( + 'type' => NOTIFY_MAIL, + 'notify_flags' => $importer['notify_flags'], + 'language' => $importer['language'], + 'to_name' => $importer['username'], + 'to_email' => $importer['email'], + 'item' => $msg, + 'source_name' => $msg['from-name'], + 'source_link' => $importer['url'], + 'source_photo' => $importer['thumb'], + ); + + //notification($notif_params); + require_once('bbcode.php'); if($importer['notify-flags'] & NOTIFY_MAIL) { @@ -1924,7 +1938,7 @@ function local_delivery($importer,$data) { if($deleted) { $r = q("SELECT `item`.*, `contact`.`self` FROM `item` left join contact on `item`.`contact-id` = `contact`.`id` - WHERE `uri` = '%s' AND `uid` = %d AND `contact-id` = %d LIMIT 1", + WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d LIMIT 1", dbesc($uri), intval($importer['importer_uid']), intval($importer['id']) @@ -2820,11 +2834,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 +2849,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')