]> git.mxchange.org Git - friendica.git/blobdiff - mod/repair_ostatus.php
Merge remote-tracking branch 'upstream/develop' into user-contact
[friendica.git] / mod / repair_ostatus.php
index b4c6a9cbd636ea1fe29ebeec157669ae6494876a..bc6b177f9528b8a896ca320dbcd435ec50b11067 100644 (file)
@@ -1,6 +1,22 @@
 <?php
 /**
- * @file mod/repair_ostatus.php
+ * @copyright Copyright (C) 2010-2021, the Friendica project
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
  */
 
 use Friendica\App;
@@ -12,7 +28,7 @@ use Friendica\Model\Contact;
 function repair_ostatus_content(App $a) {
 
        if (! local_user()) {
-               notice(DI::l10n()->t('Permission denied.') . EOL);
+               notice(DI::l10n()->t('Permission denied.'));
                DI::baseUrl()->redirect('ostatus_repair');
                // NOTREACHED
        }
@@ -54,7 +70,7 @@ function repair_ostatus_content(App $a) {
 
        $o .= "<p>".DI::l10n()->t("Keep this window open until done.")."</p>";
 
-       Contact::createFromProbe($uid, $r[0]["url"], true);
+       Contact::createFromProbeForUser($a->getLoggedInUserId(), $r[0]["url"]);
 
        DI::page()['htmlhead'] = '<meta http-equiv="refresh" content="1; URL=' . DI::baseUrl() . '/repair_ostatus?counter='.$counter.'">';