From f6b9b13654f7f6e8d43ccd3c8b4b76d57b809ce2 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 29 Jul 2014 11:19:40 +0200 Subject: [PATCH] doc: Rename 'chapterName' to 'chapterTitle' refs #4820 --- .../doc/application/controllers/IcingawebController.php | 8 ++++---- modules/doc/application/controllers/ModuleController.php | 6 +++--- modules/doc/library/Doc/SectionRenderer.php | 2 +- modules/doc/library/Doc/TocRenderer.php | 2 +- modules/doc/run.php | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/doc/application/controllers/IcingawebController.php b/modules/doc/application/controllers/IcingawebController.php index 813439169..55f60d36e 100644 --- a/modules/doc/application/controllers/IcingawebController.php +++ b/modules/doc/application/controllers/IcingawebController.php @@ -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'); } /** diff --git a/modules/doc/application/controllers/ModuleController.php b/modules/doc/application/controllers/ModuleController.php index b04a56400..3a8bfc6af 100644 --- a/modules/doc/application/controllers/ModuleController.php +++ b/modules/doc/application/controllers/ModuleController.php @@ -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 ); } diff --git a/modules/doc/library/Doc/SectionRenderer.php b/modules/doc/library/Doc/SectionRenderer.php index c7e6c6ffb..31143e3c8 100644 --- a/modules/doc/library/Doc/SectionRenderer.php +++ b/modules/doc/library/Doc/SectionRenderer.php @@ -57,7 +57,7 @@ class Callback array_merge( $this->urlParams, array( - 'chapterName' => SectionRenderer::encodeUrlParam($section->getChapterTitle()) + 'chapterTitle' => SectionRenderer::encodeUrlParam($section->getChapterTitle()) ) ), $this->url, diff --git a/modules/doc/library/Doc/TocRenderer.php b/modules/doc/library/Doc/TocRenderer.php index 8264c2d8e..f018c556d 100644 --- a/modules/doc/library/Doc/TocRenderer.php +++ b/modules/doc/library/Doc/TocRenderer.php @@ -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, diff --git a/modules/doc/run.php b/modules/doc/run.php index eaab1cb05..959b56095 100644 --- a/modules/doc/run.php +++ b/modules/doc/run.php @@ -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',