X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fuimport.php;h=b774d78c6d6e5578060e541833d75e8e09add95d;hb=6bbc0e4c78b638e52291f93179e0e50bb2985287;hp=bd271e91a85c65a4a120ba6a5ccf446610159e41;hpb=6e2c09b1ea6da8f268d336c1dd73590f080e0180;p=friendica.git diff --git a/include/uimport.php b/include/uimport.php index bd271e91a8..b774d78c6d 100644 --- a/include/uimport.php +++ b/include/uimport.php @@ -78,7 +78,7 @@ function import_cleanup($newuid) { q("DELETE FROM `pconfig` WHERE uid = %d", $newuid); } -function import_account(&$a, $file) { +function import_account(App $a, $file) { logger("Start user import from " . $file['tmp_name']); /* STEPS @@ -116,7 +116,7 @@ function import_account(&$a, $file) { notice(t('Error! Cannot check nickname')); return; } - if (count($r) > 0) { + if (dbm::is_result($r) > 0) { notice(sprintf(t("User '%s' already exists on this server!"), $account['user']['nickname'])); return; } @@ -127,13 +127,13 @@ function import_account(&$a, $file) { notice(t('Error! Cannot check nickname')); return; } - if (count($r) > 0) { + if (dbm::is_result($r) > 0) { notice(sprintf(t("User '%s' already exists on this server!"), $account['user']['nickname'])); return; } $oldbaseurl = $account['baseurl']; - $newbaseurl = $a->get_baseurl(); + $newbaseurl = App::get_baseurl(); $olduid = $account['user']['uid']; unset($account['user']['uid']); @@ -287,8 +287,8 @@ function import_account(&$a, $file) { } // send relocate messages - proc_run('php', 'include/notifier.php', 'relocate', $newuid); + proc_run(PRIORITY_HIGH, 'include/notifier.php', 'relocate', $newuid); info(t("Done. You can now login with your username and password")); - goaway($a->get_baseurl() . "/login"); + goaway(App::get_baseurl() . "/login"); }