mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 03:13:40 +01:00
fixed not working autorepeat if $row_cont was used
This commit is contained in:
parent
8cfef6746d
commit
ba4bb53c29
@ -7,7 +7,7 @@
|
|||||||
* @subpackage api
|
* @subpackage api
|
||||||
* @link http://www.egroupware.org
|
* @link http://www.egroupware.org
|
||||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||||
* @copyright 2002-13 by RalfBecker@outdoor-training.de
|
* @copyright 2002-14 by RalfBecker@outdoor-training.de
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -991,12 +991,16 @@ class etemplate_widget_box extends etemplate_widget
|
|||||||
{
|
{
|
||||||
$pat = substr($pat,$pat[1] == '{' ? 2 : 1);
|
$pat = substr($pat,$pat[1] == '{' ? 2 : 1);
|
||||||
|
|
||||||
$Ok = $pat[0] == 'r' && !(substr($pat,0,2) == 'r_' || substr($pat,0,4) == 'row_');
|
$Ok = $pat[0] == 'r' && !(substr($pat,0,2) == 'r_' ||
|
||||||
|
substr($pat,0,4) == 'row_' && substr($pat,0,8) != 'row_cont');
|
||||||
|
|
||||||
if ($Ok && ($value = self::get_array(self::$request->content,
|
if ($Ok && ($fname=self::form_name($cname, $check_widget->id, $expand)) &&
|
||||||
$fname=self::form_name($cname, $check_widget->id, $expand))) !== false && isset($value))
|
// need to break if fname ends in [] as get_array() will ignore it and returns whole array
|
||||||
|
// for an id like "run[$row_cont[appname]]"
|
||||||
|
substr($fname, -2) != '[]' &&
|
||||||
|
($value = self::get_array(self::$request->content, $fname)) !== null) // null = not found (can be false!)
|
||||||
{
|
{
|
||||||
error_log(__METHOD__."($widget,$cname) $this autorepeating row $expand[row] because of $check_widget->id = '$fname' is ".array2string($value));
|
//error_log(__METHOD__."($widget,$cname) $this autorepeating row $expand[row] because of $check_widget->id = '$fname' is ".array2string($value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* @subpackage api
|
* @subpackage api
|
||||||
* @link http://www.egroupware.org
|
* @link http://www.egroupware.org
|
||||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
||||||
* @copyright 2002-11 by RalfBecker@outdoor-training.de
|
* @copyright 2002-14 by RalfBecker@outdoor-training.de
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -184,20 +184,26 @@ class etemplate_widget_grid extends etemplate_widget_box
|
|||||||
substr($pat,0,4) == 'col_');
|
substr($pat,0,4) == 'col_');
|
||||||
break;
|
break;
|
||||||
case 'row':
|
case 'row':
|
||||||
$Ok = $pat[0] == 'r' && !(substr($pat,0,2) == 'r_' || substr($pat,0,4) == 'row_');
|
$Ok = $pat[0] == 'r' && !(substr($pat,0,2) == 'r_' ||
|
||||||
|
substr($pat,0,4) == 'row_' && substr($pat,0,8) != 'row_cont');
|
||||||
|
//error_log(__METHOD__."() pat='$pat' --> Ok=".array2string($Ok));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($Ok && ($value = self::get_array(self::$request->content,
|
if ($Ok && ($fname=self::form_name($cname, $child->id, $expand)) &&
|
||||||
$fname=self::form_name($cname, $child->id, $expand))) !== false && isset($value))
|
// need to break if fname ends in [] as get_array() will ignore it and returns whole array
|
||||||
|
// for an id like "run[$row_cont[appname]]"
|
||||||
|
substr($fname, -2) != '[]' &&
|
||||||
|
($value = self::get_array(self::$request->content,$fname)) !== null) // null = not found (can be false!)
|
||||||
{
|
{
|
||||||
//error_log(__METHOD__."('$method_name', ) $this autorepeating row $expand[row] because of $child->id = '$fname' is ".array2string($value));
|
//error_log(__METHOD__."('$cname', ) $this autorepeating row $expand[row] because of $child->id = '$fname' is ".array2string($value));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//error_log(__METHOD__."('$cname', ) $this NOT autorepeating row $expand[row]");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user