doc: Use Controller:httpNotFound() in ModuleController

refs #9644
This commit is contained in:
Eric Lippmann 2015-07-28 13:47:06 +02:00
parent fe73d6de83
commit 9846dfb2e2
1 changed files with 4 additions and 10 deletions

View File

@ -35,10 +35,7 @@ class Doc_ModuleController extends DocController
if ($suppressErrors) {
return null;
}
throw new Zend_Controller_Action_Exception(
sprintf($this->translate('Documentation for module \'%s\' is not available'), $module),
404
);
$this->httpNotFound($this->translate('Documentation for module \'%s\' is not available'), $module);
}
/**
@ -75,10 +72,7 @@ class Doc_ModuleController extends DocController
}
$moduleManager = Icinga::app()->getModuleManager();
if (! $moduleManager->hasInstalled($moduleName)) {
throw new Zend_Controller_Action_Exception(
sprintf($this->translate('Module \'%s\' is not installed'), $moduleName),
404
);
$this->httpNotFound($this->translate('Module \'%s\' is not installed'), $moduleName);
}
}
@ -100,7 +94,7 @@ class Doc_ModuleController extends DocController
array('moduleName' => $module)
);
} catch (DocException $e) {
throw new Zend_Controller_Action_Exception($e->getMessage(), 404);
$this->httpNotFound($e->getMessage());
}
}
@ -131,7 +125,7 @@ class Doc_ModuleController extends DocController
array('moduleName' => $module)
);
} catch (DocException $e) {
throw new Zend_Controller_Action_Exception($e->getMessage(), 404);
$this->httpNotFound($e->getMessage());
}
}