Commit 605fb08c authored by Franco Fichtner's avatar Franco Fichtner

mvc: style sweep

parent d8946545
...@@ -144,7 +144,7 @@ $di->set('router', function () { ...@@ -144,7 +144,7 @@ $di->set('router', function () {
}); });
// exception handling // exception handling
$di->get('eventsManager')->attach("dispatch:beforeException", function($event, $dispatcher, $exception) { $di->get('eventsManager')->attach("dispatch:beforeException", function ($event, $dispatcher, $exception) {
switch ($exception->getCode()) { switch ($exception->getCode()) {
case Phalcon\Dispatcher::EXCEPTION_HANDLER_NOT_FOUND: case Phalcon\Dispatcher::EXCEPTION_HANDLER_NOT_FOUND:
// send to error action on default index controller // send to error action on default index controller
......
...@@ -55,7 +55,8 @@ class IndexController extends ControllerBase ...@@ -55,7 +55,8 @@ class IndexController extends ControllerBase
$this->response->setJsonContent( $this->response->setJsonContent(
array('message' => $message, array('message' => $message,
'status' => 400 'status' => 400
)); )
);
} else { } else {
$this->getLogger()->error($message); $this->getLogger()->error($message);
$this->response->redirect("/", true); $this->response->redirect("/", true);
......
...@@ -162,7 +162,7 @@ class IDS extends BaseModel ...@@ -162,7 +162,7 @@ class IDS extends BaseModel
} elseif (!$response_plain) { } elseif (!$response_plain) {
// generate selection for new field // generate selection for new field
$default_types = $this->action_list ; $default_types = $this->action_list ;
if ( array_key_exists($default, $default_types)) { if (array_key_exists($default, $default_types)) {
foreach ($default_types as $key => $value) { foreach ($default_types as $key => $value) {
if ($key == $default) { if ($key == $default) {
$default_types[$key]['selected'] = 1; $default_types[$key]['selected'] = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment