mirror of
https://github.com/friendica/friendica
synced 2025-04-20 13:50:16 +00:00
Completely removed argc/argv
This commit is contained in:
parent
540ddb9265
commit
df558d4056
18 changed files with 70 additions and 114 deletions
|
@ -27,7 +27,6 @@ use Friendica\Model\User;
|
|||
use Friendica\Network\HTTPException\BadRequestException;
|
||||
use Friendica\Util\Crypto;
|
||||
use Friendica\Util\Strings;
|
||||
use phpseclib\File\ASN1;
|
||||
|
||||
/**
|
||||
* prints the public RSA key of a user
|
||||
|
@ -36,15 +35,11 @@ class PublicRSAKey extends BaseModule
|
|||
{
|
||||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
$app = DI::app();
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
if ($app->argc !== 2) {
|
||||
if (empty($parameters['nick'])) {
|
||||
throw new BadRequestException();
|
||||
}
|
||||
|
||||
// @TODO: Replace with parameter from router
|
||||
$nick = $app->argv[1];
|
||||
$nick = $parameters['nick'];
|
||||
|
||||
$user = User::getByNickname($nick, ['spubkey']);
|
||||
if (empty($user) || empty($user['spubkey'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue