Bugfix: The "keywords" field in the gcontact table wasn't set correctly
This commit is contained in:
parent
255638ff65
commit
20d7d18379
|
@ -139,15 +139,16 @@ function poco_load($cid,$uid = 0,$zcid = 0,$url = null) {
|
||||||
poco_check($profile_url, $name, $network, $profile_photo, $about, $location, $gender, $keywords, $connect_url, $updated, $generation, $cid, $uid, $zcid);
|
poco_check($profile_url, $name, $network, $profile_photo, $about, $location, $gender, $keywords, $connect_url, $updated, $generation, $cid, $uid, $zcid);
|
||||||
|
|
||||||
// Update the Friendica contacts. Diaspora is doing it via a message. (See include/diaspora.php)
|
// Update the Friendica contacts. Diaspora is doing it via a message. (See include/diaspora.php)
|
||||||
if (($location != "") OR ($about != "") OR ($keywords != "") OR ($gender != ""))
|
// Deactivated because we now update Friendica contacts in dfrn.php
|
||||||
q("UPDATE `contact` SET `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s'
|
//if (($location != "") OR ($about != "") OR ($keywords != "") OR ($gender != ""))
|
||||||
WHERE `nurl` = '%s' AND NOT `self` AND `network` = '%s'",
|
// q("UPDATE `contact` SET `location` = '%s', `about` = '%s', `keywords` = '%s', `gender` = '%s'
|
||||||
dbesc($location),
|
// WHERE `nurl` = '%s' AND NOT `self` AND `network` = '%s'",
|
||||||
dbesc($about),
|
// dbesc($location),
|
||||||
dbesc($keywords),
|
// dbesc($about),
|
||||||
dbesc($gender),
|
// dbesc($keywords),
|
||||||
dbesc(normalise_link($profile_url)),
|
// dbesc($gender),
|
||||||
dbesc(NETWORK_DFRN));
|
// dbesc(normalise_link($profile_url)),
|
||||||
|
// dbesc(NETWORK_DFRN));
|
||||||
}
|
}
|
||||||
logger("poco_load: loaded $total entries",LOGGER_DEBUG);
|
logger("poco_load: loaded $total entries",LOGGER_DEBUG);
|
||||||
|
|
||||||
|
@ -1554,7 +1555,7 @@ function update_gcontact($contact) {
|
||||||
|
|
||||||
if ($update) {
|
if ($update) {
|
||||||
q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s',
|
q("UPDATE `gcontact` SET `photo` = '%s', `name` = '%s', `nick` = '%s', `addr` = '%s', `network` = '%s',
|
||||||
`birthday` = '%s', `gender` = '%s', `keywords` = %d, `hide` = %d, `nsfw` = %d,
|
`birthday` = '%s', `gender` = '%s', `keywords` = '%s', `hide` = %d, `nsfw` = %d,
|
||||||
`alias` = '%s', `notify` = '%s', `url` = '%s',
|
`alias` = '%s', `notify` = '%s', `url` = '%s',
|
||||||
`location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s',
|
`location` = '%s', `about` = '%s', `generation` = %d, `updated` = '%s',
|
||||||
`server_url` = '%s', `connect` = '%s'
|
`server_url` = '%s', `connect` = '%s'
|
||||||
|
|
|
@ -122,8 +122,8 @@ function pubsub_post(&$a) {
|
||||||
|
|
||||||
$importer = $r[0];
|
$importer = $r[0];
|
||||||
|
|
||||||
$r = q("SELECT * FROM `contact` WHERE `subhub` = 1 AND `id` = %d AND `uid` = %d
|
$r = q("SELECT * FROM `contact` WHERE `subhub` AND `id` = %d AND `uid` = %d
|
||||||
AND ( `rel` = %d OR `rel` = %d OR network = '%s' ) AND `blocked` = 0 AND `readonly` = 0 LIMIT 1",
|
AND (`rel` = %d OR `rel` = %d OR network = '%s') AND NOT `blocked` LIMIT 1",
|
||||||
intval($contact_id),
|
intval($contact_id),
|
||||||
intval($importer['uid']),
|
intval($importer['uid']),
|
||||||
intval(CONTACT_IS_SHARING),
|
intval(CONTACT_IS_SHARING),
|
||||||
|
|
Loading…
Reference in a new issue