Add 'No definition' option for default export definition preference. Allows use of legacy nextmatch CSV export with Import/Export app still available

This commit is contained in:
Nathan Gray 2011-11-18 16:01:57 +00:00
parent 38f282bccf
commit 1afba81ce8
6 changed files with 16 additions and 6 deletions

View File

@ -284,7 +284,9 @@ class addressbook_hooks
'type' => 'export',
'application' => 'addressbook'
));
$options = array();
$options = array(
'~nextmatch~' => lang('No definition')
);
$default_def = 'export-addressbook';
foreach ((array)$definitions->get_definitions() as $identifier)
{

View File

@ -622,7 +622,9 @@ class calendar_hooks
'type' => 'export',
'application' => 'calendar'
));
$options = array();
$options = array(
'~nextmatch~' => lang('No definition')
);
foreach ((array)$definitions->get_definitions() as $identifier)
{
try

View File

@ -497,7 +497,7 @@ class nextmatch_widget
$name = is_object($extension_data['template']) ? $extension_data['template']->name : $extension_data['template'];
list($app) = explode('.',$name);
$definition = $GLOBALS['egw_info']['user']['preferences'][$app]['nextmatch-export-definition'];
if(!$value['no_csv_export'] && ($definition || !is_array($value['csv_fields'])))
if(!$value['no_csv_export'] && $definition != '~nextmatch~' && ($definition || !is_array($value['csv_fields'])))
{
if($GLOBALS['egw_info']['user']['apps']['importexport'] && ($definition || $value['csv_fields']) && is_object($nextmatch))
{

View File

@ -410,7 +410,9 @@ class infolog_hooks
'type' => 'export',
'application' => 'infolog'
));
$options = array();
$options = array(
'~nextmatch~' => lang('No definition')
);
foreach ((array)$definitions->get_definitions() as $identifier)
{
try

View File

@ -189,7 +189,9 @@ class resources_hooks
'type' => 'export',
'application' => 'resources'
));
$options = array();
$options = array(
'~nextmatch~' => lang('No definition')
);
$default_def = 'export-resources';
foreach ((array)$definitions->get_definitions() as $identifier)
{

View File

@ -203,7 +203,9 @@ class timesheet_hooks
'type' => 'export',
'application' => 'timesheet'
));
$options = array();
$options = array(
'~nextmatch~' => lang('No definition')
);
foreach ((array)$definitions->get_definitions() as $identifier)
{
try