updates for Photo class moving to Friendica\Object namespace.
use Friendica\Core\Config;
use Friendica\Core\PConfig;
+use Friendica\Object\Photo;
-require_once('mod/share.php');
-require_once('mod/parse_url.php');
-require_once('include/text.php');
+require_once 'mod/share.php';
+require_once 'mod/parse_url.php';
+require_once 'include/text.php';
function fromgplus_install() {
register_hook('connector_settings', 'addon/fromgplus/fromgplus.php', 'fromgplus_addon_settings');
}
if ($cleaned["full"] != "")
- $infoFull = get_photo_info($cleaned["full"]);
+ $infoFull = Photo::getPhotoInfo($cleaned["full"]);
else
$infoFull = array("0" => 0, "1" => 0);
if ($cleaned["preview"] != "")
- $infoPreview = get_photo_info($cleaned["preview"]);
+ $infoPreview = Photo::getPhotoInfo($cleaned["preview"]);
else
$infoFull = array("0" => 0, "1" => 0);
* Version: 0.2
* Author: Michael Vogel <http://pirati.ca/profile/heluecht>
*/
-
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Model\GlobalContact;
use Friendica\Object\Contact;
+use Friendica\Object\Photo;
require 'addon/pumpio/oauth/http.php';
require 'addon/pumpio/oauth/oauth_client.php';
*/
}
- if (function_exists("update_contact_avatar"))
- update_contact_avatar($contact->image->url, $uid, $contact_id);
+ Photo::updateContactAvatar($contact->image->url, $uid, $contact_id);
return($contact_id);
}
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Model\GlobalContact;
+use Friendica\Object\Photo;
class StatusNetOAuth extends TwitterOAuth {
function get_maxlength() {
require_once("Photo.php");
- $photos = import_profile_photo($contact->profile_image_url,$uid,$contact_id);
+ $photos = Photo::importProfilePhoto($contact->profile_image_url,$uid,$contact_id);
q("UPDATE `contact` SET `photo` = '%s',
`thumb` = '%s',
require_once("Photo.php");
- $photos = import_profile_photo($contact->profile_image_url, $uid, $r[0]['id']);
+ $photos = Photo::importProfilePhoto($contact->profile_image_url, $uid, $r[0]['id']);
q("UPDATE `contact` SET `photo` = '%s',
`thumb` = '%s',
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Model\GlobalContact;
+use Friendica\Object\Photo;
require_once 'include/enotify.php';
$new_avatar = str_replace("_normal.", ".", $avatar);
- $info = get_photo_info($new_avatar);
+ $info = Photo::getPhotoInfo($new_avatar);
if (!$info)
$new_avatar = $avatar;
require_once("Photo.php");
- $photos = import_profile_photo($avatar, $uid, $contact_id, true);
+ $photos = Photo::importProfilePhoto($avatar, $uid, $contact_id, true);
if ($photos) {
q("UPDATE `contact` SET `photo` = '%s',
require_once("Photo.php");
- $photos = import_profile_photo($avatar, $uid, $r[0]['id'], true);
+ $photos = Photo::importProfilePhoto($avatar, $uid, $r[0]['id'], true);
if ($photos) {
q("UPDATE `contact` SET `photo` = '%s',