More item abstraction / making remote deletion work again
This commit is contained in:
parent
d6af9515ba
commit
4d35e228c4
10 changed files with 31 additions and 21 deletions
|
@ -241,7 +241,7 @@ function acl_content(App $a)
|
|||
|
||||
if ($conv_id) {
|
||||
// In multi threaded posts the conv_id is not the parent of the whole thread
|
||||
$parent_item = dba::selectFirst('item', ['parent'], ['id' => $conv_id]);
|
||||
$parent_item = Item::selectFirst(['parent'], ['id' => $conv_id]);
|
||||
if (DBM::is_result($parent_item)) {
|
||||
$conv_id = $parent_item['parent'];
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
|
|||
|
||||
if ($update) {
|
||||
$item_id = $_REQUEST['item_id'];
|
||||
$item = dba::selectFirst('item', ['uid', 'parent', 'parent-uri'], ['id' => $item_id]);
|
||||
$item = Item::selectFirst(['uid', 'parent', 'parent-uri'], ['id' => $item_id]);
|
||||
if ($item['uid'] != 0) {
|
||||
$a->profile = ['uid' => intval($item['uid']), 'profile_uid' => intval($item['uid'])];
|
||||
} else {
|
||||
|
|
|
@ -106,7 +106,7 @@ function item_post(App $a) {
|
|||
$thr_parent_contact = Contact::getDetailsByURL($parent_item["author-link"]);
|
||||
|
||||
if ($parent_item['id'] != $parent_item['parent']) {
|
||||
$parent_item = dba::selectFirst('item', [], ['id' => $parent_item['parent']]);
|
||||
$parent_item = Item::selectFirst(Item::ITEM_FIELDLIST, ['id' => $parent_item['parent']]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ function item_post(App $a) {
|
|||
$orig_post = null;
|
||||
|
||||
if ($post_id) {
|
||||
$orig_post = dba::selectFirst('item', [], ['id' => $post_id]);
|
||||
$orig_post = Item::selectFirst(Item::ITEM_FIELDLIST, ['id' => $post_id]);
|
||||
}
|
||||
|
||||
$user = dba::selectFirst('user', [], ['uid' => $profile_uid]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue