1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-21 05:02:02 +02:00

adminUI: Fixes #1686 - 'max' option added to writeParms when type=images. Default value is 5. thumbUrl() empty image prevention.

This commit is contained in:
Cameron 2016-10-17 16:22:24 -07:00
parent e878170e09
commit 48ee57d71f
2 changed files with 4 additions and 3 deletions

View File

@ -2336,7 +2336,7 @@ class e_parse extends e_parser
/**
* Generate an auto-sized Image URL.
* @param $url - path to image or leave blank for a placeholder. eg. {e_MEDIA}folder/my-image.jpg
* @param $url - path to image or leave blank for a placeholder. eg. {e_MEDIA}folder/my-image.jpg
* @param array $options - width and height, but leaving this empty and using $this->thumbWidth() and $this->thumbHeight() is preferred. ie. {SETWIDTH: w=x&y=x}
* @param int $options ['w'] width (optional)
* @param int $options ['h'] height (optional)
@ -2385,7 +2385,7 @@ class e_parse extends e_parser
// e107::getDebug()->log("Thumb: ".basename($url). print_a($options,true), E107_DBG_BASIC);
if(!empty($options))
if(!empty($options) && (isset($options['w']) || isset($options['aw']) || isset($options['h'])))
{
$options['w'] = varset($options['w']);
$options['h'] = varset($options['h']);

View File

@ -4948,8 +4948,9 @@ class e_form
// return print_a($value, true);
$ret = "";
$label = varset($parms['label'], 'LAN_EDIT');
$max = varset($parms['max'],5);
for ($i=0; $i < 5; $i++)
for ($i=0; $i < $max; $i++)
{
$k = $key.'['.$i.'][path]';
$ival = $value[$i]['path'];