- public function store($uid, $cid, $rid, $filename, $album, $scale,
- $profile = 0, $allow_cid = '', $allow_gid = '', $deny_cid = '', $deny_gid = '') {
+ public function store($uid, $cid, $rid, $filename, $album, $scale, $profile = 0, $allow_cid = '', $allow_gid = '', $deny_cid = '', $deny_gid = '') {
$r = q("INSERT INTO `photo`
( `uid`, `contact-id`, `resource-id`, `created`, `edited`, `filename`, `album`, `height`, `width`, `data`, `scale`, `profile`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid` )
dbesc(datetime_convert()),
dbesc(basename($filename)),
dbesc($album),
- intval($this->height),
- intval($this->width),
- dbesc($this->imageString()),
+ intval($this->height),
+ intval($this->width),
+ dbesc($this->imageString()),
intval($scale),
intval($profile),
dbesc($allow_cid),
if($r === false)
$photo_failure = true;
+ $img->scaleImage(48);
+
+ $r = $img->store($uid, $cid, $hash, $filename, t('Contact Photos'), 6 );
+
+ if($r === false)
+ $photo_failure = true;
+
+
+
$photo = $a->get_baseurl() . '/photo/' . $hash . '-4.jpg';
$thumb = $a->get_baseurl() . '/photo/' . $hash . '-5.jpg';
+ $micro = $a->get_baseurl() . '/photo/' . $hash . '-6.jpg';
}
else
$photo_failure = true;
if($photo_failure) {
$photo = $a->get_baseurl() . '/images/default-profile.jpg';
$thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg';
+ $micro = $a->get_baseurl() . '/images/default-profile-mm.jpg';
}
- return(array($photo,$thumb));
+ return(array($photo,$thumb,$micro));
}