use Friendica\Content\Feature;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
-use Friendica\Core\Authentication;
use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
use Friendica\Core\NotificationsManager;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
+use Friendica\Core\Session;
use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
throw new UnauthorizedException("This API requires login");
}
- Authentication::setAuthenticatedSessionForUser($record);
+ Session::setAuthenticatedForUser($a, $record);
$_SESSION["allow_api"] = true;
Logger::warning(API_LOG_PREFIX . 'not implemented', ['module' => 'api', 'action' => 'call']);
throw new NotImplementedException();
} catch (HTTPException $e) {
- header("HTTP/1.1 {$e->httpcode} {$e->httpdesc}");
+ header("HTTP/1.1 {$e->getCode()} {$e->httpdesc}");
return api_error($type, $e);
}
}
/// @TODO: https://dev.twitter.com/overview/api/response-codes
$error = ["error" => $error,
- "code" => $e->httpcode . " " . $e->httpdesc,
+ "code" => $e->getCode() . " " . $e->httpdesc,
"request" => $a->query_string];
$return = api_format_data('status', $type, ['status' => $error]);