aboutsummaryrefslogtreecommitdiffstats
path: root/include/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-23 03:25:40 -0800
committerfriendica <info@friendica.com>2015-01-23 03:25:40 -0800
commitc49c96962fdcdb69a06d4f7e641d6ab9768b7ca4 (patch)
tree051f4f7b0b77f25a540c5df6c6cdfa313634f862 /include/photos.php
parent0cdcc4bc500c082c7d87096cc6be9dfe7c5db2f5 (diff)
downloadvolse-hubzilla-c49c96962fdcdb69a06d4f7e641d6ab9768b7ca4.tar.gz
volse-hubzilla-c49c96962fdcdb69a06d4f7e641d6ab9768b7ca4.tar.bz2
volse-hubzilla-c49c96962fdcdb69a06d4f7e641d6ab9768b7ca4.zip
provide pref to set default photo resolution for posts to something other than 2. The only acceptable option is 1. (640)
Diffstat (limited to 'include/photos.php')
-rw-r--r--include/photos.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/photos.php b/include/photos.php
index 2393153c6..2e5e22968 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -256,6 +256,15 @@ function photo_upload($channel, $observer, $args) {
else
$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 . ']'
. $tag . z_root() . "/photo/{$photo_hash}-{$smallest}.".$ph->getExt() . '[/zmg]'
. '[/zrl]';