public function addSavedSearch() { if (!isset($_GET['searchID'])) { CommonErrors::fatal(COMMONERROR_BADINDEX, $this, 'No search ID specified.'); } if (!isset($_GET['currentURL'])) { CommonErrors::fatal(COMMONERROR_BADFIELDS, $this, 'No current URL specified.'); } $searchID = $_GET['searchID']; $currentURL = $_GET['currentURL']; if (!eval(Hooks::get('HOME_ADD_SAVED_SEARCH_PRE'))) return; $savedSearches = new SavedSearches($this->_siteID); $savedSearches->save($searchID); if (!eval(Hooks::get('HOME_ADD_SAVED_SEARCH_POST'))) return; CATSUtility::transferRelativeURI($currentURL); }