mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +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:
@@ -2336,7 +2336,7 @@ class e_parse extends e_parser
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate an auto-sized Image URL.
|
* 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 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 ['w'] width (optional)
|
||||||
* @param int $options ['h'] height (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);
|
// 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['w'] = varset($options['w']);
|
||||||
$options['h'] = varset($options['h']);
|
$options['h'] = varset($options['h']);
|
||||||
|
@@ -4948,8 +4948,9 @@ class e_form
|
|||||||
// return print_a($value, true);
|
// return print_a($value, true);
|
||||||
$ret = "";
|
$ret = "";
|
||||||
$label = varset($parms['label'], 'LAN_EDIT');
|
$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]';
|
$k = $key.'['.$i.'][path]';
|
||||||
$ival = $value[$i]['path'];
|
$ival = $value[$i]['path'];
|
||||||
|
Reference in New Issue
Block a user