Review and Use statements

use statements and review changes.
This commit is contained in:
Adam Magness 2017-11-29 17:29:11 -05:00
parent eb148cad55
commit 0373056448
15 changed files with 83 additions and 247 deletions

View file

@ -203,7 +203,7 @@ class OStatus
if (!empty($author["author-avatar"]) && ($author["author-avatar"] != $current['avatar'])) {
logger("Update profile picture for contact ".$contact["id"], LOGGER_DEBUG);
Photo::updateContactAvatar($author["author-avatar"], $importer["uid"], $contact["id"]);
Contact::updateAvatar($author["author-avatar"], $importer["uid"], $contact["id"]);
}
// Ensure that we are having this contact (with uid=0)
@ -223,7 +223,7 @@ class OStatus
dba::update('contact', $fields, array('id' => $cid), $old_contact);
// Update the avatar
Photo::updateContactAvatar($author["author-avatar"], 0, $cid);
Contact::updateAvatar($author["author-avatar"], 0, $cid);
}
$contact["generation"] = 2;
@ -1326,7 +1326,7 @@ class OStatus
switch ($siteinfo["type"]) {
case 'photo':
$imgdata = Photo::getPhotoInfo($siteinfo["image"]);
$imgdata = Photo::getInfoFromURL($siteinfo["image"]);
$attributes = array("rel" => "enclosure",
"href" => $siteinfo["image"],
"type" => $imgdata["mime"],
@ -1346,7 +1346,7 @@ class OStatus
}
if (!Config::get('system', 'ostatus_not_attach_preview') && ($siteinfo["type"] != "photo") && isset($siteinfo["image"])) {
$imgdata = Photo::getPhotoInfo($siteinfo["image"]);
$imgdata = Photo::getInfoFromURL($siteinfo["image"]);
$attributes = array("rel" => "enclosure",
"href" => $siteinfo["image"],
"type" => $imgdata["mime"],