aboutsummaryrefslogtreecommitdiff
path: root/views/failsafe
diff options
context:
space:
mode:
Diffstat (limited to 'views/failsafe')
-rw-r--r--views/failsafe/messages/exceptions/admin_exception.php30
-rw-r--r--views/failsafe/messages/exceptions/exception.php20
-rw-r--r--views/failsafe/page/default.php60
3 files changed, 110 insertions, 0 deletions
diff --git a/views/failsafe/messages/exceptions/admin_exception.php b/views/failsafe/messages/exceptions/admin_exception.php
new file mode 100644
index 000000000..57665d9c0
--- /dev/null
+++ b/views/failsafe/messages/exceptions/admin_exception.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Elgg exception (failsafe mode)
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['object'] An exception
+ */
+
+?>
+
+<p class="elgg-messages-exception">
+ <span title="<?php echo get_class($vars['object']); ?>">
+ <?php
+
+ echo nl2br($vars['object']->getMessage());
+
+ ?>
+ </span>
+</p>
+
+<p class="elgg-messages-exception">
+ <?php
+
+ echo nl2br(htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8'));
+
+ ?>
+</p> \ No newline at end of file
diff --git a/views/failsafe/messages/exceptions/exception.php b/views/failsafe/messages/exceptions/exception.php
new file mode 100644
index 000000000..1873ca0d9
--- /dev/null
+++ b/views/failsafe/messages/exceptions/exception.php
@@ -0,0 +1,20 @@
+<?php
+/**
+ * Elgg exception (failsafe mode)
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['object'] An exception
+ */
+
+?>
+
+<p class="elgg-messages-exception">
+ <span title="Unrecoverable Error">
+ <?php echo elgg_echo('exception:contact_admin'); ?>
+ <br /><br />
+ Exception #<?php echo $vars['ts']; ?>.
+ </span>
+</p>
diff --git a/views/failsafe/page/default.php b/views/failsafe/page/default.php
new file mode 100644
index 000000000..6d628ebbb
--- /dev/null
+++ b/views/failsafe/page/default.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Elgg failsafe pageshell
+ * Special viewtype for rendering exceptions. Includes minimal code so as not to
+ * create a "Exception thrown without a stack frame in Unknown on line 0" error
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['title'] The page title
+ * @uses $vars['body'] The main content of the page
+ */
+
+// we won't trust server configuration but specify utf-8
+header('Content-type: text/html; charset=utf-8');
+
+?>
+<html>
+ <head>
+ <title><?php echo $vars['title']; ?></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+ <style type="text/css">
+
+ body {
+ text-align:left;
+ margin:0;
+ padding:0;
+ background: #4690d6;
+ font: 80%/1.5 "Lucida Grande", Verdana, sans-serif;
+ color: #333333;
+ }
+ p {
+ margin: 0px 0px 15px 0;
+ }
+ #elgg-wrapper {
+ background:white;
+ width:570px;
+ margin:auto;
+ padding:10px 40px;
+ margin-bottom:40px;
+ margin-top:20px;
+ border-right: 1px solid #666666;
+ border-bottom: 1px solid #666666;
+ }
+ .elgg-messages-exception {
+ background:#FDFFC3;
+ display:block;
+ padding:10px;
+ }
+ </style>
+
+ </head>
+ <body>
+ <div id="elgg-wrapper">
+ <h1><?php echo $vars['title']; ?></h1>
+ <?php echo $vars['body']; ?>
+ </div>
+ </body>
+</html>