diff --git a/public_html/media/css/core.css b/public_html/media/css/core.css index e2697986..34c96ed1 100644 --- a/public_html/media/css/core.css +++ b/public_html/media/css/core.css @@ -136,6 +136,8 @@ a:hover i[class*='icon-'] { padding: 10px; border-style: solid; border-width: 1px; + max-width: 500px; + margin: 0 auto; } .alert-error { diff --git a/src/Bootstrap.php b/src/Bootstrap.php index 85508ce1..154d2f7f 100644 --- a/src/Bootstrap.php +++ b/src/Bootstrap.php @@ -26,6 +26,7 @@ class Bootstrap $this->config->chibi->baseUrl = 'http://' . rtrim($_SERVER['HTTP_HOST'], '/') . '/'; session_start(); + $this->context->handleExceptions = false; $this->context->title = $this->config->main->title; $this->context->stylesheets = [ @@ -63,6 +64,8 @@ class Bootstrap $this->context->transport->errorMessage = rtrim($e->getMessage(), '.') . '.'; $this->context->transport->exception = $e; $this->context->transport->success = false; + if (!$this->context->handleExceptions) + $this->context->viewName = 'error-simple'; (new \Chibi\View())->renderFile($this->context->layoutName); } catch (Exception $e) diff --git a/src/Controllers/AuthController.php b/src/Controllers/AuthController.php index cd2625bc..a8ccddde 100644 --- a/src/Controllers/AuthController.php +++ b/src/Controllers/AuthController.php @@ -12,6 +12,7 @@ class AuthController */ public function loginAction() { + $this->context->handleExceptions = true; $this->context->stylesheets []= 'auth.css'; $this->context->subTitle = 'authentication form'; @@ -62,6 +63,7 @@ class AuthController */ public function registerAction() { + $this->context->handleExceptions = true; $this->context->stylesheets []= 'auth.css'; $this->context->subTitle = 'registration form'; diff --git a/src/Controllers/CommentController.php b/src/Controllers/CommentController.php index 556b6889..30e80a29 100644 --- a/src/Controllers/CommentController.php +++ b/src/Controllers/CommentController.php @@ -8,6 +8,6 @@ class CommentController { $this->context->activeSection = 'comments'; $this->context->subTitle = 'comments'; - throw new Exception('Not implemented'); + throw new SimpleException('Not implemented'); } } diff --git a/src/Controllers/UserController.php b/src/Controllers/UserController.php index 98752a2d..541daa85 100644 --- a/src/Controllers/UserController.php +++ b/src/Controllers/UserController.php @@ -7,7 +7,7 @@ class UserController public function listAction() { $this->context->subTitle = 'users'; - throw new Exception('Not implemented'); + throw new SimpleException('Not implemented'); } /** @@ -17,6 +17,6 @@ class UserController public function viewAction($name) { $this->context->subTitle = $name; - throw new Exception('Not implemented'); + throw new SimpleException('Not implemented'); } } diff --git a/src/Views/auth-activation.phtml b/src/Views/auth-activation.phtml index e9966fa7..611f767f 100644 --- a/src/Views/auth-activation.phtml +++ b/src/Views/auth-activation.phtml @@ -4,7 +4,3 @@
However, you still need to be approved by admin.
- -context->transport->errorMessage)): ?> -context->transport->errorMessage ?>
- diff --git a/src/Views/auth-register.phtml b/src/Views/auth-register.phtml index 7dd159d9..871ed23b 100644 --- a/src/Views/auth-register.phtml +++ b/src/Views/auth-register.phtml @@ -37,9 +37,9 @@ context->transport->errorMessage)): ?> -Error: context->transport->errorMessage ?>
-Error: context->transport->errorMessage ?>
+Error: context->transport->errorMessage ?>
Go back
context->transport->errorMessage ?>
-context->transport->posts)): ?> +context->transport->posts)): ?>No posts to show.
Post created!
-context->transport->errorMessage)): ?> -context->transport->errorMessage ?>