diff --git a/include/class.search.php b/include/class.search.php index 3f55ccccf2ab8e61dfcb1bdc855b9e1bbda4a162..3fc0fa9210caa94752e1e6416947d4a07fc85c10 100644 --- a/include/class.search.php +++ b/include/class.search.php @@ -784,18 +784,20 @@ class SavedSearch extends VerySimpleModel { }); // Load state from current configuraiton - foreach ($this->getCriteria() as $I) { - list($path, $method, $value) = $I; - if (!($F = $form->getField("{$path}+search"))) - continue; - $F->value = true; + if (!$source) { + foreach ($this->getCriteria() as $I) { + list($path, $method, $value) = $I; + if (!($F = $form->getField("{$path}+search"))) + continue; + $F->value = true; - if (!($F = $form->getField("{$path}+method"))) - continue; - $F->value = $method; + if (!($F = $form->getField("{$path}+method"))) + continue; + $F->value = $method; - if ($value && ($F = $form->getField("{$path}+{$method}"))) - $F->value = $value; + if ($value && ($F = $form->getField("{$path}+{$method}"))) + $F->value = $value; + } } return $form; }