mirror of
https://github.com/friendica/friendica
synced 2025-05-05 23:04:09 +02:00
Use channels for non public content
This commit is contained in:
parent
a1f6e6e871
commit
b00c2070d7
9 changed files with 67 additions and 58 deletions
|
@ -36,10 +36,10 @@ class Post
|
|||
*
|
||||
* @param integer $uri_id
|
||||
* @param array $fields
|
||||
* @return int ID of inserted post
|
||||
* @return bool Success of the insert process
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function insert(int $uri_id, array $data = []): int
|
||||
public static function insert(int $uri_id, array $data = []): bool
|
||||
{
|
||||
if (empty($uri_id)) {
|
||||
throw new BadMethodCallException('Empty URI_id');
|
||||
|
@ -50,11 +50,7 @@ class Post
|
|||
// Additionally assign the key fields
|
||||
$fields['uri-id'] = $uri_id;
|
||||
|
||||
if (!DBA::insert('post', $fields, Database::INSERT_IGNORE)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return DBA::lastInsertId();
|
||||
return DBA::insert('post', $fields, Database::INSERT_IGNORE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue