* ImportExport/Tracker: timeout left num-rows set to -1, causing nextmatch to try to display full list on next login

This commit is contained in:
Ralf Becker 2012-03-29 10:43:21 +00:00
parent 596a67e285
commit 4d95a9b495
2 changed files with 9 additions and 9 deletions

View File

@ -301,7 +301,7 @@ class nextmatch_widget
$value['options-num_rows'] =& $row_options;
if (!isset($value['num_rows'])) $extension_data['num_rows'] = $value['num_rows'] = $max;
if ($value['num_rows'] != $max)
if ($value['num_rows'] != $max || $value['num_rows'] <= 0) // can be -1 if importexport crashes
{
$GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'] = $max = (int)$value['num_rows'];
}
@ -1431,7 +1431,6 @@ class nextmatch_widget
if($value_in[self::CF_PREFIX.$name]['id'] != '' && $value_in[self::CF_PREFIX.$name]['id'] != $old_id) {
$nm_global['filter'][self::CF_PREFIX.$name] = $value_in[self::CF_PREFIX.$name]['id'];
}
}
elseif ((string)$value_in[self::CF_PREFIX.$name] != (string)$extension_data['old_value'][self::CF_PREFIX.$name])
{

View File

@ -292,12 +292,13 @@ class importexport_definitions_ui
{
//echo __METHOD__."('$action', ".array2string($selected).', '.array2string($use_all).",,, '$session_name')";
if ($use_all)
{
// get the whole selection
$old_query = $query = is_array($session_name) ? $session_name : egw_session::appsession($session_name,'importexport');
{
// get the whole selection
$old_query = $query = is_array($session_name) ? $session_name : egw_session::appsession($session_name,'importexport');
@set_time_limit(0); // switch off the execution time limit, as it's for big selections to small
$query['num_rows'] = -1; // all
@set_time_limit(0); // switch off the execution time limit, as it's for big selections to small
$query['num_rows'] = -1; // all
$query['csv_export'] = true; // so get_rows method _can_ produce different content or not store state in the session
$this->get_rows($query,$rows,$readonlys);
$selected = array();
@ -309,7 +310,7 @@ class importexport_definitions_ui
// Restore old query
egw_session::appsession($session_name, 'importexport',$old_query);
}
}
}
// Dialogs to get options
list($action, $settings) = explode('_', $action, 2);
@ -961,7 +962,7 @@ class importexport_definitions_ui
$data = config::read(self::_appname);
$data['share_definition'] = $GLOBALS['egw']->acl->get_ids_for_location('share_definition', EGW_ACL_READ, self::_appname);
$sel_options['import_charsets'] = array_combine(mb_list_encodings(),mb_list_encodings());
// Remove 'standard' encodings to prevent doubles
foreach($GLOBALS['egw']->translation->get_installed_charsets() as $charset => $label)
{