]> git.mxchange.org Git - friendica.git/blobdiff - mod/common.php
forgotten templates
[friendica.git] / mod / common.php
index 94c8847713db952d83b706fbead4796abe25d2db..74b4dec7c6e8253bd11e2dbae7cb6e1a3c9f780a 100644 (file)
@@ -4,10 +4,9 @@
  */
 use Friendica\App;
 use Friendica\Database\DBM;
-use Friendica\Model\GlobalContact;
-use Friendica\Object\Contact;
+use Friendica\Model\Contact;
+use Friendica\Model\GContact;
 
-require_once 'include/Contact.php';
 require_once 'include/contact_selectors.php';
 require_once 'mod/contacts.php';
 
@@ -40,7 +39,7 @@ function common_content(App $a) {
                );
                /// @TODO Handle $c with DBM::is_result()
                $a->page['aside'] = "";
-               profile_load($a, "", 0, get_contact_details_by_url($c[0]["url"]));
+               profile_load($a, "", 0, Contact::getDetailsByURL($c[0]["url"]));
        } else {
                $c = q("SELECT `name`, `url`, `photo` FROM `contact` WHERE `self` = 1 AND `uid` = %d LIMIT 1",
                        intval($uid)
@@ -86,9 +85,9 @@ function common_content(App $a) {
        }
 
        if ($cid) {
-               $t = GlobalContact::countCommonFriends($uid, $cid);
+               $t = GContact::countCommonFriends($uid, $cid);
        } else {
-               $t = GlobalContact::countCommonFriendsZcid($uid, $zcid);
+               $t = GContact::countCommonFriendsZcid($uid, $zcid);
        }
 
        if (count($t)) {
@@ -100,9 +99,9 @@ function common_content(App $a) {
 
 
        if ($cid) {
-               $r = GlobalContact::commonFriends($uid, $cid, $a->pager['start'], $a->pager['itemspage']);
+               $r = GContact::commonFriends($uid, $cid, $a->pager['start'], $a->pager['itemspage']);
        } else {
-               $r = GlobalContact::commonFriendsZcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']);
+               $r = GContact::commonFriendsZcid($uid, $zcid, $a->pager['start'], $a->pager['itemspage']);
        }
 
 
@@ -115,14 +114,14 @@ function common_content(App $a) {
        foreach ($r as $rr) {
 
                //get further details of the contact
-               $contact_details = get_contact_details_by_url($rr['url'], $uid);
+               $contact_details = Contact::getDetailsByURL($rr['url'], $uid);
 
                // $rr['id'] is needed to use contact_photo_menu()
                /// @TODO Adding '/" here avoids E_NOTICE on missing constants
                $rr['id'] = $rr['cid'];
 
                $photo_menu = '';
-               $photo_menu = contact_photo_menu($rr);
+               $photo_menu = Contact::photoMenu($rr);
 
                $entry = array(
                        'url'          => $rr['url'],
@@ -133,7 +132,7 @@ function common_content(App $a) {
                        'details'      => $contact_details['location'],
                        'tags'         => $contact_details['keywords'],
                        'about'        => $contact_details['about'],
-                       'account_type' => account_type($contact_details),
+                       'account_type' => Contact::getAccountType($contact_details),
                        'network'      => network_to_name($contact_details['network'], $contact_details['url']),
                        'photo_menu'   => $photo_menu,
                        'id'           => ++$id,