mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-10 09:04:26 +02:00
Merge pull request #8019 from nupplaphil/task/replace_getClass
Introduce new way of static/dynamic bridge / CleanUp deprecated methods
This commit is contained in:
commit
03038e7a3b
264 changed files with 1631 additions and 1854 deletions
|
@ -4,11 +4,9 @@
|
|||
*/
|
||||
namespace Friendica\Network;
|
||||
|
||||
use Friendica\BaseObject;
|
||||
use Friendica\App\Authentication;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use OAuthServer;
|
||||
use OAuthSignatureMethod_HMAC_SHA1;
|
||||
use OAuthSignatureMethod_PLAINTEXT;
|
||||
|
@ -37,7 +35,7 @@ class FKOAuth1 extends OAuthServer
|
|||
public function loginUser($uid)
|
||||
{
|
||||
Logger::log("FKOAuth1::loginUser $uid");
|
||||
$a = BaseObject::getApp();
|
||||
$a = DI::app();
|
||||
$record = DBA::selectFirst('user', [], ['uid' => $uid, 'blocked' => 0, 'account_expired' => 0, 'account_removed' => 0, 'verified' => 1]);
|
||||
|
||||
if (!DBA::isResult($record)) {
|
||||
|
@ -46,8 +44,6 @@ class FKOAuth1 extends OAuthServer
|
|||
die('This api requires login');
|
||||
}
|
||||
|
||||
/** @var Authentication $authentication */
|
||||
$authentication = BaseObject::getClass(Authentication::class);
|
||||
$authentication->setForUser($a, $record, true);
|
||||
DI::auth()->setForUser($a, $record, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ use Friendica\Core\Logger;
|
|||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Protocol\ActivityNamespace;
|
||||
|
@ -76,7 +77,7 @@ class Probe
|
|||
*/
|
||||
private static function ownHost($host)
|
||||
{
|
||||
$own_host = \get_app()->getHostName();
|
||||
$own_host = DI::baseUrl()->getHostname();
|
||||
|
||||
$parts = parse_url($host);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue