Remove references to deprecated profile.is-default and profile.profile-name fields

This commit is contained in:
Hypolite Petovan 2020-01-22 19:34:15 -05:00
parent d9f7556b4a
commit 18cfd8dfaa
16 changed files with 28 additions and 46 deletions

View file

@ -224,7 +224,7 @@ class Transmitter
}
$fields = ['locality', 'region', 'country-name'];
$profile = DBA::selectFirst('profile', $fields, ['uid' => $uid, 'is-default' => true]);
$profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]);
if (!DBA::isResult($profile)) {
return [];
}

View file

@ -687,7 +687,7 @@ class DFRN
`profile`.`pub_keywords`, `profile`.`xmpp`, `profile`.`dob`
FROM `profile`
INNER JOIN `user` ON `user`.`uid` = `profile`.`uid`
WHERE `profile`.`is-default` AND NOT `user`.`hidewall` AND `user`.`uid` = %d",
WHERE NOT `user`.`hidewall` AND `user`.`uid` = %d",
intval($owner['uid'])
);
if (DBA::isResult($r)) {

View file

@ -4092,7 +4092,7 @@ class Diaspora
FROM `profile`
INNER JOIN `user` ON `profile`.`uid` = `user`.`uid`
INNER JOIN `contact` ON `profile`.`uid` = `contact`.`uid`
WHERE `user`.`uid` = %d AND `profile`.`is-default` AND `contact`.`self` LIMIT 1",
WHERE `user`.`uid` = %d AND `contact`.`self` LIMIT 1",
intval($uid)
);

View file

@ -1428,7 +1428,7 @@ class OStatus
*/
private static function addAuthor(DOMDocument $doc, array $owner, $show_profile = true)
{
$profile = DBA::selectFirst('profile', ['homepage', 'publish'], ['uid' => $owner['uid'], 'is-default' => true]);
$profile = DBA::selectFirst('profile', ['homepage', 'publish'], ['uid' => $owner['uid']]);
$author = $doc->createElement("author");
XML::addElement($doc, $author, "id", $owner["url"]);
if ($owner['account-type'] == User::ACCOUNT_TYPE_COMMUNITY) {