aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-03 16:26:58 -0700
committerfriendica <info@friendica.com>2012-07-03 16:26:58 -0700
commitb550b1326b9e45c1938b738407c6b32cbace09cb (patch)
treee9f9fdf8ef08941fd5ad5b7473687b663f65c3a9
parent7926a0d171e1e84dcc551f67ef0d8f7bfac4a19f (diff)
parente3828fe6756c9bc15ecc386e182553bf8920c521 (diff)
downloadvolse-hubzilla-b550b1326b9e45c1938b738407c6b32cbace09cb.tar.gz
volse-hubzilla-b550b1326b9e45c1938b738407c6b32cbace09cb.tar.bz2
volse-hubzilla-b550b1326b9e45c1938b738407c6b32cbace09cb.zip
Merge https://github.com/friendica/friendica into pull
-rw-r--r--boot.php18
-rw-r--r--mod/photos.php6
-rw-r--r--view/theme/diabook/diabook-aerith/style.css2
-rw-r--r--view/theme/diabook/diabook-blue/style.css2
-rw-r--r--view/theme/diabook/diabook-dark/style.css2
-rw-r--r--view/theme/diabook/diabook-green/style.css2
-rw-r--r--view/theme/diabook/diabook-pink/style.css2
-rw-r--r--view/theme/diabook/diabook-red/style.css2
-rw-r--r--view/theme/diabook/style.css2
9 files changed, 31 insertions, 7 deletions
diff --git a/boot.php b/boot.php
index 8b1f5a2e5..6b79274d4 100644
--- a/boot.php
+++ b/boot.php
@@ -34,6 +34,24 @@ define ( 'JPEG_QUALITY', 100 );
*/
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
diff --git a/mod/photos.php b/mod/photos.php
index ea4d7f81f..624f0bdca 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -743,6 +743,12 @@ function photos_post(&$a) {
$ph->orient($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();
$height = $ph->getHeight();
diff --git a/view/theme/diabook/diabook-aerith/style.css b/view/theme/diabook/diabook-aerith/style.css
index 6b772edf2..630b331e9 100644
--- a/view/theme/diabook/diabook-aerith/style.css
+++ b/view/theme/diabook/diabook-aerith/style.css
@@ -2885,7 +2885,7 @@ section .directory-item dd {
height: 175px;
}
-.directory-photo-wrapper {
+section .directory-photo-wrapper {
float: left;
height: 200px;
width: 165px;
diff --git a/view/theme/diabook/diabook-blue/style.css b/view/theme/diabook/diabook-blue/style.css
index b1de26608..952f90775 100644
--- a/view/theme/diabook/diabook-blue/style.css
+++ b/view/theme/diabook/diabook-blue/style.css
@@ -2843,7 +2843,7 @@ section .directory-item dd {
height: 175px;
}
-.directory-photo-wrapper {
+section .directory-photo-wrapper {
float: left;
height: 200px;
width: 165px;
diff --git a/view/theme/diabook/diabook-dark/style.css b/view/theme/diabook/diabook-dark/style.css
index 844ed369e..5ef9398ec 100644
--- a/view/theme/diabook/diabook-dark/style.css
+++ b/view/theme/diabook/diabook-dark/style.css
@@ -2857,7 +2857,7 @@ section .directory-item dd {
height: 175px;
}
-.directory-photo-wrapper {
+section .directory-photo-wrapper {
float: left;
height: 200px;
width: 165px;
diff --git a/view/theme/diabook/diabook-green/style.css b/view/theme/diabook/diabook-green/style.css
index 111c31cfe..e1993764e 100644
--- a/view/theme/diabook/diabook-green/style.css
+++ b/view/theme/diabook/diabook-green/style.css
@@ -2872,7 +2872,7 @@ section .directory-item dd {
height: 175px;
}
-.directory-photo-wrapper {
+section .directory-photo-wrapper {
float: left;
height: 200px;
width: 165px;
diff --git a/view/theme/diabook/diabook-pink/style.css b/view/theme/diabook/diabook-pink/style.css
index b0b768df2..e9bcd53d0 100644
--- a/view/theme/diabook/diabook-pink/style.css
+++ b/view/theme/diabook/diabook-pink/style.css
@@ -2872,7 +2872,7 @@ section .directory-item dd {
height: 175px;
}
-.directory-photo-wrapper {
+section .directory-photo-wrapper {
float: left;
height: 200px;
width: 165px;
diff --git a/view/theme/diabook/diabook-red/style.css b/view/theme/diabook/diabook-red/style.css
index 16b42d0e1..72592168b 100644
--- a/view/theme/diabook/diabook-red/style.css
+++ b/view/theme/diabook/diabook-red/style.css
@@ -2870,7 +2870,7 @@ section .directory-item dd {
height: 175px;
}
-.directory-photo-wrapper {
+section .directory-photo-wrapper {
float: left;
height: 200px;
width: 165px;
diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css
index 049fb7ba4..68bfd5d3a 100644
--- a/view/theme/diabook/style.css
+++ b/view/theme/diabook/style.css
@@ -2808,7 +2808,7 @@ section .directory-item dd {
width: 175px;
height: 175px;
}
-.directory-photo-wrapper {
+section .directory-photo-wrapper {
float: left;
height: 200px;
width: 165px;