bring back selective "mark unseen" on network page now that we can mark all unseen
This commit is contained in:
parent
fb2b21626e
commit
13ff4b9f01
1
boot.php
1
boot.php
@ -472,7 +472,6 @@ if(! class_exists('App')) {
|
|||||||
public $cid;
|
public $cid;
|
||||||
public $contact;
|
public $contact;
|
||||||
public $contacts;
|
public $contacts;
|
||||||
public $page_contact;
|
|
||||||
public $content;
|
public $content;
|
||||||
public $data = array();
|
public $data = array();
|
||||||
public $error = false;
|
public $error = false;
|
||||||
|
@ -109,8 +109,6 @@ function display_content(&$a) {
|
|||||||
// $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
|
// $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
|
||||||
// intval($a->profile['uid'])
|
// intval($a->profile['uid'])
|
||||||
// );
|
// );
|
||||||
// if(count($r))
|
|
||||||
// $a->page_contact = $r[0];
|
|
||||||
|
|
||||||
// $is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false);
|
// $is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false);
|
||||||
|
|
||||||
|
@ -674,26 +674,21 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
else {
|
else {
|
||||||
$items = array();
|
$items = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($parents_str)
|
||||||
|
$update_unseen = ' AND parent IN ( ' . dbesc($parents_str) . ' )';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// logger('items: ' . count($items));
|
// logger('items: ' . count($items));
|
||||||
|
|
||||||
// We aren't going to try and figure out at the item, group, and page
|
if($update_unseen)
|
||||||
// level which items you've seen and which you haven't. If you're looking
|
|
||||||
// at the top level network page just mark everything seen.
|
|
||||||
|
|
||||||
if((! $group) && (! $cid) && (! $star)) {
|
|
||||||
$r = q("UPDATE `item` SET item_flags = ( item_flags ^ %d)
|
$r = q("UPDATE `item` SET item_flags = ( item_flags ^ %d)
|
||||||
WHERE (item_flags & %d) AND `uid` = %d",
|
WHERE (item_flags & %d) AND `uid` = %d $update_unseen ",
|
||||||
intval(ITEM_UNSEEN),
|
intval(ITEM_UNSEEN),
|
||||||
intval(ITEM_UNSEEN),
|
intval(ITEM_UNSEEN),
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
}
|
|
||||||
|
|
||||||
// fixme
|
|
||||||
// Set this so that the conversation function can find out contact info for our wall-wall items
|
|
||||||
$a->page_contact = $a->contact;
|
|
||||||
|
|
||||||
$mode = (($nouveau) ? 'network-new' : 'network');
|
$mode = (($nouveau) ? 'network-new' : 'network');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user