doc: Rename 'chapterName' to 'chapterTitle'

refs #4820
This commit is contained in:
Eric Lippmann 2014-07-29 11:19:40 +02:00
parent 3cafc8910a
commit f6b9b13654
5 changed files with 11 additions and 11 deletions

View File

@ -23,14 +23,14 @@ class Doc_IcingawebController extends DocController
*/ */
public function chapterAction() public function chapterAction()
{ {
$chapterName = $this->getParam('chapterName'); $chapterTitle = $this->getParam('chapterTitle');
if ($chapterName === null) { if ($chapterTitle === null) {
throw new Zend_Controller_Action_Exception( throw new Zend_Controller_Action_Exception(
$this->translate('Missing parameter \'chapterName\''), $this->translate('Missing parameter \'chapterTitle\''),
404 404
); );
} }
$this->renderChapter(Icinga::app()->getApplicationDir('/../doc'), $chapterName, 'doc/icingaweb/chapter'); $this->renderChapter(Icinga::app()->getApplicationDir('/../doc'), $chapterTitle, 'doc/icingaweb/chapter');
} }
/** /**

View File

@ -82,7 +82,7 @@ class Doc_ModuleController extends DocController
/** /**
* View a chapter of a module's documentation * 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 * the documentation module's library occurs
* @see assertModuleEnabled() * @see assertModuleEnabled()
*/ */
@ -90,10 +90,10 @@ class Doc_ModuleController extends DocController
{ {
$moduleName = $this->getParam('moduleName'); $moduleName = $this->getParam('moduleName');
$this->assertModuleEnabled($moduleName); $this->assertModuleEnabled($moduleName);
$chapterTitle = $this->getParam('chapterName'); $chapterTitle = $this->getParam('chapterTitle');
if ($chapterTitle === null) { if ($chapterTitle === null) {
throw new Zend_Controller_Action_Exception( throw new Zend_Controller_Action_Exception(
$this->translate('Missing parameter \'chapterName\''), $this->translate('Missing parameter \'chapterTitle\''),
404 404
); );
} }

View File

@ -57,7 +57,7 @@ class Callback
array_merge( array_merge(
$this->urlParams, $this->urlParams,
array( array(
'chapterName' => SectionRenderer::encodeUrlParam($section->getChapterTitle()) 'chapterTitle' => SectionRenderer::encodeUrlParam($section->getChapterTitle())
) )
), ),
$this->url, $this->url,

View File

@ -85,7 +85,7 @@ class TocRenderer extends Renderer
array_merge( array_merge(
$this->urlParams, $this->urlParams,
array( array(
'chapterName' => $this->encodeUrlParam($section->getChapterTitle()) 'chapterTitle' => $this->encodeUrlParam($section->getChapterTitle())
) )
), ),
$this->url, $this->url,

View File

@ -8,7 +8,7 @@ if (Icinga::app()->isCli()) {
} }
$docModuleChapter = new Zend_Controller_Router_Route( $docModuleChapter = new Zend_Controller_Router_Route(
'doc/module/:moduleName/chapter/:chapterName', 'doc/module/:moduleName/chapter/:chapterTitle',
array( array(
'controller' => 'module', 'controller' => 'module',
'action' => 'chapter', 'action' => 'chapter',
@ -17,7 +17,7 @@ $docModuleChapter = new Zend_Controller_Router_Route(
); );
$docIcingaWebChapter = new Zend_Controller_Router_Route( $docIcingaWebChapter = new Zend_Controller_Router_Route(
'doc/icingaweb/chapter/:chapterName', 'doc/icingaweb/chapter/:chapterTitle',
array( array(
'controller' => 'icingaweb', 'controller' => 'icingaweb',
'action' => 'chapter', 'action' => 'chapter',