sforkowany z mirror/friendica
Rename Model\GlobalContact to Model\GContact
rodzic
3772cf7544
commit
bc58e8d3be
|
@ -7,7 +7,7 @@ use Friendica\Content\Feature;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
|
|
||||||
require_once "include/contact_selectors.php";
|
require_once "include/contact_selectors.php";
|
||||||
require_once "include/contact_widgets.php";
|
require_once "include/contact_widgets.php";
|
||||||
|
@ -774,7 +774,7 @@ function navbar_complete(App $a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($localsearch) {
|
if ($localsearch) {
|
||||||
$x = GlobalContact::searchByName($search, $mode);
|
$x = GContact::searchByName($search, $mode);
|
||||||
return $x;
|
return $x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use Friendica\Core\System;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
|
|
||||||
require_once 'include/contact_selectors.php';
|
require_once 'include/contact_selectors.php';
|
||||||
|
|
||||||
|
@ -250,18 +250,18 @@ function common_friends_visitor_widget($profile_uid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cid) {
|
if ($cid) {
|
||||||
$t = GlobalContact::countCommonFriends($profile_uid, $cid);
|
$t = GContact::countCommonFriends($profile_uid, $cid);
|
||||||
} else {
|
} else {
|
||||||
$t = GlobalContact::countCommonFriendsZcid($profile_uid, $zcid);
|
$t = GContact::countCommonFriendsZcid($profile_uid, $zcid);
|
||||||
}
|
}
|
||||||
if (! $t) {
|
if (! $t) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cid) {
|
if ($cid) {
|
||||||
$r = GlobalContact::commonFriends($profile_uid, $cid, 0, 5, true);
|
$r = GContact::commonFriends($profile_uid, $cid, 0, 5, true);
|
||||||
} else {
|
} else {
|
||||||
$r = GlobalContact::commonFriendsZcid($profile_uid, $zcid, 0, 5, true);
|
$r = GContact::commonFriendsZcid($profile_uid, $zcid, 0, 5, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return replace_macros(get_markup_template('remote_friends_common.tpl'), array(
|
return replace_macros(get_markup_template('remote_friends_common.tpl'), array(
|
||||||
|
|
|
@ -11,7 +11,7 @@ use Friendica\Core\Worker;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Object\Image;
|
use Friendica\Object\Image;
|
||||||
use Friendica\Protocol\DFRN;
|
use Friendica\Protocol\DFRN;
|
||||||
use Friendica\Protocol\OStatus;
|
use Friendica\Protocol\OStatus;
|
||||||
|
@ -742,10 +742,10 @@ function item_store($arr, $force_parent = false, $notify = false, $dontcache = f
|
||||||
* On comments the author is the better choice.
|
* On comments the author is the better choice.
|
||||||
*/
|
*/
|
||||||
if ($arr['parent-uri'] === $arr['uri']) {
|
if ($arr['parent-uri'] === $arr['uri']) {
|
||||||
$arr["gcontact-id"] = GlobalContact::getId(array("url" => $arr['owner-link'], "network" => $arr['network'],
|
$arr["gcontact-id"] = GContact::getId(array("url" => $arr['owner-link'], "network" => $arr['network'],
|
||||||
"photo" => $arr['owner-avatar'], "name" => $arr['owner-name']));
|
"photo" => $arr['owner-avatar'], "name" => $arr['owner-name']));
|
||||||
} else {
|
} else {
|
||||||
$arr["gcontact-id"] = GlobalContact::getId(array("url" => $arr['author-link'], "network" => $arr['network'],
|
$arr["gcontact-id"] = GContact::getId(array("url" => $arr['author-link'], "network" => $arr['network'],
|
||||||
"photo" => $arr['author-avatar'], "name" => $arr['author-name']));
|
"photo" => $arr['author-avatar'], "name" => $arr['author-name']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Calls the post update functions
|
* @brief Calls the post update functions
|
||||||
|
@ -74,7 +74,7 @@ function post_update_1192() {
|
||||||
|
|
||||||
// Set the "gcontact-id" in the item table and add a new gcontact entry if needed
|
// Set the "gcontact-id" in the item table and add a new gcontact entry if needed
|
||||||
foreach ($item_arr AS $item) {
|
foreach ($item_arr AS $item) {
|
||||||
$gcontact_id = GlobalContact::getId(array("url" => $item['author-link'], "network" => $item['network'],
|
$gcontact_id = GContact::getId(array("url" => $item['author-link'], "network" => $item['network'],
|
||||||
"photo" => $item['author-avatar'], "name" => $item['author-name']));
|
"photo" => $item['author-avatar'], "name" => $item['author-name']));
|
||||||
q("UPDATE `item` SET `gcontact-id` = %d WHERE `uid` = %d AND `author-link` = '%s' AND `gcontact-id` = 0",
|
q("UPDATE `item` SET `gcontact-id` = %d WHERE `uid` = %d AND `author-link` = '%s' AND `gcontact-id` = 0",
|
||||||
intval($gcontact_id), intval($item["uid"]), dbesc($item["author-link"]));
|
intval($gcontact_id), intval($item["uid"]), dbesc($item["author-link"]));
|
||||||
|
|
|
@ -6,7 +6,7 @@ use Friendica\App;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
|
|
||||||
require_once 'include/contact_selectors.php';
|
require_once 'include/contact_selectors.php';
|
||||||
require_once 'mod/contacts.php';
|
require_once 'mod/contacts.php';
|
||||||
|
@ -41,12 +41,12 @@ function allfriends_content(App $a) {
|
||||||
$a->page['aside'] = "";
|
$a->page['aside'] = "";
|
||||||
profile_load($a, "", 0, Contact::getDetailsByURL($c[0]["url"]));
|
profile_load($a, "", 0, Contact::getDetailsByURL($c[0]["url"]));
|
||||||
|
|
||||||
$total = GlobalContact::countAllFriends(local_user(), $cid);
|
$total = GContact::countAllFriends(local_user(), $cid);
|
||||||
|
|
||||||
if(count($total))
|
if(count($total))
|
||||||
$a->set_pager_total($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)) {
|
if (! DBM::is_result($r)) {
|
||||||
$o .= t('No friends to display.');
|
$o .= t('No friends to display.');
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
|
|
||||||
require_once 'include/contact_selectors.php';
|
require_once 'include/contact_selectors.php';
|
||||||
require_once 'mod/contacts.php';
|
require_once 'mod/contacts.php';
|
||||||
|
@ -85,9 +85,9 @@ function common_content(App $a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cid) {
|
if ($cid) {
|
||||||
$t = GlobalContact::countCommonFriends($uid, $cid);
|
$t = GContact::countCommonFriends($uid, $cid);
|
||||||
} else {
|
} else {
|
||||||
$t = GlobalContact::countCommonFriendsZcid($uid, $zcid);
|
$t = GContact::countCommonFriendsZcid($uid, $zcid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($t)) {
|
if (count($t)) {
|
||||||
|
@ -99,9 +99,9 @@ function common_content(App $a) {
|
||||||
|
|
||||||
|
|
||||||
if ($cid) {
|
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 {
|
} 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\Core\Worker;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
|
|
||||||
require_once 'include/contact_selectors.php';
|
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);
|
Contact::updateAvatar($data['photo'], local_user(), $contact_id, true);
|
||||||
|
|
||||||
// Update the entry in the gcontact table
|
// Update the entry in the gcontact table
|
||||||
GlobalContact::updateFromProbe($data["url"]);
|
GContact::updateFromProbe($data["url"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function _contact_block($contact_id, $orig_record) {
|
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
|
// 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)
|
if ($x)
|
||||||
$tabs[] = array('label'=>t('Contacts'),
|
$tabs[] = array('label'=>t('Contacts'),
|
||||||
'url' => "allfriends/".$contact_id,
|
'url' => "allfriends/".$contact_id,
|
||||||
|
@ -897,7 +897,7 @@ function contacts_tab($a, $contact_id, $active_tab) {
|
||||||
'accesskey' => 't');
|
'accesskey' => 't');
|
||||||
|
|
||||||
// Show this tab only if there is visible common friend list
|
// 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)
|
if ($common)
|
||||||
$tabs[] = array('label'=>t('Common Friends'),
|
$tabs[] = array('label'=>t('Common Friends'),
|
||||||
'url' => "common/loc/".local_user()."/".$contact_id,
|
'url' => "common/loc/".local_user()."/".$contact_id,
|
||||||
|
|
|
@ -7,7 +7,7 @@ use Friendica\Core\Config;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
use Friendica\Protocol\PortableContact;
|
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
|
// 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)) {
|
if (($contact["cid"] == 0) && ($contact["zid"] == 0) && ($contact["gid"] == 0)) {
|
||||||
GlobalContact::update($user_data);
|
GContact::update($user_data);
|
||||||
}
|
}
|
||||||
} elseif ($local) {
|
} elseif ($local) {
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
use Friendica\App;
|
use Friendica\App;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
|
|
||||||
function hovercard_init(App $a) {
|
function hovercard_init(App $a) {
|
||||||
// Just for testing purposes
|
// Just for testing purposes
|
||||||
|
@ -47,7 +47,7 @@ function hovercard_content() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// if it's the url containing https it should be converted to http
|
// 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) {
|
if($nurl) {
|
||||||
// Search for contact data
|
// Search for contact data
|
||||||
$contact = Contact::getDetailsByURL($nurl);
|
$contact = Contact::getDetailsByURL($nurl);
|
||||||
|
|
|
@ -23,7 +23,7 @@ use Friendica\Core\System;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
use Friendica\Protocol\Diaspora;
|
use Friendica\Protocol\Diaspora;
|
||||||
use Friendica\Protocol\Email;
|
use Friendica\Protocol\Email;
|
||||||
|
@ -743,7 +743,7 @@ function item_post(App $a) {
|
||||||
$datarray['postopts'] = $postopts;
|
$datarray['postopts'] = $postopts;
|
||||||
$datarray['origin'] = $origin;
|
$datarray['origin'] = $origin;
|
||||||
$datarray['moderated'] = $allow_moderated;
|
$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']));
|
"photo" => $datarray['author-avatar'], "name" => $datarray['author-name']));
|
||||||
$datarray['object'] = $object;
|
$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)) {
|
if (!DBM::is_result($r)) {
|
||||||
$probed = Probe::uri($name);
|
$probed = Probe::uri($name);
|
||||||
if ($result['network'] != NETWORK_PHANTOM) {
|
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",
|
$r = q("SELECT `url`, `name`, `nick`, `network`, `alias`, `notify` FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
|
||||||
dbesc(normalise_link($probed["url"])));
|
dbesc(normalise_link($probed["url"])));
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
|
|
||||||
|
@ -509,7 +509,7 @@ function profiles_post(App $a) {
|
||||||
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
|
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
|
||||||
|
|
||||||
// Update the global contact for the 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\App;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
|
|
||||||
function randprof_init(App $a) {
|
function randprof_init(App $a) {
|
||||||
$x = GlobalContact::getRandomUrl();
|
$x = GContact::getRandomUrl();
|
||||||
|
|
||||||
if ($x) {
|
if ($x) {
|
||||||
goaway(zrl($x));
|
goaway(zrl($x));
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Friendica\Core\Worker;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Model\User;
|
use Friendica\Model\User;
|
||||||
use Friendica\Protocol\Email;
|
use Friendica\Protocol\Email;
|
||||||
|
|
||||||
|
@ -650,7 +650,7 @@ function settings_post(App $a) {
|
||||||
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
|
Worker::add(PRIORITY_LOW, 'ProfileUpdate', local_user());
|
||||||
|
|
||||||
// Update the global contact for the user
|
// Update the global contact for the user
|
||||||
GlobalContact::updateForUser(local_user());
|
GContact::updateForUser(local_user());
|
||||||
|
|
||||||
//$_SESSION['theme'] = $theme;
|
//$_SESSION['theme'] = $theme;
|
||||||
if ($email_changed && $a->config['register_policy'] == REGISTER_VERIFY) {
|
if ($email_changed && $a->config['register_policy'] == REGISTER_VERIFY) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ use Friendica\App;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
|
|
||||||
require_once 'include/contact_widgets.php';
|
require_once 'include/contact_widgets.php';
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ function suggest_content(App $a) {
|
||||||
$a->page['aside'] .= follow_widget();
|
$a->page['aside'] .= follow_widget();
|
||||||
|
|
||||||
|
|
||||||
$r = GlobalContact::suggestionQuery(local_user());
|
$r = GContact::suggestionQuery(local_user());
|
||||||
|
|
||||||
if (! DBM::is_result($r)) {
|
if (! DBM::is_result($r)) {
|
||||||
$o .= t('No suggestions available. If this is a new site, please try again in 24 hours.');
|
$o .= t('No suggestions available. If this is a new site, please try again in 24 hours.');
|
||||||
|
|
|
@ -23,7 +23,7 @@ require_once 'include/html2bbcode.php';
|
||||||
/**
|
/**
|
||||||
* @brief This class handles GlobalContact related functions
|
* @brief This class handles GlobalContact related functions
|
||||||
*/
|
*/
|
||||||
class GlobalContact
|
class GContact
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @brief Search global contact table by nick or name
|
* @brief Search global contact table by nick or name
|
|
@ -14,7 +14,7 @@ use Friendica\Core\System;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
use Friendica\Object\Image;
|
use Friendica\Object\Image;
|
||||||
use Friendica\Protocol\OStatus;
|
use Friendica\Protocol\OStatus;
|
||||||
|
@ -1678,9 +1678,9 @@ class DFRN
|
||||||
$poco["photo"] = $author["avatar"];
|
$poco["photo"] = $author["avatar"];
|
||||||
$poco["hide"] = $hide;
|
$poco["hide"] = $hide;
|
||||||
$poco["contact-type"] = $contact["contact-type"];
|
$poco["contact-type"] = $contact["contact-type"];
|
||||||
$gcid = GlobalContact::update($poco);
|
$gcid = GContact::update($poco);
|
||||||
|
|
||||||
GlobalContact::link($gcid, $importer["uid"], $contact["id"]);
|
GContact::link($gcid, $importer["uid"], $contact["id"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return($author);
|
return($author);
|
||||||
|
|
|
@ -17,7 +17,7 @@ use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
use Friendica\Util\XML;
|
use Friendica\Util\XML;
|
||||||
|
@ -2247,9 +2247,9 @@ class Diaspora
|
||||||
"addr" => $author, "nick" => $nick, "keywords" => $keywords,
|
"addr" => $author, "nick" => $nick, "keywords" => $keywords,
|
||||||
"hide" => !$searchable, "nsfw" => $nsfw);
|
"hide" => !$searchable, "nsfw" => $nsfw);
|
||||||
|
|
||||||
$gcid = GlobalContact::update($gcontact);
|
$gcid = GContact::update($gcontact);
|
||||||
|
|
||||||
GlobalContact::link($gcid, $importer["uid"], $contact["id"]);
|
GContact::link($gcid, $importer["uid"], $contact["id"]);
|
||||||
|
|
||||||
logger("Profile of contact ".$contact["id"]." stored for user ".$importer["uid"], LOGGER_DEBUG);
|
logger("Profile of contact ".$contact["id"]." stored for user ".$importer["uid"], LOGGER_DEBUG);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ use Friendica\Core\Config;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
use Friendica\Object\Image;
|
use Friendica\Object\Image;
|
||||||
use Friendica\Util\Lock;
|
use Friendica\Util\Lock;
|
||||||
|
@ -226,9 +226,9 @@ class OStatus
|
||||||
$contact["generation"] = 2;
|
$contact["generation"] = 2;
|
||||||
$contact["hide"] = false; // OStatus contacts are never hidden
|
$contact["hide"] = false; // OStatus contacts are never hidden
|
||||||
$contact["photo"] = $author["author-avatar"];
|
$contact["photo"] = $author["author-avatar"];
|
||||||
$gcid = GlobalContact::update($contact);
|
$gcid = GContact::update($contact);
|
||||||
|
|
||||||
GlobalContact::link($gcid, $contact["uid"], $contact["id"]);
|
GContact::link($gcid, $contact["uid"], $contact["id"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $author;
|
return $author;
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace Friendica\Protocol;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
use dba;
|
use dba;
|
||||||
|
@ -192,10 +192,10 @@ class PortableContact
|
||||||
"generation" => $generation);
|
"generation" => $generation);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$gcontact = GlobalContact::sanitize($gcontact);
|
$gcontact = GContact::sanitize($gcontact);
|
||||||
$gcid = GlobalContact::update($gcontact);
|
$gcid = GContact::update($gcontact);
|
||||||
|
|
||||||
GlobalContact::link($gcid, $uid, $cid, $zcid);
|
GContact::link($gcid, $uid, $cid, $zcid);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
logger($e->getMessage(), LOGGER_DEBUG);
|
logger($e->getMessage(), LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
|
@ -424,7 +424,7 @@ class PortableContact
|
||||||
|
|
||||||
$contact = array_merge($contact, $noscrape);
|
$contact = array_merge($contact, $noscrape);
|
||||||
|
|
||||||
GlobalContact::update($contact);
|
GContact::update($contact);
|
||||||
|
|
||||||
if (trim($noscrape["updated"]) != "") {
|
if (trim($noscrape["updated"]) != "") {
|
||||||
q(
|
q(
|
||||||
|
@ -446,7 +446,7 @@ class PortableContact
|
||||||
if (!$force && !self::updateNeeded($gcontacts[0]["created"], $gcontacts[0]["updated"], $gcontacts[0]["last_failure"], $gcontacts[0]["last_contact"])) {
|
if (!$force && !self::updateNeeded($gcontacts[0]["created"], $gcontacts[0]["updated"], $gcontacts[0]["last_failure"], $gcontacts[0]["last_contact"])) {
|
||||||
logger("Profile ".$profile." was last updated at ".$gcontacts[0]["updated"]." (cached)", LOGGER_DEBUG);
|
logger("Profile ".$profile." was last updated at ".$gcontacts[0]["updated"]." (cached)", LOGGER_DEBUG);
|
||||||
|
|
||||||
GlobalContact::update($contact);
|
GContact::update($contact);
|
||||||
return $gcontacts[0]["updated"];
|
return $gcontacts[0]["updated"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,8 +467,8 @@ class PortableContact
|
||||||
$gcontact["server_url"] = $data["baseurl"];
|
$gcontact["server_url"] = $data["baseurl"];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$gcontact = GlobalContact::sanitize($gcontact);
|
$gcontact = GContact::sanitize($gcontact);
|
||||||
GlobalContact::update($gcontact);
|
GContact::update($gcontact);
|
||||||
|
|
||||||
self::lastUpdated($data["url"], $force);
|
self::lastUpdated($data["url"], $force);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
@ -494,7 +494,7 @@ class PortableContact
|
||||||
|
|
||||||
$contact["server_url"] = $data["baseurl"];
|
$contact["server_url"] = $data["baseurl"];
|
||||||
|
|
||||||
GlobalContact::update($contact);
|
GContact::update($contact);
|
||||||
|
|
||||||
$feedret = z_fetch_url($data["poll"]);
|
$feedret = z_fetch_url($data["poll"]);
|
||||||
|
|
||||||
|
@ -1600,8 +1600,8 @@ class PortableContact
|
||||||
"generation" => $generation);
|
"generation" => $generation);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$gcontact = GlobalContact::sanitize($gcontact);
|
$gcontact = GContact::sanitize($gcontact);
|
||||||
GlobalContact::update($gcontact);
|
GContact::update($gcontact);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
logger($e->getMessage(), LOGGER_DEBUG);
|
logger($e->getMessage(), LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ use Friendica\Core\Cache;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Contact;
|
use Friendica\Model\Contact;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
use Friendica\Protocol\PortableContact;
|
use Friendica\Protocol\PortableContact;
|
||||||
use dba;
|
use dba;
|
||||||
|
@ -280,7 +280,7 @@ class CronJobs
|
||||||
$r = q("SELECT `uid` FROM `user` WHERE `verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired`");
|
$r = q("SELECT `uid` FROM `user` WHERE `verified` AND NOT `blocked` AND NOT `account_removed` AND NOT `account_expired`");
|
||||||
if (DBM::is_result($r)) {
|
if (DBM::is_result($r)) {
|
||||||
foreach ($r AS $user) {
|
foreach ($r AS $user) {
|
||||||
GlobalContact::updateForUser($user["uid"]);
|
GContact::updateForUser($user["uid"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Friendica\Core\Cache;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
use Friendica\Protocol\PortableContact;
|
use Friendica\Protocol\PortableContact;
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ class DiscoverPoCo {
|
||||||
}
|
}
|
||||||
logger($result, LOGGER_DEBUG);
|
logger($result, LOGGER_DEBUG);
|
||||||
} elseif ($mode == 3) {
|
} elseif ($mode == 3) {
|
||||||
GlobalContact::updateSuggestions();
|
GContact::updateSuggestions();
|
||||||
} elseif (($mode == 2) && Config::get('system', 'poco_completion')) {
|
} elseif (($mode == 2) && Config::get('system', 'poco_completion')) {
|
||||||
self::discoverUsers();
|
self::discoverUsers();
|
||||||
} elseif (($mode == 1) && ($search != "") && Config::get('system', 'poco_local_search')) {
|
} elseif (($mode == 1) && ($search != "") && Config::get('system', 'poco_local_search')) {
|
||||||
|
@ -102,7 +102,7 @@ class DiscoverPoCo {
|
||||||
|
|
||||||
// Query GNU Social servers for their users ("statistics" addon has to be enabled on the GS server)
|
// Query GNU Social servers for their users ("statistics" addon has to be enabled on the GS server)
|
||||||
if (!Config::get('system', 'ostatus_disabled')) {
|
if (!Config::get('system', 'ostatus_disabled')) {
|
||||||
GlobalContact::discoverGsUsers();
|
GContact::discoverGsUsers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ class DiscoverPoCo {
|
||||||
|
|
||||||
$data["server_url"] = $data["baseurl"];
|
$data["server_url"] = $data["baseurl"];
|
||||||
|
|
||||||
GlobalContact::update($data);
|
GContact::update($data);
|
||||||
} else {
|
} else {
|
||||||
logger("Profile ".$jj->url." is not responding or no Friendica contact - but network ".$data["network"], LOGGER_DEBUG);
|
logger("Profile ".$jj->url." is not responding or no Friendica contact - but network ".$data["network"], LOGGER_DEBUG);
|
||||||
}
|
}
|
||||||
|
@ -297,7 +297,7 @@ class DiscoverPoCo {
|
||||||
$contact = Probe::uri($user->site_address."/".$user->name);
|
$contact = Probe::uri($user->site_address."/".$user->name);
|
||||||
if ($contact["network"] != NETWORK_PHANTOM) {
|
if ($contact["network"] != NETWORK_PHANTOM) {
|
||||||
$contact["about"] = $user->description;
|
$contact["about"] = $user->description;
|
||||||
GlobalContact::update($contact);
|
GContact::update($contact);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace Friendica\Worker;
|
||||||
use Friendica\Core\Cache;
|
use Friendica\Core\Cache;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
use Friendica\Protocol\PortableContact;
|
use Friendica\Protocol\PortableContact;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class GProbe {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!in_array($arr["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) {
|
if (!in_array($arr["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) {
|
||||||
GlobalContact::update($arr);
|
GContact::update($arr);
|
||||||
}
|
}
|
||||||
|
|
||||||
$r = q(
|
$r = q(
|
||||||
|
|
|
@ -15,7 +15,7 @@ use Friendica\Core\Config;
|
||||||
use Friendica\Core\PConfig;
|
use Friendica\Core\PConfig;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\GlobalContact;
|
use Friendica\Model\GContact;
|
||||||
|
|
||||||
require_once "include/plugin.php";
|
require_once "include/plugin.php";
|
||||||
require_once "mod/proxy.php";
|
require_once "mod/proxy.php";
|
||||||
|
@ -139,7 +139,7 @@ function vier_community_info() {
|
||||||
|
|
||||||
// comunity_profiles
|
// comunity_profiles
|
||||||
if ($show_profiles) {
|
if ($show_profiles) {
|
||||||
$r = GlobalContact::suggestionQuery(local_user(), 0, 9);
|
$r = GContact::suggestionQuery(local_user(), 0, 9);
|
||||||
|
|
||||||
$tpl = get_markup_template('ch_directory_item.tpl');
|
$tpl = get_markup_template('ch_directory_item.tpl');
|
||||||
if (DBM::is_result($r)) {
|
if (DBM::is_result($r)) {
|
||||||
|
|
Ładowanie…
Reference in New Issue