Skip to content
This repository has been archived by the owner on Sep 25, 2018. It is now read-only.

Commit

Permalink
Better API routing format
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesportwoodii committed May 19, 2015
1 parent d101d84 commit 32fd5dd
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 16 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -67,7 +67,7 @@
"yiqing-95/YiiTimeAgo": "dev-master",
"charlesportwoodii/eanalytics": "1.1.5",
"charlesportwoodii/yii-newrelic": "1.0.1",
"charlesportwoodii/cii": "1.0.19",
"charlesportwoodii/cii": "1.0.22",
"ciims-themes/default": "3.0.19",
"ciims-modules/dashboard": "3.0.25",
"ciims-modules/api": "2.0.20",
Expand Down
30 changes: 15 additions & 15 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions protected/controllers/ContentController.php
Expand Up @@ -203,4 +203,22 @@ public function actionList()
'pages' => $pages
));
}

/**
* No routing action
*/
public function actionNR()
{
$themeName = Cii::getConfig('theme', 'default');
if (file_exists(Yii::getPathOfAlias('webroot.themes.') . DS . $themeName . DS . 'Theme.php'))
{
Yii::import('webroot.themes.' . $themeName . '.Theme');
$theme = new Theme;
}

if ($theme->noRouting !== false)
$this->render('index');
else
throw new CHttpException(404);
}
}

0 comments on commit 32fd5dd

Please sign in to comment.