Add permission check before using importexport for export

This commit is contained in:
Nathan Gray 2011-02-28 17:35:18 +00:00
parent 36ac740a5c
commit 2e5144b5a2

View File

@ -479,7 +479,7 @@ class nextmatch_widget
$name = is_object($extension_data['template']) ? $extension_data['template']->name : $extension_data['template']; $name = is_object($extension_data['template']) ? $extension_data['template']->name : $extension_data['template'];
list($app) = explode('.',$name); list($app) = explode('.',$name);
$key = $extension_data['csv_fields'] === true ? 'nextmatch-export-definition' : $extension_data['csv_fields']; $key = $extension_data['csv_fields'] === true ? 'nextmatch-export-definition' : $extension_data['csv_fields'];
if($GLOBALS['egw_info']['user']['preferences'][$app][$key]) { if($GLOBALS['egw_info']['user']['apps']['importexport'] && $GLOBALS['egw_info']['user']['preferences'][$app][$key]) {
$nextmatch->set_cell_attribute('export', 'onclick', $nextmatch->set_cell_attribute('export', 'onclick',
"egw_openWindowCentered2('". egw::link('/index.php', array( "egw_openWindowCentered2('". egw::link('/index.php', array(
'menuaction' => 'importexport.importexport_export_ui.export_dialog', 'menuaction' => 'importexport.importexport_export_ui.export_dialog',