Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
jwage committed May 18, 2010
1 parent 89bf1d8 commit 11155b9
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions apps/frontend/modules/documentation/actions/actions.class.php
Expand Up @@ -12,8 +12,10 @@ class documentationActions extends sfActions
public function executeApi()
{
$this->project = Project::getProject($this->getRequestParameter('slug'));
$this->forward404Unless($this->project);

$this->version = $this->project->getVersion($this->getRequestParameter('version'));
$this->forward404Unless($this->project && $this->version);
$this->forward404Unless($this->version);

$this->setLayout(false);
sfConfig::set('sf_web_debug', false);
Expand All @@ -22,8 +24,10 @@ public function executeApi()
public function executeApi_navigation()
{
$this->project = Project::getProject($this->getRequestParameter('slug'));
$this->forward404Unless($this->project);

$this->version = $this->project->getVersion($this->getRequestParameter('version'));
$this->forward404Unless($this->project && $this->version);
$this->forward404Unless($this->version);

$this->setLayout(false);
sfConfig::set('sf_web_debug', false);
Expand All @@ -38,8 +42,10 @@ public function executeGlobal_index()
public function executeIndex()
{
$this->project = Project::getProject($this->getRequestParameter('slug'));
$this->forward404Unless($this->project);

$this->version = $this->project->getVersion($this->getRequestParameter('version'));
$this->forward404Unless($this->project && $this->version);
$this->forward404Unless($this->version);

$this->documentationItems = $this->version->getDocumentationItems($this->getRequestParameter('version'));

Expand All @@ -49,8 +55,10 @@ public function executeIndex()
public function executeItem_index()
{
$this->project = Project::getProject($this->getRequestParameter('slug'));
$this->forward404Unless($this->project);

$this->version = $this->project->getVersion($this->getRequestParameter('version'));
$this->forward404Unless($this->project && $this->version);
$this->forward404Unless($this->version);

$this->documentationItem = $this->version->getDocumentationItem($this->getRequestParameter('item'));
$this->renderer = $this->documentationItem->getRenderer(
Expand All @@ -65,8 +73,10 @@ public function executeItem_index()
public function executeItem_chapter()
{
$this->project = Project::getProject($this->getRequestParameter('slug'));
$this->forward404Unless($this->project);

$this->version = $this->project->getVersion($this->getRequestParameter('version'));
$this->forward404Unless($this->project && $this->version);
$this->forward404Unless($this->version);

$this->documentationItem = $this->version->getDocumentationItem($this->getRequestParameter('item'));
$this->renderer = $this->documentationItem->getRenderer(
Expand Down

0 comments on commit 11155b9

Please sign in to comment.