only try instanciating get_rows object, it a non-empty name given, else we get an error-message in the editor

This commit is contained in:
Ralf Becker 2005-03-05 09:25:17 +00:00
parent 0a104f1063
commit b3249095a3

View File

@ -147,7 +147,10 @@
return True; return True;
} }
list($app,$class,$method) = explode('.',$value['get_rows']); list($app,$class,$method) = explode('.',$value['get_rows']);
$obj = CreateObject($app.'.'.$class); if ($app && $class)
{
$obj =& CreateObject($app.'.'.$class);
}
if (!is_object($obj) || !method_exists($obj,$method)) if (!is_object($obj) || !method_exists($obj,$method))
{ {
$GLOBALS['phpgw_info']['etemplate']['validation_errors'][$name] = "nextmatch_widget::pre_process($cell[name]): '$value[get_rows]' is no valid method !!!"; $GLOBALS['phpgw_info']['etemplate']['validation_errors'][$name] = "nextmatch_widget::pre_process($cell[name]): '$value[get_rows]' is no valid method !!!";