mirror of
https://github.com/friendica/friendica
synced 2025-04-27 12:30:11 +00:00
Replace "group" with "circle" in the rest of the code
- Remaining mentions already mean "forum"
This commit is contained in:
parent
4f6e02357a
commit
4f7740264e
120 changed files with 1308 additions and 1304 deletions
|
@ -27,7 +27,7 @@ use Friendica\Network\HTTPException;
|
|||
use Psr\Log\LoggerInterface;
|
||||
use Friendica\Factory\Api\Twitter\User as TwitterUser;
|
||||
|
||||
class Group extends BaseFactory
|
||||
class Circle extends BaseFactory
|
||||
{
|
||||
/** @var twitterUser entity */
|
||||
private $twitterUser;
|
||||
|
@ -43,19 +43,19 @@ class Group extends BaseFactory
|
|||
}
|
||||
|
||||
/**
|
||||
* @param int $id id of the group
|
||||
* @param int $id id of the circle
|
||||
* @return array
|
||||
* @throws HTTPException\InternalServerErrorException
|
||||
*/
|
||||
public function createFromId(int $id): array
|
||||
{
|
||||
$group = $this->dba->selectFirst('group', [], ['id' => $id, 'deleted' => false]);
|
||||
if (empty($group)) {
|
||||
$circle = $this->dba->selectFirst('group', [], ['id' => $id, 'deleted' => false]);
|
||||
if (empty($circle)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$user = $this->twitterUser->createFromUserId($group['uid'])->toArray();
|
||||
$object = new \Friendica\Object\Api\Friendica\Group($group, $user);
|
||||
$user = $this->twitterUser->createFromUserId($circle['uid'])->toArray();
|
||||
$object = new \Friendica\Object\Api\Friendica\Circle($circle, $user);
|
||||
|
||||
return $object->toArray();
|
||||
}
|
|
@ -40,9 +40,9 @@ class ListEntity extends BaseFactory
|
|||
/**
|
||||
* @throws InternalServerErrorException
|
||||
*/
|
||||
public function createFromGroupId(int $id): \Friendica\Object\Api\Mastodon\ListEntity
|
||||
public function createFromCircleId(int $id): \Friendica\Object\Api\Mastodon\ListEntity
|
||||
{
|
||||
$group = $this->dba->selectFirst('group', ['name'], ['id' => $id, 'deleted' => false]);
|
||||
return new \Friendica\Object\Api\Mastodon\ListEntity($id, $group['name'] ?? '', 'list');
|
||||
$circle = $this->dba->selectFirst('group', ['name'], ['id' => $id, 'deleted' => false]);
|
||||
return new \Friendica\Object\Api\Mastodon\ListEntity($id, $circle['name'] ?? '', 'list');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue