mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:55:15 +00:00
misc photo issues
This commit is contained in:
parent
e5c2253ec8
commit
e292219db0
8 changed files with 27 additions and 21 deletions
|
@ -230,7 +230,7 @@ class Notifier {
|
|||
self::$packet_type = 'refresh';
|
||||
}
|
||||
elseif($cmd === 'purge') {
|
||||
$xchan = argv(3);
|
||||
$xchan = $argv[3];
|
||||
logger('notifier: purge: ' . $item_id . ' => ' . $xchan);
|
||||
if (! $xchan) {
|
||||
return;
|
||||
|
|
|
@ -179,18 +179,17 @@ logger('gis: ' . print_r($gis,true));
|
|||
$p['imgscale'] = 7;
|
||||
$p['photo_usage'] = PHOTO_COVER;
|
||||
|
||||
$r1 = $im->save($p);
|
||||
|
||||
$r1 = $im->storeThumbnail($p, PHOTO_RES_COVER_1200);
|
||||
|
||||
$im->doScaleImage(850,310);
|
||||
$p['imgscale'] = 8;
|
||||
|
||||
$r2 = $im->save($p);
|
||||
|
||||
|
||||
$r2 = $im->storeThumbnail($p, PHOTO_RES_COVER_850);
|
||||
|
||||
$im->doScaleImage(425,160);
|
||||
$p['imgscale'] = 9;
|
||||
|
||||
$r3 = $im->save($p);
|
||||
$r3 = $im->storeThumbnail($p, PHOTO_RES_COVER_425);
|
||||
|
||||
if($r1 === false || $r2 === false || $r3 === false) {
|
||||
// if one failed, delete them all so we can start over.
|
||||
|
|
|
@ -126,17 +126,17 @@ class Profile_photo extends Controller {
|
|||
$p['imgscale'] = PHOTO_RES_PROFILE_300;
|
||||
$p['photo_usage'] = (($is_default_profile) ? PHOTO_PROFILE : PHOTO_NORMAL);
|
||||
|
||||
$r1 = $im->save($p);
|
||||
$r1 = $im->storeThumbnail($p, PHOTO_RES_PROFILE_300);
|
||||
|
||||
$im->scaleImage(80);
|
||||
$p['imgscale'] = PHOTO_RES_PROFILE_80;
|
||||
|
||||
$r2 = $im->save($p);
|
||||
$r2 = $im->storeThumbnail($p, PHOTO_RES_PROFILE_80);
|
||||
|
||||
$im->scaleImage(48);
|
||||
$p['imgscale'] = PHOTO_RES_PROFILE_48;
|
||||
|
||||
$r3 = $im->save($p);
|
||||
$r3 = $im->storeThumbnail($p, PHOTO_RES_PROFILE_48);
|
||||
|
||||
if($r1 === false || $r2 === false || $r3 === false) {
|
||||
// if one failed, delete them all so we can start over.
|
||||
|
|
|
@ -24,7 +24,11 @@ class Removeaccount extends \Zotlabs\Web\Controller {
|
|||
|
||||
$account = \App::get_account();
|
||||
$account_id = get_account_id();
|
||||
|
||||
|
||||
if (! $account_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
$x = account_verify_password($account['account_email'],$_POST['qxz_password']);
|
||||
if(! ($x && $x['account']))
|
||||
return;
|
||||
|
|
|
@ -76,8 +76,8 @@ class Zot6Handler implements IHandler {
|
|||
}
|
||||
}
|
||||
else {
|
||||
// system wide refresh
|
||||
|
||||
// system wide refresh
|
||||
$x = Libzot::refresh( [ 'hubloc_id_url' => $hub['hubloc_id_url'] ], null, (($msgtype === 'force_refresh') ? true : false));
|
||||
}
|
||||
|
||||
|
@ -153,6 +153,10 @@ class Zot6Handler implements IHandler {
|
|||
|
||||
$ret = array('success' => false);
|
||||
|
||||
if (! $sender) {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
if ($recipients) {
|
||||
// basically this means "unfriend"
|
||||
foreach ($recipients as $recip) {
|
||||
|
@ -185,9 +189,4 @@ class Zot6Handler implements IHandler {
|
|||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2145,7 +2145,7 @@ function channel_remove($channel_id, $local = true, $unset_session = false) {
|
|||
dbesc($channel['channel_hash'])
|
||||
);
|
||||
|
||||
Master::Summon(array('Notifier','purge_all',$channel_id));
|
||||
Master::Summon( [ 'Notifier', 'purge_all', $channel_id ] );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -277,6 +277,10 @@ function remove_all_xchan_resources($xchan, $channel_id = 0) {
|
|||
}
|
||||
else {
|
||||
|
||||
if (! $xchan) {
|
||||
return;
|
||||
}
|
||||
|
||||
$dirmode = intval(get_config('system','directory_mode'));
|
||||
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@ function photo_upload($channel, $observer, $args) {
|
|||
$ph->scaleImage(1024);
|
||||
|
||||
$p['imgscale'] = 1;
|
||||
$r1 = $ph->save($p);
|
||||
$r1 = $ph->storeThumbnail($p, PHOTO_RES_1024);
|
||||
$url[1] = [
|
||||
'type' => 'Link',
|
||||
'mediaType' => $type,
|
||||
|
@ -305,7 +305,7 @@ function photo_upload($channel, $observer, $args) {
|
|||
$ph->scaleImage(640);
|
||||
|
||||
$p['imgscale'] = 2;
|
||||
$r2 = $ph->save($p);
|
||||
$r2 = $ph->storeThumbnail($p, PHOTO_RES_640);
|
||||
$url[2] = [
|
||||
'type' => 'Link',
|
||||
'mediaType' => $type,
|
||||
|
@ -320,7 +320,7 @@ function photo_upload($channel, $observer, $args) {
|
|||
$ph->scaleImage(320);
|
||||
|
||||
$p['imgscale'] = 3;
|
||||
$r3 = $ph->save($p);
|
||||
$r3 = $ph->storeThumbnail($p, PHOTO_RES_320);
|
||||
$url[3] = [
|
||||
'type' => 'Link',
|
||||
'mediaType' => $type,
|
||||
|
|
Loading…
Reference in a new issue