1
0
Fork 0

New item field "Post-type" and new table "permissionset" (#5408)

* "post-type" replaces "bookmark" and "type"

* Removed some more type

* Added index to permission set

* The permission set is now stored

* The permission set is now removed upon expiry

* Post update now stores the permission set

* New file

* Permissions are now sorted

* Changed documentation
This commit is contained in:
Michael Vogel 2018-07-19 15:52:05 +02:00 committed by Hypolite Petovan
commit 5af9596dde
29 changed files with 222 additions and 145 deletions

View file

@ -57,13 +57,9 @@ function notes_content(App $a, $update = false)
$o .= status_editor($a, $x, $a->contact['id']);
}
$condition = ["`uid` = ? AND `type` = 'note' AND `gravity` = ? AND NOT `wall`
AND `allow_cid` = ? AND `contact-id` = ?",
local_user(), GRAVITY_PARENT, '<' . $a->contact['id'] . '>', $a->contact['id']];
$condition = ['uid' => local_user(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => GRAVITY_PARENT,
'wall' => false, 'allow_cid' => '<' . $a->contact['id'] . '>', 'contact-id'=> $a->contact['id']];
$notes = dba::count('item', $condition);
$a->set_pager_total($notes);
$a->set_pager_itemspage(40);
$params = ['order' => ['created' => true],
@ -86,6 +82,6 @@ function notes_content(App $a, $update = false)
}
}
$o .= paginate($a);
$o .= alt_pager($a, count($r));
return $o;
}