old boot.functions replaced in /mod
This commit is contained in:
+8
-7
@@ -22,6 +22,7 @@
|
||||
use Friendica\App;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Content\Pager;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Item;
|
||||
@@ -30,7 +31,7 @@ use Friendica\Module\BaseProfile;
|
||||
|
||||
function notes_init(App $a)
|
||||
{
|
||||
if (! local_user()) {
|
||||
if (! Session::getLocalUser()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -40,7 +41,7 @@ function notes_init(App $a)
|
||||
|
||||
function notes_content(App $a, bool $update = false)
|
||||
{
|
||||
if (!local_user()) {
|
||||
if (!Session::getLocalUser()) {
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Permission denied.'));
|
||||
return;
|
||||
}
|
||||
@@ -52,7 +53,7 @@ function notes_content(App $a, bool $update = false)
|
||||
|
||||
$x = [
|
||||
'lockstate' => 'lock',
|
||||
'acl' => \Friendica\Core\ACL::getSelfOnlyHTML(local_user(), DI::l10n()->t('Personal notes are visible only by yourself.')),
|
||||
'acl' => \Friendica\Core\ACL::getSelfOnlyHTML(Session::getLocalUser(), DI::l10n()->t('Personal notes are visible only by yourself.')),
|
||||
'button' => DI::l10n()->t('Save'),
|
||||
'acl_data' => '',
|
||||
];
|
||||
@@ -60,14 +61,14 @@ function notes_content(App $a, bool $update = false)
|
||||
$o .= DI::conversation()->statusEditor($x, $a->getContactId());
|
||||
}
|
||||
|
||||
$condition = ['uid' => local_user(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => Item::GRAVITY_PARENT,
|
||||
$condition = ['uid' => Session::getLocalUser(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => Item::GRAVITY_PARENT,
|
||||
'contact-id'=> $a->getContactId()];
|
||||
|
||||
if (DI::mode()->isMobile()) {
|
||||
$itemsPerPage = DI::pConfig()->get(local_user(), 'system', 'itemspage_mobile_network',
|
||||
$itemsPerPage = DI::pConfig()->get(Session::getLocalUser(), 'system', 'itemspage_mobile_network',
|
||||
DI::config()->get('system', 'itemspage_network_mobile'));
|
||||
} else {
|
||||
$itemsPerPage = DI::pConfig()->get(local_user(), 'system', 'itemspage_network',
|
||||
$itemsPerPage = DI::pConfig()->get(Session::getLocalUser(), 'system', 'itemspage_network',
|
||||
DI::config()->get('system', 'itemspage_network'));
|
||||
}
|
||||
|
||||
@@ -75,7 +76,7 @@ function notes_content(App $a, bool $update = false)
|
||||
|
||||
$params = ['order' => ['created' => true],
|
||||
'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
|
||||
$r = Post::selectThreadForUser(local_user(), ['uri-id'], $condition, $params);
|
||||
$r = Post::selectThreadForUser(Session::getLocalUser(), ['uri-id'], $condition, $params);
|
||||
|
||||
$count = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user