]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_request.php
Force avatar update for Contact Advanced page
[friendica.git] / mod / dfrn_request.php
index 001735ea82cda7473904d9de37ead6a421114254..d8ad2bd3a546ac0a22b7501ff3352084b956cf69 100644 (file)
@@ -13,8 +13,6 @@
  */
 
 use Friendica\App;
-use Friendica\Core\Config;
-use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
@@ -64,8 +62,8 @@ function dfrn_request_init(App $a)
  */
 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;
        }
 
@@ -128,7 +126,7 @@ function dfrn_request_post(App $a)
                                                }
                                                $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;
                                                }
                                        }
@@ -228,7 +226,7 @@ function dfrn_request_post(App $a)
         * 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;
        }
@@ -366,7 +364,7 @@ function dfrn_request_post(App $a)
                                        }
                                        $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;
                                        }
@@ -596,8 +594,8 @@ function dfrn_request_content(App $a)
                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;
                        }