improve skip out condition on filter for search strings; fix javascrip error on unavailable next

This commit is contained in:
Klaus Leithoff 2014-01-20 11:53:19 +00:00
parent 9da3e4ca0d
commit ab9423573b
2 changed files with 4 additions and 2 deletions

View File

@ -1538,7 +1538,7 @@ class mail_bo
//_debug_array($_criterias);
if (self::$debug) error_log(__METHOD__.__LINE__.' Criterias:'.(!is_array($_criterias)?" none -> returning $all":array2string($_criterias)));
if((!is_array($_criterias) || $_criterias['status']=='any') && !isset($_criterias['string']) && empty($_criterias['string'])) {
if((!is_array($_criterias) || $_criterias['status']=='any') && (!isset($_criterias['string']) || empty($_criterias['string']))) {
$imapFilter->flag('DELETED', $set=false);
return $imapFilter;
}

View File

@ -643,7 +643,9 @@ app.classes.mail = AppJS.extend(
// Pre-load next email already so user gets it faster
// Browser will cache the file for us
var next = egw_getObjectManager('mail',false,1).getObjectById('nm').getFocusedObject().getNext(1);
var fO = egw_getObjectManager('mail',false,1).getObjectById('nm').getFocusedObject();
var next = false;
if (fO) next = fO.getNext(1);
// Stop until we get all the details worked out - server marks as seen automatically
if(false && next && next.id)
{