mirror of
https://github.com/friendica/friendica
synced 2025-04-24 09:10:17 +00:00
New post class in model classes
This commit is contained in:
parent
3ab4e20fe6
commit
b0d1a295fe
9 changed files with 77 additions and 76 deletions
|
@ -23,6 +23,7 @@ namespace Friendica\Model\Post;
|
|||
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Model\Tag;
|
||||
|
||||
/**
|
||||
|
@ -72,7 +73,7 @@ class Category
|
|||
*/
|
||||
public static function storeTextByURIId(int $uri_id, int $uid, string $files)
|
||||
{
|
||||
$message = Item::selectFirst(['deleted'], ['uri-id' => $uri_id, 'uid' => $uid]);
|
||||
$message = Post::selectFirst(['deleted'], ['uri-id' => $uri_id, 'uid' => $uid]);
|
||||
if (DBA::isResult($message)) {
|
||||
// Clean up all tags
|
||||
DBA::delete('post-category', ['uri-id' => $uri_id, 'uid' => $uid]);
|
||||
|
|
|
@ -27,6 +27,7 @@ use Friendica\Core\Worker;
|
|||
use Friendica\Database\Database;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Model\Tag;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
|
||||
|
@ -151,7 +152,7 @@ class Delayed
|
|||
}
|
||||
|
||||
if (!empty($id) && (!empty($taglist) || !empty($attachments))) {
|
||||
$feeditem = Item::selectFirst(['uri-id'], ['id' => $id]);
|
||||
$feeditem = Post::selectFirst(['uri-id'], ['id' => $id]);
|
||||
|
||||
foreach ($taglist as $tag) {
|
||||
Tag::store($feeditem['uri-id'], Tag::HASHTAG, $tag);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue