]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Contact.php
Improved definition style
[friendica.git] / src / Module / Contact.php
index d087634e48732a76366ac8a4b02b5dddf90df1d1..84420afaad9129476e6fe27831e4a0ff76932421 100644 (file)
@@ -1,4 +1,23 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @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/>.
+ *
+ */
 
 namespace Friendica\Module;
 
@@ -374,7 +393,7 @@ class Contact extends BaseModule
 
                        if ($cmd === 'updateprofile' && ($orig_record['uid'] != 0)) {
                                self::updateContactFromProbe($contact_id);
-                               DI::baseUrl()->redirect('crepair/' . $contact_id);
+                               DI::baseUrl()->redirect('contact/' . $contact_id . '/advanced/');
                                // NOTREACHED
                        }
 
@@ -494,7 +513,7 @@ class Contact extends BaseModule
                                $relation_text = '';
                        }
 
-                       if (!in_array($contact['network'], Protocol::FEDERATED)) {
+                       if (!in_array($contact['network'], array_merge(Protocol::FEDERATED, [Protocol::TWITTER]))) {
                                $relation_text = '';
                        }
 
@@ -571,7 +590,6 @@ class Contact extends BaseModule
                                '$visit'          => DI::l10n()->t('Visit %s\'s profile [%s]', $contact['name'], $contact['url']),
                                '$blockunblock'   => DI::l10n()->t('Block/Unblock contact'),
                                '$ignorecont'     => DI::l10n()->t('Ignore contact'),
-                               '$lblcrepair'     => DI::l10n()->t('Repair URL settings'),
                                '$lblrecent'      => DI::l10n()->t('View conversations'),
                                '$lblsuggest'     => $lblsuggest,
                                '$nettype'        => $nettype,
@@ -713,7 +731,7 @@ class Contact extends BaseModule
                }
                DBA::close($stmt);
 
-               $pager = new Pager(DI::args()->getQueryString());
+               $pager = new Pager(DI::l10n(), DI::args()->getQueryString());
 
                $sql_values[] = $pager->getStart();
                $sql_values[] = $pager->getItemsPerPage();
@@ -910,7 +928,7 @@ class Contact extends BaseModule
 
                if (!empty($contact['uid'])) {
                        $tabs[] = ['label' => DI::l10n()->t('Advanced'),
-                               'url'   => 'crepair/' . $contact['id'],
+                               'url'   => 'contact/' . $contact['id'] . '/advanced/',
                                'sel'   => (($active_tab == 6) ? 'active' : ''),
                                'title' => DI::l10n()->t('Advanced Contact Settings'),
                                'id'    => 'advanced-tab',
@@ -957,7 +975,7 @@ class Contact extends BaseModule
 
                        $profiledata = Model\Contact::getDetailsByURL($contact['url']);
 
-                       Model\Profile::load($a, '', 0, $profiledata, true);
+                       Model\Profile::load($a, '', $profiledata, true);
                        $o .= Model\Contact::getPostsFromUrl($contact['url'], true, $update);
                }
 
@@ -979,7 +997,7 @@ class Contact extends BaseModule
                                $profiledata['remoteconnect'] = DI::baseUrl() . '/follow?url=' . urlencode($profiledata['url']);
                        }
 
-                       Model\Profile::load($a, '', 0, $profiledata, true);
+                       Model\Profile::load($a, '', $profiledata, true);
                        $o .= Model\Contact::getPostsFromUrl($contact['url']);
                }