mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 10:51:38 +01:00
- Fix could not edit / delete special shedules with special characters
- Fix schedule definition was sometimes not set
This commit is contained in:
parent
4fca95b797
commit
d54714afdf
@ -173,24 +173,6 @@ class importexport_export_ui {
|
||||
$content['plugin_options_template'] = $options;
|
||||
}
|
||||
}
|
||||
$content['filter'] = $definition->filter;
|
||||
$content['filter']['fields'] = importexport_helper_functions::get_filter_fields($_appname, $selected_plugin);
|
||||
if(!$content['filter']['fields'])
|
||||
{
|
||||
$this->js->set_onload("\$j('input[value=\"filter\"]').parent().hide();");
|
||||
$content['no_filter'] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Process relative dates into the current absolute date
|
||||
foreach($content['filter']['fields'] as $field => $settings)
|
||||
{
|
||||
if($content['filter'][$field] && strpos($settings['type'],'date') === 0)
|
||||
{
|
||||
$content['filter'][$field] = importexport_helper_functions::date_rel2abs($content['filter'][$field]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// fill selection tab
|
||||
@ -209,7 +191,7 @@ class importexport_export_ui {
|
||||
} else {
|
||||
$options = $plugin_object->get_selectors_etpl($definition);
|
||||
if(is_array($options)) {
|
||||
$content['selection'] = $options['content'];
|
||||
$content += is_array($options['content']) ? $options['content'] : array('selection' => $options['content']);
|
||||
$sel_options += (array)$options['sel_options'];
|
||||
$readonlys['selection'] = (array)$options['readonlys'];
|
||||
$preserv['selection'] = (array)$options['preserv'];
|
||||
|
@ -35,7 +35,7 @@
|
||||
foreach($content['scheduled'] as $row)
|
||||
{
|
||||
if($row['delete']) {
|
||||
$key = key($row['delete']);
|
||||
$key = urldecode(key($row['delete']));
|
||||
ExecMethod('phpgwapi.asyncservice.cancel_timer', $key);
|
||||
}
|
||||
}
|
||||
@ -67,7 +67,7 @@
|
||||
$async['data']['record_count'] = lang('%1 records processed', $async['data']['record_count']);
|
||||
}
|
||||
$data['scheduled'][] = array_merge($async['data'], array(
|
||||
'id' => $id,
|
||||
'id' => urlencode($id),
|
||||
'next' => egw_time::server2user($async['next']),
|
||||
'times' => str_replace("\n", '', print_r($async['times'], true)),
|
||||
'last_run' => $async['data']['last_run'] ? egw_time::server2user($async['data']['last_run']) : ''
|
||||
@ -83,7 +83,7 @@
|
||||
}
|
||||
|
||||
public function edit($content = array()) {
|
||||
$id = $_GET['id'] ? $_GET['id'] : $content['id'];
|
||||
$id = $_GET['id'] ? urldecode($_GET['id']) : $content['id'];
|
||||
$definition_id = $_GET['definition'];
|
||||
|
||||
unset($content['id']);
|
||||
@ -258,6 +258,8 @@
|
||||
} else {
|
||||
$response->addScript("xajax_doXMLHTTP('importexport.importexport_schedule_ui.ajax_get_definitions', '$appname', document.getElementById('exec[plugin]').value);");
|
||||
}
|
||||
// Trigger chosen
|
||||
$response->addScript("\$j(document.getElementById('exec[plugin]')).trigger('liszt:updated');");
|
||||
|
||||
return $response->getXML();
|
||||
}
|
||||
@ -284,6 +286,8 @@
|
||||
} else {
|
||||
$response->addScript("document.getElementById('exec[definition]').value = ''");
|
||||
}
|
||||
// Trigger chosen
|
||||
$response->addScript("\$j(document.getElementById('exec[definition]')).trigger('liszt:updated');");
|
||||
return $response->getXML();
|
||||
}
|
||||
|
||||
@ -483,6 +487,10 @@
|
||||
// Update filter to use current absolute dates
|
||||
$definition->filter = $filters;
|
||||
}
|
||||
if(!is_array($definition->plugin_options))
|
||||
{
|
||||
$definition->plugin_options = array();
|
||||
}
|
||||
$definition->plugin_options = array_merge($definition->plugin_options, $selection);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user