This commit is contained in:
friendica 2012-07-03 16:26:58 -07:00
commit b550b1326b
9 changed files with 31 additions and 7 deletions

View file

@ -34,6 +34,24 @@ define ( 'JPEG_QUALITY', 100 );
*/ */
define ( 'PNG_QUALITY', 8 ); define ( 'PNG_QUALITY', 8 );
/**
*
* An alternate way of limiting picture upload sizes. Specify the maximum pixel
* length that pictures are allowed to be (for non-square pictures, it will apply
* to the longest side). Pictures longer than this length will be resized to be
* this length (on the longest side, the other side will be scaled appropriately).
* Modify this value using
*
* $a->config['system']['max_image_length'] = n;
*
* in .htconfig.php
*
* If you don't want to set a maximum length, set to -1. The default value is
* defined by 'MAX_IMAGE_LENGTH' below.
*
*/
define ( 'MAX_IMAGE_LENGTH', -1 );
/** /**
* Not yet used * Not yet used

View file

@ -743,6 +743,12 @@ function photos_post(&$a) {
$ph->orient($src); $ph->orient($src);
@unlink($src); @unlink($src);
$max_length = get_config('system','max_image_length');
if(! $max_length)
$max_length = MAX_IMAGE_LENGTH;
if($max_length > 0)
$ph->scaleImage($max_length);
$width = $ph->getWidth(); $width = $ph->getWidth();
$height = $ph->getHeight(); $height = $ph->getHeight();

View file

@ -2885,7 +2885,7 @@ section .directory-item dd {
height: 175px; height: 175px;
} }
.directory-photo-wrapper { section .directory-photo-wrapper {
float: left; float: left;
height: 200px; height: 200px;
width: 165px; width: 165px;

View file

@ -2843,7 +2843,7 @@ section .directory-item dd {
height: 175px; height: 175px;
} }
.directory-photo-wrapper { section .directory-photo-wrapper {
float: left; float: left;
height: 200px; height: 200px;
width: 165px; width: 165px;

View file

@ -2857,7 +2857,7 @@ section .directory-item dd {
height: 175px; height: 175px;
} }
.directory-photo-wrapper { section .directory-photo-wrapper {
float: left; float: left;
height: 200px; height: 200px;
width: 165px; width: 165px;

View file

@ -2872,7 +2872,7 @@ section .directory-item dd {
height: 175px; height: 175px;
} }
.directory-photo-wrapper { section .directory-photo-wrapper {
float: left; float: left;
height: 200px; height: 200px;
width: 165px; width: 165px;

View file

@ -2872,7 +2872,7 @@ section .directory-item dd {
height: 175px; height: 175px;
} }
.directory-photo-wrapper { section .directory-photo-wrapper {
float: left; float: left;
height: 200px; height: 200px;
width: 165px; width: 165px;

View file

@ -2870,7 +2870,7 @@ section .directory-item dd {
height: 175px; height: 175px;
} }
.directory-photo-wrapper { section .directory-photo-wrapper {
float: left; float: left;
height: 200px; height: 200px;
width: 165px; width: 165px;

View file

@ -2808,7 +2808,7 @@ section .directory-item dd {
width: 175px; width: 175px;
height: 175px; height: 175px;
} }
.directory-photo-wrapper { section .directory-photo-wrapper {
float: left; float: left;
height: 200px; height: 200px;
width: 165px; width: 165px;