* 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:45:08 +00:00
parent 4246b65eb8
commit f609efbdd8
2 changed files with 8 additions and 8 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'];
}
@ -1432,7 +1432,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);