*/
use Friendica\App;
-use Friendica\Core\Config;
-use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
*/
function dfrn_request_post(App $a)
{
- if (($a->argc != 2) || (!count($a->profile))) {
- Logger::log('Wrong count of argc or profiles: argc=' . $a->argc . ',profile()=' . count($a->profile));
+ if ($a->argc != 2 || empty($a->profile)) {
+ Logger::log('Wrong count of argc or profiles: argc=' . $a->argc . ', profile()=' . count($a->profile ?? []));
return;
}
}
$invalid = Probe::validDfrn($parms);
if ($invalid) {
- notice(L10n::tt("%d required parameter was not found at the given location", "%d required parameters were not found at the given location", $invalid) . EOL);
+ notice(DI::l10n()->tt("%d required parameter was not found at the given location", "%d required parameters were not found at the given location", $invalid) . EOL);
return;
}
}
* in $a->argv[1] and we should have their complete info in $a->profile.
*
*/
- if (!(is_array($a->profile) && count($a->profile))) {
+ if (empty($a->profile['uid'])) {
notice(DI::l10n()->t('Profile unavailable.') . EOL);
return;
}
}
$invalid = Probe::validDfrn($parms);
if ($invalid) {
- notice(L10n::tt("%d required parameter was not found at the given location", "%d required parameters were not found at the given location", $invalid) . EOL);
+ notice(DI::l10n()->tt("%d required parameter was not found at the given location", "%d required parameters were not found at the given location", $invalid) . EOL);
return;
}
exit();
} else {
// Normal web request. Display our user's introduction form.
- if (Config::get('system', 'block_public') && !Session::isAuthenticated()) {
- if (!Config::get('system', 'local_block')) {
+ if (DI::config()->get('system', 'block_public') && !Session::isAuthenticated()) {
+ if (!DI::config()->get('system', 'local_block')) {
notice(DI::l10n()->t('Public access denied.') . EOL);
return;
}