aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-06 11:35:39 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-06 11:35:39 +0000
commitc0eb72036e707f9a608e8c4c6c35364d7ee561a2 (patch)
tree14e44804b3d4dd17fbbd9fc08cdb42501804e62f /views/default
parente2100a57c6bbaaadfed1bfc64ea69ab67ead027a (diff)
downloadelgg-c0eb72036e707f9a608e8c4c6c35364d7ee561a2.tar.gz
elgg-c0eb72036e707f9a608e8c4c6c35364d7ee561a2.tar.bz2
Tidied up exception
git-svn-id: https://code.elgg.org/elgg/trunk@1732 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/messages/exceptions/exception.php47
1 files changed, 26 insertions, 21 deletions
diff --git a/views/default/messages/exceptions/exception.php b/views/default/messages/exceptions/exception.php
index f56927123..de178eda7 100644
--- a/views/default/messages/exceptions/exception.php
+++ b/views/default/messages/exceptions/exception.php
@@ -14,26 +14,31 @@
* @uses $vars['object'] An exception
*/
- global $CONFIG;
-?>
-
- <p class="messages-exception">
- <span title="<?php echo get_class($vars['object']); ?>">
- <?php
-
- echo autop($vars['object']->getMessage());
-
- ?>
- </span>
- </p>
+ global $CONFIG;
+
+ $class = get_class($vars['object']);
+ $message = autop($vars['object']->getMessage());
- <?php if ($CONFIG->debug) { ?>
- <hr />
- <p class="messages-exception-detail">
- <?php
-
- echo autop(htmlentities(print_r($vars['object'], true)));
-
- ?>
+ $body = <<< END
+ <p class="messages-exception">
+ <span title="$class">
+ $message
+ </span>
</p>
- <?php } ?> \ No newline at end of file
+END;
+
+ if ($CONFIG->debug)
+ {
+ $details = autop(htmlentities(print_r($vars['object'], true)));
+ $body .= <<< END
+ <hr />
+ <p class="messages-exception-detail">
+ $details
+ </p>
+END;
+ }
+
+ $title = $message;
+
+ page_draw($title, elgg_view_layout("one_column", elgg_view_title($title) . $body));
+?> \ No newline at end of file