Function names
Update function names and corresponding function calls
This commit is contained in:
parent
54827e7fed
commit
0091d318e5
23 changed files with 668 additions and 535 deletions
|
@ -881,7 +881,7 @@ class GlobalContact
|
|||
if (DBM::is_result($r)) {
|
||||
logger("Update public contact ".$r[0]["id"], LOGGER_DEBUG);
|
||||
|
||||
update_contact_avatar($contact["photo"], 0, $r[0]["id"]);
|
||||
Photo::updateContactAvatar($contact["photo"], 0, $r[0]["id"]);
|
||||
|
||||
$fields = array('name', 'nick', 'addr',
|
||||
'network', 'bd', 'gender',
|
||||
|
|
|
@ -644,7 +644,7 @@ class Contact extends BaseObject
|
|||
}
|
||||
}
|
||||
|
||||
update_contact_avatar($data["photo"], $uid, $contact_id);
|
||||
Photo::updateContactAvatar($data["photo"], $uid, $contact_id);
|
||||
|
||||
$contact = dba::select('contact', array('url', 'nurl', 'addr', 'alias', 'name', 'nick', 'keywords', 'location', 'about', 'avatar-date'), array('id' => $contact_id), array('limit' => 1));
|
||||
|
||||
|
|
1061
src/Object/Photo.php
1061
src/Object/Photo.php
File diff suppressed because it is too large
Load diff
|
@ -353,7 +353,7 @@ class ParseUrl
|
|||
}
|
||||
|
||||
$src = self::completeUrl($attr["src"], $url);
|
||||
$photodata = get_photo_info($src);
|
||||
$photodata = Photo::getPhotoInfo($src);
|
||||
|
||||
if (($photodata) && ($photodata[0] > 150) && ($photodata[1] > 150)) {
|
||||
if ($photodata[0] > 300) {
|
||||
|
@ -374,7 +374,7 @@ class ParseUrl
|
|||
|
||||
unset($siteinfo["image"]);
|
||||
|
||||
$photodata = get_photo_info($src);
|
||||
$photodata = Photo::getPhotoInfo($src);
|
||||
|
||||
if (($photodata) && ($photodata[0] > 10) && ($photodata[1] > 10)) {
|
||||
$siteinfo["images"][] = array("src" => $src,
|
||||
|
|
|
@ -15,6 +15,7 @@ use Friendica\Core\Worker;
|
|||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\GlobalContact;
|
||||
use Friendica\Object\Contact;
|
||||
use Friendica\Object\Photo;
|
||||
use Friendica\Object\Profile;
|
||||
use Friendica\Protocol\OStatus;
|
||||
use Friendica\Util\XML;
|
||||
|
@ -1659,7 +1660,7 @@ class DFRN
|
|||
);
|
||||
}
|
||||
|
||||
update_contact_avatar(
|
||||
Photo::updateContactAvatar(
|
||||
$author["avatar"],
|
||||
$importer["uid"],
|
||||
$contact["id"],
|
||||
|
@ -2034,7 +2035,7 @@ class DFRN
|
|||
dbesc(normalise_link($old["url"]))
|
||||
);
|
||||
|
||||
update_contact_avatar($relocate["avatar"], $importer["importer_uid"], $importer["id"], true);
|
||||
Photo::updateContactAvatar($relocate["avatar"], $importer["importer_uid"], $importer["id"], true);
|
||||
|
||||
if ($x === false) {
|
||||
return false;
|
||||
|
|
|
@ -2211,7 +2211,7 @@ class Diaspora
|
|||
$image_url = "http://".$handle_parts[1].$image_url;
|
||||
}
|
||||
|
||||
update_contact_avatar($image_url, $importer["uid"], $contact["id"]);
|
||||
Photo::updateContactAvatar($image_url, $importer["uid"], $contact["id"]);
|
||||
|
||||
// Generic birthday. We don't know the timezone. The year is irrelevant.
|
||||
|
||||
|
@ -2471,7 +2471,7 @@ class Diaspora
|
|||
group_add_member($importer["uid"], "", $contact_record["id"], $def_gid);
|
||||
}
|
||||
|
||||
update_contact_avatar($ret["photo"], $importer['uid'], $contact_record["id"], true);
|
||||
Photo::updateContactAvatar($ret["photo"], $importer['uid'], $contact_record["id"], true);
|
||||
|
||||
if ($importer["page-flags"] == PAGE_NORMAL) {
|
||||
logger("Sending intra message for author ".$author.".", LOGGER_DEBUG);
|
||||
|
@ -2494,7 +2494,7 @@ class Diaspora
|
|||
|
||||
logger("Does an automatic friend approval for author ".$author.".", LOGGER_DEBUG);
|
||||
|
||||
update_contact_avatar($contact_record["photo"], $importer["uid"], $contact_record["id"]);
|
||||
Photo::updateContactAvatar($contact_record["photo"], $importer["uid"], $contact_record["id"]);
|
||||
|
||||
// technically they are sharing with us (CONTACT_IS_SHARING),
|
||||
// but if our page-type is PAGE_COMMUNITY or PAGE_SOAPBOX
|
||||
|
|
|
@ -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);
|
||||
update_contact_avatar($author["author-avatar"], $importer["uid"], $contact["id"]);
|
||||
Photo::updateContactAvatar($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
|
||||
update_contact_avatar($author["author-avatar"], 0, $cid);
|
||||
Photo::updateContactAvatar($author["author-avatar"], 0, $cid);
|
||||
}
|
||||
|
||||
$contact["generation"] = 2;
|
||||
|
@ -1326,7 +1326,7 @@ class OStatus
|
|||
|
||||
switch ($siteinfo["type"]) {
|
||||
case 'photo':
|
||||
$imgdata = get_photo_info($siteinfo["image"]);
|
||||
$imgdata = Photo::getPhotoInfo($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 = get_photo_info($siteinfo["image"]);
|
||||
$imgdata = Photo::getPhotoInfo($siteinfo["image"]);
|
||||
$attributes = array("rel" => "enclosure",
|
||||
"href" => $siteinfo["image"],
|
||||
"type" => $imgdata["mime"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue