provide pref to set default photo resolution for posts to something other than 2. The only acceptable option is 1. (640)

This commit is contained in:
friendica 2015-01-23 03:25:40 -08:00
parent 0cdcc4bc50
commit c49c96962f

View File

@ -256,6 +256,15 @@ function photo_upload($channel, $observer, $args) {
else else
$tag = '[zmg]'; $tag = '[zmg]';
$preferred = intval(get_pconfig($channel['channel_id'],'system','post_photores'));
if($preferred == 1) {
$tag = '[zmg]';
if($r2)
$smallest = 1;
else
$smallest = 0;
}
$arr['body'] = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']' $arr['body'] = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo_hash . ']'
. $tag . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]' . $tag . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]'
. '[/zrl]'; . '[/zrl]';