diff --git a/tine20/Timetracker/Setup/DemoData.php b/tine20/Timetracker/Setup/DemoData.php index 4c8ac2b842a..7a9d3633189 100644 --- a/tine20/Timetracker/Setup/DemoData.php +++ b/tine20/Timetracker/Setup/DemoData.php @@ -149,10 +149,11 @@ public static function hasBeenRun() $c = Timetracker_Controller_Timeaccount::getInstance(); $f = new Timetracker_Model_TimeaccountFilter(array( - array('field' => 'description', 'operator' => 'equals', 'value' => 'Created By Tine 2.0 DemoData'), + array('field' => 'description', 'operator' => 'contains', 'value' => 'tine DEMO DATA'), ), 'AND'); + $count = $c->search($f)->count(); - return ($c->search($f)->count() > 9) ? true : false; + return ($count > 9); } /** @@ -244,7 +245,7 @@ protected function _createSharedTimeaccounts() 'status' => 'billed', 'cleared_at' => $this->_clearedDate, 'budget' => NULL, - 'description' => 'Created By Tine 2.0 DEMO DATA' + 'description' => 'Created By tine DEMO DATA' )); if (($costcenter->name == 'Marketing') || ($costcenter->name == $developmentString)) { diff --git a/tine20/Tinebase/Frontend/Cli/Abstract.php b/tine20/Tinebase/Frontend/Cli/Abstract.php index 38940f3bdf4..0308c031bf4 100644 --- a/tine20/Tinebase/Frontend/Cli/Abstract.php +++ b/tine20/Tinebase/Frontend/Cli/Abstract.php @@ -370,9 +370,8 @@ protected function _createImportDemoData() ] : []; $importer = new Tinebase_Setup_DemoData_Import($model, $options); try { - echo 'Importing Demo Data for ' . $model . "\n"; $importer->importDemodata(); - echo 'Csv Demo Data was created successfully' . "\n"; + echo 'Imported CSV Demo Data for ' . $model . "\n"; } catch (Tinebase_Exception_NotFound $tenf) { // model has no import files }