mirror of
https://github.com/friendica/friendica
synced 2025-09-04 15:56:06 +02:00
Rename Model\GlobalContact to Model\GContact
This commit is contained in:
parent
3772cf7544
commit
bc58e8d3be
23 changed files with 71 additions and 71 deletions
|
@ -6,7 +6,7 @@ use Friendica\App;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\GContact;
|
||||
|
||||
require_once 'include/contact_selectors.php';
|
||||
require_once 'mod/contacts.php';
|
||||
|
@ -41,12 +41,12 @@ function allfriends_content(App $a) {
|
|||
$a->page['aside'] = "";
|
||||
profile_load($a, "", 0, Contact::getDetailsByURL($c[0]["url"]));
|
||||
|
||||
$total = GlobalContact::countAllFriends(local_user(), $cid);
|
||||
$total = GContact::countAllFriends(local_user(), $cid);
|
||||
|
||||
if(count($total))
|
||||
$a->set_pager_total($total);
|
||||
|
||||
$r = GlobalContact::allFriends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']);
|
||||
$r = GContact::allFriends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']);
|
||||
|
||||
if (! DBM::is_result($r)) {
|
||||
$o .= t('No friends to display.');
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\GContact;
|
||||
|
||||
require_once 'include/contact_selectors.php';
|
||||
require_once 'mod/contacts.php';
|
||||
|
@ -85,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)) {
|
||||
|
@ -99,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']);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Network\Probe;
|
||||
|
||||
require_once 'include/contact_selectors.php';
|
||||
|
@ -313,7 +313,7 @@ function _contact_update_profile($contact_id) {
|
|||
Contact::updateAvatar($data['photo'], local_user(), $contact_id, true);
|
||||
|
||||
// Update the entry in the gcontact table
|
||||
GlobalContact::updateFromProbe($data["url"]);
|
||||
GContact::updateFromProbe($data["url"]);
|
||||
}
|
||||
|
||||
function _contact_block($contact_id, $orig_record) {
|
||||
|
@ -887,7 +887,7 @@ function contacts_tab($a, $contact_id, $active_tab) {
|
|||
);
|
||||
|
||||
// Show this tab only if there is visible friend list
|
||||
$x = GlobalContact::countAllFriends(local_user(), $contact_id);
|
||||
$x = GContact::countAllFriends(local_user(), $contact_id);
|
||||
if ($x)
|
||||
$tabs[] = array('label'=>t('Contacts'),
|
||||
'url' => "allfriends/".$contact_id,
|
||||
|
@ -897,7 +897,7 @@ function contacts_tab($a, $contact_id, $active_tab) {
|
|||
'accesskey' => 't');
|
||||
|
||||
// Show this tab only if there is visible common friend list
|
||||
$common = GlobalContact::countCommonFriends(local_user(), $contact_id);
|
||||
$common = GContact::countCommonFriends(local_user(), $contact_id);
|
||||
if ($common)
|
||||
$tabs[] = array('label'=>t('Common Friends'),
|
||||
'url' => "common/loc/".local_user()."/".$contact_id,
|
||||
|
|
|
@ -7,7 +7,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Protocol\PortableContact;
|
||||
|
||||
|
@ -82,7 +82,7 @@ function dirfind_content(App $a, $prefix = "") {
|
|||
|
||||
// Add the contact to the global contacts if it isn't already in our system
|
||||
if (($contact["cid"] == 0) && ($contact["zid"] == 0) && ($contact["gid"] == 0)) {
|
||||
GlobalContact::update($user_data);
|
||||
GContact::update($user_data);
|
||||
}
|
||||
} elseif ($local) {
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
use Friendica\App;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\GContact;
|
||||
|
||||
function hovercard_init(App $a) {
|
||||
// Just for testing purposes
|
||||
|
@ -47,7 +47,7 @@ function hovercard_content() {
|
|||
}
|
||||
|
||||
// if it's the url containing https it should be converted to http
|
||||
$nurl = normalise_link(GlobalContact::cleanContactUrl($profileurl));
|
||||
$nurl = normalise_link(GContact::cleanContactUrl($profileurl));
|
||||
if($nurl) {
|
||||
// Search for contact data
|
||||
$contact = Contact::getDetailsByURL($nurl);
|
||||
|
|
|
@ -23,7 +23,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
use Friendica\Protocol\Email;
|
||||
|
@ -743,7 +743,7 @@ function item_post(App $a) {
|
|||
$datarray['postopts'] = $postopts;
|
||||
$datarray['origin'] = $origin;
|
||||
$datarray['moderated'] = $allow_moderated;
|
||||
$datarray['gcontact-id'] = GlobalContact::getId(array("url" => $datarray['author-link'], "network" => $datarray['network'],
|
||||
$datarray['gcontact-id'] = GContact::getId(array("url" => $datarray['author-link'], "network" => $datarray['network'],
|
||||
"photo" => $datarray['author-avatar'], "name" => $datarray['author-name']));
|
||||
$datarray['object'] = $object;
|
||||
|
||||
|
@ -1244,7 +1244,7 @@ function handle_tag(App $a, &$body, &$inform, &$str_tags, $profile_uid, $tag, $n
|
|||
if (!DBM::is_result($r)) {
|
||||
$probed = Probe::uri($name);
|
||||
if ($result['network'] != NETWORK_PHANTOM) {
|
||||
GlobalContact::update($probed);
|
||||
GContact::update($probed);
|
||||
$r = q("SELECT `url`, `name`, `nick`, `network`, `alias`, `notify` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
|
||||
dbesc(normalise_link($probed["url"])));
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ use Friendica\Core\PConfig;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Network\Probe;
|
||||
|
||||
|
@ -509,7 +509,7 @@ function profiles_post(App $a) {
|
|||
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
|
||||
|
||||
// Update the global contact for the user
|
||||
GlobalContact::updateForUser(local_user());
|
||||
GContact::updateForUser(local_user());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\GContact;
|
||||
|
||||
function randprof_init(App $a) {
|
||||
$x = GlobalContact::getRandomUrl();
|
||||
$x = GContact::getRandomUrl();
|
||||
|
||||
if ($x) {
|
||||
goaway(zrl($x));
|
||||
|
|
|
@ -9,7 +9,7 @@ use Friendica\Core\Worker;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Protocol\Email;
|
||||
|
||||
|
@ -650,7 +650,7 @@ function settings_post(App $a) {
|
|||
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
|
||||
|
||||
// Update the global contact for the user
|
||||
GlobalContact::updateForUser(local_user());
|
||||
GContact::updateForUser(local_user());
|
||||
|
||||
//$_SESSION['theme'] = $theme;
|
||||
if ($email_changed && $a->config['register_policy'] == REGISTER_VERIFY) {
|
||||
|
|
|
@ -6,7 +6,7 @@ use Friendica\App;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Model\GContact;
|
||||
|
||||
require_once 'include/contact_widgets.php';
|
||||
|
||||
|
@ -69,7 +69,7 @@ function suggest_content(App $a) {
|
|||
$a->page['aside'] .= follow_widget();
|
||||
|
||||
|
||||
$r = GlobalContact::suggestionQuery(local_user());
|
||||
$r = GContact::suggestionQuery(local_user());
|
||||
|
||||
if (! DBM::is_result($r)) {
|
||||
$o .= t('No suggestions available. If this is a new site, please try again in 24 hours.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue