1
1
Fork 0

Restructured "dba::exists" function

This commit is contained in:
Michael 2017-08-12 08:55:50 +00:00
commit 1d8c91c478
9 changed files with 33 additions and 35 deletions

View file

@ -334,9 +334,8 @@ function profile_content(App $a, $update = 0) {
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)) {
$unseen = dba::exists('item', array('wall' => true, 'unseen' => true, 'uid' => local_user()));
if ($unseen) {
$r = dba::update('item', array('unseen' => false),
array('wall' => true, 'unseen' => true, 'uid' => local_user()));
}