New dba functions

This commit is contained in:
Michael 2017-08-11 08:04:01 +00:00
commit d810b21f87
12 changed files with 157 additions and 167 deletions

View file

@ -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);