mirror of
https://github.com/friendica/friendica
synced 2025-04-25 21:10:11 +00:00
New post class in the rest of the classes
This commit is contained in:
parent
3ab4e20fe6
commit
2fa692bcce
15 changed files with 33 additions and 20 deletions
|
@ -33,6 +33,7 @@ use Friendica\Database\DBA;
|
|||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Post as ModelPost;
|
||||
use Friendica\Model\Tag;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Protocol\Activity;
|
||||
|
@ -212,7 +213,7 @@ class Post
|
|||
if (!$origin) {
|
||||
/// @todo This shouldn't be done as query here, but better during the data creation.
|
||||
// it is now done here, since during the RC phase we shouldn't make to intense changes.
|
||||
$parent = Item::selectFirst(['origin'], ['id' => $item['parent']]);
|
||||
$parent = ModelPost::selectFirst(['origin'], ['id' => $item['parent']]);
|
||||
if (DBA::isResult($parent)) {
|
||||
$origin = $parent['origin'];
|
||||
}
|
||||
|
@ -875,7 +876,7 @@ class Post
|
|||
return '';
|
||||
}
|
||||
|
||||
$item = Item::selectFirst(['author-addr', 'uri-id'], ['id' => $this->getId()]);
|
||||
$item = ModelPost::selectFirst(['author-addr', 'uri-id'], ['id' => $this->getId()]);
|
||||
if (!DBA::isResult($item) || empty($item['author-addr'])) {
|
||||
// Should not happen
|
||||
return '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue