Add specific exception for disabled search
[gitphp.git] / include / controller / Controller_Search.class.php
blob:a/include/controller/Controller_Search.class.php -> blob:b/include/controller/Controller_Search.class.php
--- a/include/controller/Controller_Search.class.php
+++ b/include/controller/Controller_Search.class.php
@@ -46,7 +46,7 @@
 		parent::__construct();
 
 		if (!$this->config->GetValue('search')) {
-			throw new GitPHP_MessageException(__('Search has been disabled'), true);
+			throw new GitPHP_SearchDisabledException();
 		}
 	}
 
@@ -97,7 +97,7 @@
 
 		if ($this->params['searchtype'] == GitPHP_Controller_Search::FileSearch) {
 			if (!$this->config->GetValue('filesearch')) {
-				throw new GitPHP_MessageException(__('File search has been disabled'), true);
+				throw new GitPHP_SearchDisabledException(true);
 			}
 
 		}

comments