Commit 130b90b19c984c1b6add41b6437b2df49f0d502f

Authored by conradverm
1 parent e1ffe92f

KTS-2505

"Database configuration issues cause horrible knowledgetree failure"
Fixed. preventing early calls to the db

Committed By: Conrad Vermeulen
Reviewed By: Kevin Fourie

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7396 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 5 additions and 0 deletions
search2/search/search.inc.php
... ... @@ -229,6 +229,11 @@ class SearchHelper
229 229  
230 230 public static function getSavedSearches($userID)
231 231 {
  232 + if (empty($default->db))
  233 + {
  234 + return array();
  235 + }
  236 +
232 237 $sql = "SELECT id, name FROM search_saved WHERE type='S'";
233 238  
234 239 // if we are not the system admin, then we get only ours or shared searches
... ...