Replace all functions from boot.php
This commit is contained in:
parent
5f1028a535
commit
5d8129600d
45 changed files with 577 additions and 535 deletions
|
@ -15,6 +15,7 @@ use Friendica\Network\HTTPException;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\User;
|
||||
|
||||
|
@ -29,7 +30,7 @@ function opmlexport_install()
|
|||
function opmlexport(App $a)
|
||||
{
|
||||
$condition = [
|
||||
'uid' => local_user(),
|
||||
'uid' => Session::getLocalUser(),
|
||||
'self' => false,
|
||||
'deleted' => false,
|
||||
'archive' => false,
|
||||
|
@ -38,7 +39,7 @@ function opmlexport(App $a)
|
|||
'network' => Protocol::FEED
|
||||
];
|
||||
$data = Contact::selectToArray([], $condition, ['order' => ['name']]);
|
||||
$user = User::getById(local_user());
|
||||
$user = User::getById(Session::getLocalUser());
|
||||
|
||||
$xml = new \DOMDocument( '1.0', 'utf-8' );
|
||||
$opml = $xml->createElement('opml');
|
||||
|
@ -70,7 +71,7 @@ function opmlexport(App $a)
|
|||
|
||||
function opmlexport_addon_settings(App $a, array &$data)
|
||||
{
|
||||
if (!local_user()) {
|
||||
if (!Session::getLocalUser()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -84,7 +85,7 @@ function opmlexport_addon_settings(App $a, array &$data)
|
|||
|
||||
function opmlexport_addon_settings_post(App $a, array &$b)
|
||||
{
|
||||
if (!local_user() || empty($_POST['opmlexport-submit'])) {
|
||||
if (!Session::getLocalUser() || empty($_POST['opmlexport-submit'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue