mirror of
https://github.com/friendica/friendica
synced 2025-04-25 18:30:11 +00:00
old boot.php functions replaced in src/module
This commit is contained in:
parent
ba9f145ef7
commit
d2da2492b7
21 changed files with 103 additions and 86 deletions
|
@ -22,6 +22,7 @@
|
|||
namespace Friendica\Module;
|
||||
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
|
@ -49,7 +50,7 @@ class PermissionTooltip extends \Friendica\BaseModule
|
|||
throw new HTTPException\BadRequestException(DI::l10n()->t('Wrong type "%s", expected one of: %s', $type, implode(', ', $expectedTypes)));
|
||||
}
|
||||
|
||||
$condition = ['id' => $referenceId, 'uid' => [0, local_user()]];
|
||||
$condition = ['id' => $referenceId, 'uid' => [0, Session::getLocalUser()]];
|
||||
if ($type == 'item') {
|
||||
$fields = ['uid', 'psid', 'private', 'uri-id'];
|
||||
$model = Post::selectFirst($fields, $condition);
|
||||
|
@ -177,7 +178,7 @@ class PermissionTooltip extends \Friendica\BaseModule
|
|||
private function fetchReceivers(int $uriId): string
|
||||
{
|
||||
$own_url = '';
|
||||
$uid = local_user();
|
||||
$uid = Session::getLocalUser();
|
||||
if ($uid) {
|
||||
$owner = User::getOwnerDataById($uid);
|
||||
if (!empty($owner['url'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue