parent
3cafc8910a
commit
f6b9b13654
|
@ -23,14 +23,14 @@ class Doc_IcingawebController extends DocController
|
|||
*/
|
||||
public function chapterAction()
|
||||
{
|
||||
$chapterName = $this->getParam('chapterName');
|
||||
if ($chapterName === null) {
|
||||
$chapterTitle = $this->getParam('chapterTitle');
|
||||
if ($chapterTitle === null) {
|
||||
throw new Zend_Controller_Action_Exception(
|
||||
$this->translate('Missing parameter \'chapterName\''),
|
||||
$this->translate('Missing parameter \'chapterTitle\''),
|
||||
404
|
||||
);
|
||||
}
|
||||
$this->renderChapter(Icinga::app()->getApplicationDir('/../doc'), $chapterName, 'doc/icingaweb/chapter');
|
||||
$this->renderChapter(Icinga::app()->getApplicationDir('/../doc'), $chapterTitle, 'doc/icingaweb/chapter');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -82,7 +82,7 @@ class Doc_ModuleController extends DocController
|
|||
/**
|
||||
* View a chapter of a module's documentation
|
||||
*
|
||||
* @throws Zend_Controller_Action_Exception If the required parameter 'chapterName' is missing or if an error in
|
||||
* @throws Zend_Controller_Action_Exception If the required parameter 'chapterTitle' is missing or if an error in
|
||||
* the documentation module's library occurs
|
||||
* @see assertModuleEnabled()
|
||||
*/
|
||||
|
@ -90,10 +90,10 @@ class Doc_ModuleController extends DocController
|
|||
{
|
||||
$moduleName = $this->getParam('moduleName');
|
||||
$this->assertModuleEnabled($moduleName);
|
||||
$chapterTitle = $this->getParam('chapterName');
|
||||
$chapterTitle = $this->getParam('chapterTitle');
|
||||
if ($chapterTitle === null) {
|
||||
throw new Zend_Controller_Action_Exception(
|
||||
$this->translate('Missing parameter \'chapterName\''),
|
||||
$this->translate('Missing parameter \'chapterTitle\''),
|
||||
404
|
||||
);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ class Callback
|
|||
array_merge(
|
||||
$this->urlParams,
|
||||
array(
|
||||
'chapterName' => SectionRenderer::encodeUrlParam($section->getChapterTitle())
|
||||
'chapterTitle' => SectionRenderer::encodeUrlParam($section->getChapterTitle())
|
||||
)
|
||||
),
|
||||
$this->url,
|
||||
|
|
|
@ -85,7 +85,7 @@ class TocRenderer extends Renderer
|
|||
array_merge(
|
||||
$this->urlParams,
|
||||
array(
|
||||
'chapterName' => $this->encodeUrlParam($section->getChapterTitle())
|
||||
'chapterTitle' => $this->encodeUrlParam($section->getChapterTitle())
|
||||
)
|
||||
),
|
||||
$this->url,
|
||||
|
|
|
@ -8,7 +8,7 @@ if (Icinga::app()->isCli()) {
|
|||
}
|
||||
|
||||
$docModuleChapter = new Zend_Controller_Router_Route(
|
||||
'doc/module/:moduleName/chapter/:chapterName',
|
||||
'doc/module/:moduleName/chapter/:chapterTitle',
|
||||
array(
|
||||
'controller' => 'module',
|
||||
'action' => 'chapter',
|
||||
|
@ -17,7 +17,7 @@ $docModuleChapter = new Zend_Controller_Router_Route(
|
|||
);
|
||||
|
||||
$docIcingaWebChapter = new Zend_Controller_Router_Route(
|
||||
'doc/icingaweb/chapter/:chapterName',
|
||||
'doc/icingaweb/chapter/:chapterTitle',
|
||||
array(
|
||||
'controller' => 'icingaweb',
|
||||
'action' => 'chapter',
|
||||
|
|
Loading…
Reference in New Issue