- $profilephotos = Photo::selectToArray(['resource-id' , 'scale'], ['profile' => true, 'uid' => $uid], ['order' => ['scale']]);
+ $profilephotos = Photo::selectToArray(['resource-id', 'scale', 'type'], ['profile' => true, 'uid' => $uid], ['order' => ['scale']]);
$doc = new DOMDocument('1.0', 'utf-8');
$doc->formatOutput = true;
$doc = new DOMDocument('1.0', 'utf-8');
$doc->formatOutput = true;
if ($item['private'] == Item::PRIVATE) {
$body = Item::fixPrivatePhotos($body, $owner['uid'], $item, $cid);
if ($item['private'] == Item::PRIVATE) {
$body = Item::fixPrivatePhotos($body, $owner['uid'], $item, $cid);
if (empty($curl_stat) || empty($xml)) {
Logger::notice('Empty answer from ' . $contact['id'] . ' - ' . $dest_url);
return -9; // timed out
if (empty($curl_stat) || empty($xml)) {
Logger::notice('Empty answer from ' . $contact['id'] . ' - ' . $dest_url);
return -9; // timed out
if (!empty($res->message)) {
Logger::info('Transmit to ' . $dest_url . ' returned status '.$res->status.' - '.$res->message);
}
if (!empty($res->message)) {
Logger::info('Transmit to ' . $dest_url . ' returned status '.$res->status.' - '.$res->message);
}
$url = $xpath->evaluate('string(dfrn:url[1]/text())', $suggestion);
$cid = Contact::getIdForURL($url);
$url = $xpath->evaluate('string(dfrn:url[1]/text())', $suggestion);
$cid = Contact::getIdForURL($url);
*/
private static function processRelocation(DOMXPath $xpath, DOMNode $relocation, array $importer): bool
{
*/
private static function processRelocation(DOMXPath $xpath, DOMNode $relocation, array $importer): bool
{
// Big question: Do we need these functions? They were part of the "consume_feed" function.
// This function once was responsible for DFRN and OStatus.
if ($activity->match($item['verb'], Activity::FOLLOW)) {
// Big question: Do we need these functions? They were part of the "consume_feed" function.
// This function once was responsible for DFRN and OStatus.
if ($activity->match($item['verb'], Activity::FOLLOW)) {
Contact::addRelationship($importer, $contact, $item);
return false;
}
if ($activity->match($item['verb'], Activity::UNFOLLOW)) {
Contact::addRelationship($importer, $contact, $item);
return false;
}
if ($activity->match($item['verb'], Activity::UNFOLLOW)) {
Contact::removeFollower($contact);
return false;
}
if ($activity->match($item['verb'], Activity::REQ_FRIEND)) {
Contact::removeFollower($contact);
return false;
}
if ($activity->match($item['verb'], Activity::REQ_FRIEND)) {
Contact::addRelationship($importer, $contact, $item, true);
return false;
}
if ($activity->match($item['verb'], Activity::UNFRIEND)) {
Contact::addRelationship($importer, $contact, $item, true);
return false;
}
if ($activity->match($item['verb'], Activity::UNFRIEND)) {
* @return boolean Is the message wanted?
*/
private static function isSolicitedMessage(array $item, array $importer): bool
* @return boolean Is the message wanted?
*/
private static function isSolicitedMessage(array $item, array $importer): bool
*/
private static function processEntry(array $header, DOMXPath $xpath, DOMNode $entry, array $importer, string $xml, int $protocol)
{
*/
private static function processEntry(array $header, DOMXPath $xpath, DOMNode $entry, array $importer, string $xml, int $protocol)
{
// This is my contact on another system, but it's really me.
// Turn this into a wall post.
$notify = Item::isRemoteSelf($importer, $item);
// This is my contact on another system, but it's really me.
// Turn this into a wall post.
$notify = Item::isRemoteSelf($importer, $item);
self::processDeletion($xpath, $deletion, $importer);
}
if (count($deletions) > 0) {
self::processDeletion($xpath, $deletion, $importer);
}
if (count($deletions) > 0) {