Advertisement
Guest User

Untitled

a guest
Dec 11th, 2012
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. public function getSearchPath() {
  2.     $env_id = $this->info['instance'];
  3.     $query = apachesolr_current_query($env_id);
  4.     if (!$query || (NULL === $this->searchPath && NULL === $query->getPath())) {
  5.       if ($path = module_invoke($this->info['module'] . '_search', 'search_info')) {
  6.         $this->searchPath = 'search/' . $path['path'];
  7.         if (!isset($_GET['keys']) && ($keys = $this->getSearchKeys())) {
  8.           $this->searchPath .= '/' . $keys;
  9.         }
  10.       }
  11.     }
  12.     if (!$query || NULL === $query->getPath()) {
  13.       return $this->searchPath;
  14.     }
  15.     else {
  16.       return $query->getPath();
  17.     }
  18.  
  19.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement