mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-26 07:49:28 +01:00
* Timesheet: Fix import condition checks
This commit is contained in:
parent
bac1ff5a1d
commit
0eb65b9efe
@ -92,6 +92,7 @@ class timesheet_import_csv extends importexport_basic_import_csv
|
|||||||
{
|
{
|
||||||
// Reset BO data for new record
|
// Reset BO data for new record
|
||||||
$this->bo->data = array();
|
$this->bo->data = array();
|
||||||
|
$_definition = $this->definition;
|
||||||
|
|
||||||
// Automatically handle text Api\Categories without explicit Api\Translation
|
// Automatically handle text Api\Categories without explicit Api\Translation
|
||||||
foreach(array('ts_status','cat_id') as $field)
|
foreach(array('ts_status','cat_id') as $field)
|
||||||
@ -230,9 +231,10 @@ class timesheet_import_csv extends importexport_basic_import_csv
|
|||||||
{
|
{
|
||||||
// exists
|
// exists
|
||||||
case 'exists' :
|
case 'exists' :
|
||||||
if($record->$condition['string'])
|
$key = $condition['string'];
|
||||||
|
if($record->$key)
|
||||||
{
|
{
|
||||||
$results = $this->bo->search(array($condition['string'] => $record->$condition['string']));
|
$results = $this->bo->search(array($condition['string'] => $record->$key));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( is_array( $results ) && count( array_keys( $results )) >= 1 )
|
if ( is_array( $results ) && count( array_keys( $results )) >= 1 )
|
||||||
|
Loading…
Reference in New Issue
Block a user