3 Commits

Author SHA1 Message Date
Johan Cwiklinski
6746792bdf Drop short_tags 2018-05-19 17:01:37 +02:00
Bharat Mediratta
719328a5a7 If we use <?= .. ?> on the last line, it looks like we've got a
trailing ?> and that causes File_Structure_Test to be sad.  So instead
use echo and tack on our own newline.  But this also requires a
semicolon.  Weird, I know but still easier than fixing up the test.
2010-06-20 09:02:59 -07:00
Bharat Mediratta
41ca2b0195 Rework our exception framework to fit into Kohana's model better.
Instead of overwriting Kohana_Exception::handle() (which we were doing
in MY_Kohana_Exception) we instead use their existing template system.

gallery/views/kohana/error.php overrides system/views/kohana/error.php
and is the standard error template for all exceptions.  Our version of
error.php figures out the appropriate view based on context (cli,
authenticated admin, guest viewing a 404, guest viewing a system
error) and delegates appropriately.  Each delegated view has a narrow
responsibility.

This paves the way for us to add new error views per module.  For
example, the rest module will define its own template in
Rest_Exception and then its exceptions can be rendered the way that it
wants (json encoded, in that case).
2010-06-19 14:07:32 -07:00