New dba functions
This commit is contained in:
parent
7b6664f0f7
commit
d810b21f87
12 changed files with 157 additions and 167 deletions
|
|
@ -333,11 +333,13 @@ function profile_content(App $a, $update = 0) {
|
|||
}
|
||||
|
||||
|
||||
if($is_owner) {
|
||||
$r = q("UPDATE `item` SET `unseen` = 0
|
||||
WHERE `wall` = 1 AND `unseen` = 1 AND `uid` = %d",
|
||||
intval(local_user())
|
||||
);
|
||||
if ($is_owner) {
|
||||
$unseen = dba::select('item', array('id'), array('wall' => true, 'unseen' => true, 'uid' => local_user()),
|
||||
array('limit' => 1));
|
||||
if (dbm::is_result($unseen)) {
|
||||
$r = dba::update('item', array('unseen' => false),
|
||||
array('wall' => true, 'unseen' => true, 'uid' => local_user()));
|
||||
}
|
||||
}
|
||||
|
||||
$o .= conversation($a, $items, 'profile', $update);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue