Initial Commit
This commit is contained in:
32
app/controllers/SiteController.php
Normal file
32
app/controllers/SiteController.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* SiteController class
|
||||
*
|
||||
* @author Antonio Ramirez <amigo.cobos@gmail.com>
|
||||
* @link http://www.ramirezcobos.com/
|
||||
* @link http://www.2amigos.us/
|
||||
* @copyright 2013 2amigOS! Consultation Group LLC
|
||||
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
|
||||
*/
|
||||
class SiteController extends EController
|
||||
{
|
||||
public function actionIndex()
|
||||
{
|
||||
$this->render('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the action to handle external exceptions.
|
||||
*/
|
||||
public function actionError()
|
||||
{
|
||||
if($error=Yii::app()->errorHandler->error)
|
||||
{
|
||||
if(Yii::app()->request->isAjaxRequest)
|
||||
echo $error['message'];
|
||||
else
|
||||
$this->render('error', $error);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user