aboutsummaryrefslogtreecommitdiff
path: root/views/failsafe
diff options
context:
space:
mode:
Diffstat (limited to 'views/failsafe')
-rw-r--r--views/failsafe/canvas/default.php15
-rw-r--r--views/failsafe/input/access.php49
-rw-r--r--views/failsafe/input/button.php53
-rw-r--r--views/failsafe/input/checkboxes.php48
-rw-r--r--views/failsafe/input/form.php53
-rw-r--r--views/failsafe/input/hidden.php18
-rw-r--r--views/failsafe/input/longtext.php24
-rw-r--r--views/failsafe/input/pulldown.php45
-rw-r--r--views/failsafe/input/reset.php26
-rw-r--r--views/failsafe/input/securitytoken.php17
-rw-r--r--views/failsafe/input/submit.php26
-rw-r--r--views/failsafe/input/text.php26
-rw-r--r--views/failsafe/messages/errors/error.php17
-rw-r--r--views/failsafe/messages/errors/list.php41
-rw-r--r--views/failsafe/messages/exceptions/admin_exception.php30
-rw-r--r--views/failsafe/messages/exceptions/exception.php28
-rw-r--r--views/failsafe/messages/list.php18
-rw-r--r--views/failsafe/messages/messages/list.php43
-rw-r--r--views/failsafe/messages/messages/message.php17
-rw-r--r--views/failsafe/messages/sanitisation/dbsettings_error.php15
-rw-r--r--views/failsafe/messages/sanitisation/htaccess.php14
-rw-r--r--views/failsafe/messages/sanitisation/settings.php50
-rw-r--r--views/failsafe/page/default.php60
-rw-r--r--views/failsafe/page_shells/default.php156
-rw-r--r--views/failsafe/settings/install.php14
-rw-r--r--views/failsafe/settings/system.php61
26 files changed, 96 insertions, 868 deletions
diff --git a/views/failsafe/canvas/default.php b/views/failsafe/canvas/default.php
deleted file mode 100644
index 0cfa8b49a..000000000
--- a/views/failsafe/canvas/default.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * Elgg default layout
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
-for ($i = 1; $i < 8; $i++) {
- if (isset($vars["area{$i}"])) {
- echo $vars["area{$i}"];
- }
-} \ No newline at end of file
diff --git a/views/failsafe/input/access.php b/views/failsafe/input/access.php
deleted file mode 100644
index a57014840..000000000
--- a/views/failsafe/input/access.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/**
- * Elgg access level input
- * Displays a pulldown input field
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
-
-if (isset($vars['class'])) {
- $class = $vars['class'];
-}
-if (!$class) {
- $class = "input_access";
-}
-
-if ((!isset($vars['options'])) || (!is_array($vars['options']))) {
- $vars['options'] = array();
- $vars['options'] = get_write_access_array();
-}
-
-if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
-
- ?>
-
- <select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
- <?php
-
- foreach($vars['options'] as $key => $option) {
- if ($key != $vars['value']) {
- echo "<option value=\"{$key}\">{$option}</option>";
- } else {
- echo "<option value=\"{$key}\" selected=\"selected\">{$option}</option>";
- }
- }
-
- ?>
- </select>
-
- <?php
-
-} \ No newline at end of file
diff --git a/views/failsafe/input/button.php b/views/failsafe/input/button.php
deleted file mode 100644
index 2c36841df..000000000
--- a/views/failsafe/input/button.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
- * Create a input button
- * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
- * extra security which help prevent CSRF attacks.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['type'] Submit or reset, defaults to submit.
- * @uses $vars['src'] Src of an image
- *
- */
-
-global $CONFIG;
-
-$class = $vars['class'];
-if (!$class) {
- $class = "submit_button";
-}
-
-if (isset($vars['type'])) {
- $type = strtolower($vars['type']);
-} else {
- $type = 'submit';
-}
-
-switch ($type) {
- case 'button' :
- $type='button';
- break;
- case 'reset' :
- $type='reset';
- break;
- case 'submit':
- default:
- $type = 'submit';
-}
-
-$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
-$name = $vars['internalname'];
-$src = $vars['src'];
-// blank src if trying to access an offsite image.
-if (strpos($src,$CONFIG->wwwroot)===false) {
- $src = "";
-}
-?>
-<input type="<?php echo $type; ?>" class="<?php echo $type; ?>_button" <?php echo $vars['js']; ?> value="<?php echo $value; ?>" src="<?php echo $src; ?>" class="<?php echo $class; ?>" /> \ No newline at end of file
diff --git a/views/failsafe/input/checkboxes.php b/views/failsafe/input/checkboxes.php
deleted file mode 100644
index 0cc32958f..000000000
--- a/views/failsafe/input/checkboxes.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/**
- * Elgg checkbox input
- * Displays a checkbox input field
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['options'] An array of strings representing the options for the checkbox field
- *
- */
-
-$class = $vars['class'];
-if (!$class) {
- $class = "input-checkboxes";
-}
-
-foreach($vars['options'] as $label => $option) {
- //if (!in_array($option,$vars['value'])) {
- if (is_array($vars['value'])) {
- if (!in_array($option,$vars['value'])) {
- $selected = "";
- } else {
- $selected = "checked = \"checked\"";
- }
- } else {
- if ($option != $vars['value']) {
- $selected = "";
- } else {
- $selected = "checked = \"checked\"";
- }
- }
- $labelint = (int) $label;
- if ("{$label}" == "{$labelint}") {
- $label = $option;
- }
-
- $disabled = "";
- if ($vars['disabled']) {
- $disabled = ' disabled="yes" ';
- }
- echo "<label><input type=\"checkbox\" $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" {$selected} value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
-} \ No newline at end of file
diff --git a/views/failsafe/input/form.php b/views/failsafe/input/form.php
deleted file mode 100644
index 35e718adb..000000000
--- a/views/failsafe/input/form.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/**
- * Create a form for data submission.
- * Use this view for forms rather than creating a form tag in the wild as it provides
- * extra security which help prevent CSRF attacks.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['body'] The body of the form (made up of other input/xxx views and html
- * @uses $vars['method'] Method (default POST)
- * @uses $vars['enctype'] How the form is encoded, default blank
- * @uses $vars['action'] URL of the action being called
- *
- */
-
-if (isset($vars['internalid'])) {
- $id = $vars['internalid'];
-} else {
- $id = '';
-}
-if (isset($vars['internalname'])) {
- $name = $vars['internalname'];
-} else {
- $name = '';
-}
-$body = $vars['body'];
-$action = $vars['action'];
-if (isset($vars['enctype'])) {
- $enctype = $vars['enctype'];
-} else {
- $enctype = '';
-}
-if (isset($vars['method'])) {
- $method = $vars['method'];
-} else {
- $method = 'POST';
-}
-
-$method = strtolower($method);
-
-// Generate a security header
-$security_header = "";
-if (!isset($vars['disable_security']) || $vars['disable_security'] != true) {
- $security_header = elgg_view('input/securitytoken');
-}
-?>
-<form <?php if ($id) { ?>id="<?php echo $id; ?>" <?php } ?> <?php if ($name) { ?>name="<?php echo $name; ?>" <?php } ?> action="<?php echo $action; ?>" method="<?php echo $method; ?>" <?php if ($enctype!="") echo "enctype=\"$enctype\""; ?>>
-<?php echo $security_header; ?>
-<?php echo $body; ?>
-</form> \ No newline at end of file
diff --git a/views/failsafe/input/hidden.php b/views/failsafe/input/hidden.php
deleted file mode 100644
index dd5c8bb98..000000000
--- a/views/failsafe/input/hidden.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-/**
- * Create a hidden data field
- * Use this view for forms rather than creating a hidden tag in the wild as it provides
- * extra security which help prevent CSRF attacks.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
-?>
-<input type="hidden" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" /> \ No newline at end of file
diff --git a/views/failsafe/input/longtext.php b/views/failsafe/input/longtext.php
deleted file mode 100644
index 9da3d8276..000000000
--- a/views/failsafe/input/longtext.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-/**
- * Elgg long text input
- * Displays a long text input field
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
-
-$class = $vars['class'];
-if (!$class) {
- $class = "input_textarea";
-}
-
-?>
-
-<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo $vars['value']; ?></textarea> \ No newline at end of file
diff --git a/views/failsafe/input/pulldown.php b/views/failsafe/input/pulldown.php
deleted file mode 100644
index 6ad12eec4..000000000
--- a/views/failsafe/input/pulldown.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/**
- * Elgg pulldown input
- * Displays a pulldown input field
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['options'] An array of strings representing the options for the pulldown field
- * @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is
- * the value displayed on the button. Replaces $vars['options'] when defined.
- */
-
-
-$class = $vars['class'];
-if (!$class) {
- $class = "input-pulldown";
-}
-?>
-<select name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
-<?php
-if ($vars['options_values']) {
- foreach($vars['options_values'] as $value => $option) {
- if ($value != $vars['value']) {
- echo "<option value=\"$value\">{$option}</option>";
- } else {
- echo "<option value=\"$value\" selected=\"selected\">{$option}</option>";
- }
- }
-} else {
- foreach($vars['options'] as $option) {
- if ($option != $vars['value']) {
- echo "<option>{$option}</option>";
- } else {
- echo "<option selected=\"selected\">{$option}</option>";
- }
- }
-}
-?>
-</select> \ No newline at end of file
diff --git a/views/failsafe/input/reset.php b/views/failsafe/input/reset.php
deleted file mode 100644
index bb8d278c3..000000000
--- a/views/failsafe/input/reset.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * Create a reset input button
- * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
- * extra security which help prevent CSRF attacks.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['type'] Submit or reset, defaults to submit.
- *
- */
-
-$vars['type'] = 'reset';
-$class = $vars['class'];
-if (!$class) {
- $class = "submit_button";
-}
-$vars['class'] = $class;
-
-echo elgg_view('input/button', $vars); \ No newline at end of file
diff --git a/views/failsafe/input/securitytoken.php b/views/failsafe/input/securitytoken.php
deleted file mode 100644
index a2a4a0e01..000000000
--- a/views/failsafe/input/securitytoken.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * CSRF security token view for use with secure forms.
- *
- * It is still recommended that you use input/form.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
-$ts = time();
-$token = generate_action_token($ts);
-
-echo elgg_view('input/hidden', array('internalname' => '__elgg_token', 'value' => $token));
-echo elgg_view('input/hidden', array('internalname' => '__elgg_ts', 'value' => $ts));
diff --git a/views/failsafe/input/submit.php b/views/failsafe/input/submit.php
deleted file mode 100644
index cfa7989d0..000000000
--- a/views/failsafe/input/submit.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * Create a submit input button
- * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
- * extra security which help prevent CSRF attacks.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['type'] Submit or reset, defaults to submit.
- *
- */
-
-$vars['type'] = 'submit';
-$class = $vars['class'];
-if (!$class) {
- $class = "submit_button";
-}
-$vars['class'] = $class;
-
-echo elgg_view('input/button', $vars); \ No newline at end of file
diff --git a/views/failsafe/input/text.php b/views/failsafe/input/text.php
deleted file mode 100644
index 7f69a2f93..000000000
--- a/views/failsafe/input/text.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * Elgg text input
- * Displays a text input field
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- * @uses $vars['disabled'] If true then control is read-only
- * @uses $vars['class'] Class override
- */
-
-$class = $vars['class'];
-if (!$class) {
- $class = "input_text";
-}
-
-?>
-<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/> \ No newline at end of file
diff --git a/views/failsafe/messages/errors/error.php b/views/failsafe/messages/errors/error.php
deleted file mode 100644
index 2ec365890..000000000
--- a/views/failsafe/messages/errors/error.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * Elgg error message
- * Displays a single error message
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An error message (string)
- */
-?>
-
-<p>
- <?php echo $vars['object']; ?>
-</p> \ No newline at end of file
diff --git a/views/failsafe/messages/errors/list.php b/views/failsafe/messages/errors/list.php
deleted file mode 100644
index c270d6c0a..000000000
--- a/views/failsafe/messages/errors/list.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/**
- * Elgg list errors
- * Lists error messages
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An array of error messages
- */
-
-if (!empty($vars['object']) && is_array($vars['object'])) {
-
-?>
-<style type="text/css">
-.messages_error {
- border:1px solid #D3322A;
- background:#F7DAD8;
- color:#000000;
- padding:3px 10px 3px 10px;
- margin:20px 0px 0px 0px;
- z-index: 9999;
- position:relative;
- width:95%;
-}
-</style>
- <div class="database_settings">
- <div class="messages_errors">
-
-<?php
- foreach($vars['object'] as $error) {
- echo elgg_view('messages/errors/error',array('object' => $error));
- //echo "<hr />";
- }
-?>
- </div>
- </div>
-<?php
-} \ No newline at end of file
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
index d3877f0c8..1873ca0d9 100644
--- a/views/failsafe/messages/exceptions/exception.php
+++ b/views/failsafe/messages/exceptions/exception.php
@@ -1,36 +1,20 @@
<?php
/**
- * Elgg exception (fallback mode)
+ * Elgg exception (failsafe mode)
* Displays a single exception
*
* @package Elgg
* @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
*
* @uses $vars['object'] An exception
*/
-global $CONFIG;
?>
-<p class="messages-exception" style="background:#FDFFC3;display:block;padding:10px;">
- <span title="<?php echo get_class($vars['object']); ?>">
- <?php
-
- echo nl2br($vars['object']->getMessage());
-
- ?>
+<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>
-
-<?php if (isset($CONFIG->debug)) { ?>
-
-<p class="messages-exception-detail" style="background:#FDFFC3;display:block;padding:10px;">
- <?php
-
- echo nl2br(htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8'));
-
- ?>
-</p>
-<?php } ?> \ No newline at end of file
diff --git a/views/failsafe/messages/list.php b/views/failsafe/messages/list.php
deleted file mode 100644
index 2410103da..000000000
--- a/views/failsafe/messages/list.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-/**
- * Elgg global system message list
- * Lists all system messages
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['object'] The array of message registers
- */
-
-if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
- foreach($vars['object'] as $register => $list ) {
- echo elgg_view("messages/{$register}/list", array('object' => $list));
- }
-} \ No newline at end of file
diff --git a/views/failsafe/messages/messages/list.php b/views/failsafe/messages/messages/list.php
deleted file mode 100644
index ed169c692..000000000
--- a/views/failsafe/messages/messages/list.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/**
- * Elgg list system messages
- * Lists system messages
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An array of system messages
- */
-
-if (!empty($vars['object']) && is_array($vars['object'])) {
-
-?>
-
-<style type="text/css">
-.messages {
- border:1px solid #00cc00;
- background:#ccffcc;
- color:#000000;
- padding:3px 10px 3px 10px;
- margin:20px 0px 0px 0px;
- z-index: 9999;
- position:relative;
- width:95%;
-}
-</style>
-
- <div class="messages">
-
-<?php
- foreach($vars['object'] as $message) {
- echo elgg_view('messages/messages/message',array('object' => $message));
- }
-?>
-
- </div>
-
-<?php
-
-} \ No newline at end of file
diff --git a/views/failsafe/messages/messages/message.php b/views/failsafe/messages/messages/message.php
deleted file mode 100644
index 6bc24d730..000000000
--- a/views/failsafe/messages/messages/message.php
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-/**
- * Elgg standard message
- * Displays a single Elgg system message
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['object'] A system message (string)
- */
-?>
-
-<p>
- <?php echo nl2br($vars['object']); ?>
-</p> \ No newline at end of file
diff --git a/views/failsafe/messages/sanitisation/dbsettings_error.php b/views/failsafe/messages/sanitisation/dbsettings_error.php
deleted file mode 100644
index 630c9d015..000000000
--- a/views/failsafe/messages/sanitisation/dbsettings_error.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-/**
- * Elgg bad database settings
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
-?>
-
-<h2><?php echo elgg_echo('installation:error:db:title'); ?></h2>
-<p>
-<b><?php echo elgg_echo('installation:error:db:text'); ?></b>
-</p> \ No newline at end of file
diff --git a/views/failsafe/messages/sanitisation/htaccess.php b/views/failsafe/messages/sanitisation/htaccess.php
deleted file mode 100644
index 7d065ec81..000000000
--- a/views/failsafe/messages/sanitisation/htaccess.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-/**
- * Elgg .htaccess not found message
- * Is saved to the errors register when the main .htaccess cannot be found
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
-echo autop(elgg_echo('installation:error:htaccess'));
-?>
-<textarea><?php echo $vars['.htaccess']; ?></textarea>
diff --git a/views/failsafe/messages/sanitisation/settings.php b/views/failsafe/messages/sanitisation/settings.php
deleted file mode 100644
index b4e43a053..000000000
--- a/views/failsafe/messages/sanitisation/settings.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * Elgg settings not found message
- * Is saved to the errors register when settings.php cannot be found
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- */
-
-$dbuser = '';
-$dbpassword = '';
-$dbname = '';
-$dbhost = 'localhost';
-$dbprefix = 'elgg_';
-if (isset($vars['sticky'])) {
- $dbuser = $vars['sticky']['CONFIG_DBUSER'];
- $dbname = $vars['sticky']['CONFIG_DBNAME'];
- $dbhost = $vars['sticky']['CONFIG_DBHOST'];
- $dbprefix = $vars['sticky']['CONFIG_DBPREFIX'];
-}
-
-
-if ($vars['settings.php']) {
- echo elgg_echo('installation:settings:dbwizard:savefail');
-?>
-<div>
- <textarea><?php echo $vars['settings.php']; ?></textarea>
-</div>
-<?php
-} else {
- echo autop(elgg_echo('installation:error:settings'));
-?>
-<div>
- <h2><?php echo elgg_echo('installation:settings:dbwizard:prompt'); ?></h2>
- <form method="post">
- <table cellpadding="0" cellspacing="10" style="background:#f1f1f1;">
- <tr><td valign="top"><?php echo elgg_echo('installation:settings:dbwizard:label:user'); ?></td><td valign="top"> <input type="text" name="db_install_vars[CONFIG_DBUSER]" value="<?php echo $dbuser; ?>" /></td></tr>
- <tr><td valign="top"><?php echo elgg_echo('installation:settings:dbwizard:label:pass'); ?></td><td valign="top"> <input type="password" name="db_install_vars[CONFIG_DBPASS]" value="<?php echo $dbpassword; ?>" /></td></tr>
- <tr><td valign="top"><?php echo elgg_echo('installation:settings:dbwizard:label:dbname'); ?></td><td valign="top"> <input type="text" name="db_install_vars[CONFIG_DBNAME]" value="<?php echo $dbname; ?>" /></td></tr>
- <tr><td valign="top"><?php echo elgg_echo('installation:settings:dbwizard:label:host'); ?></td><td valign="top"> <input type="text" name="db_install_vars[CONFIG_DBHOST]" value="<?php echo $dbhost; ?>" /></td></tr>
- <tr><td valign="top"><?php echo elgg_echo('installation:settings:dbwizard:label:prefix'); ?></td><td valign="top"> <input type="text" name="db_install_vars[CONFIG_DBPREFIX]" value="<?php echo $dbprefix; ?>" /></td></tr>
- </table>
-
- <input type="submit" name="<?php echo elgg_echo('save'); ?>" value="<?php echo elgg_echo('save'); ?>" />
- </form>
-</div>
-<?php
-}
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>
diff --git a/views/failsafe/page_shells/default.php b/views/failsafe/page_shells/default.php
deleted file mode 100644
index 6cbefcdaf..000000000
--- a/views/failsafe/page_shells/default.php
+++ /dev/null
@@ -1,156 +0,0 @@
-<?php
-/**
- * Elgg fallback pageshell
- * Render a few things (like the installation process) in a fallback mode, text only with minimal use
- * of functions.
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['config'] The site configuration settings, imported
- * @uses $vars['title'] The page title
- * @uses $vars['body'] The main content of the page
- * @uses $vars['messages'] A 2d array of various message registers, passed from system_messages()
- */
-
-// 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;
- }
- a {
- color: #4690d6;
- text-decoration: none;
- -moz-outline-style: none;
- outline: none;
- }
- a:visited {
- color: #0054a7;
- }
- a:hover {
- color: #0054a7;
- text-decoration: underline;
- }
- p {
- margin: 0px 0px 15px 0;
- }
- img {
- border: none;
- }
- #startpage_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;
- }
-
- label {
- font-weight: bold;
- color:#333333;
- font-size: 140%;
- }
- input[type="text"],
- input[type="password"] {
- font: 120% Arial, Helvetica, sans-serif;
- padding: 5px;
- border: 1px solid #cccccc;
- color:#666666;
- width:566px;
- }
- .database_settings input[type="text"],
- .database_settings input[type="password"] {
- width:220px;
- }
- textarea {
- width: 100%;
- height: 100%;
- font: 120% Arial, Helvetica, sans-serif;
- border: solid 1px #cccccc;
- padding: 5px;
- color:#666666;
- }
- textarea:focus, input[type="password"]:focus, input[type="text"]:focus {
- border: solid 1px #4690d6;
- background: #e4ecf5;
- color:#333333;
- }
-
- input[type="submit"]:hover {
- background: #0054a7;
- border: 4px solid #0054a7;
- }
-
- input[type="submit"] {
- font: 16px/100% Arial, Helvetica, sans-serif;
- font-weight: bold;
- color: #ffffff;
- background:#4690d6;
- border: 4px solid #4690d6;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- width: auto;
- height: 35px;
- padding: 2px 6px 2px 6px;
- margin:10px 0 10px 0;
- cursor: pointer;
- }
- #startpage_wrapper hr {
- border:0;
- border-bottom:1px solid #333333;
- }
- #startpage_wrapper td {
- text-align: left;
- vertical-align: middle;
- }
-
- .messages {
- border:1px solid #00cc00;
- background:#ccffcc;
- color:#000000;
- padding:3px 10px 3px 10px;
- }
- .messages_error {
- border:1px solid #D3322A;
- background:#F7DAD8;
- color:#000000;
- padding:3px 10px 3px 10px;
-
- }
- </style>
-
-
-
- </head>
- <body>
- <div id="startpage_wrapper">
- <h1><?php echo $vars['title']; ?></h1>
-
- <!-- display any system messages -->
- <?php echo elgg_view('messages/list', array('object' => $vars['sysmessages'])); ?>
-
- <p>
- <?php echo $vars['body']; ?>
- </p>
- </div>
- </body>
-</html>
diff --git a/views/failsafe/settings/install.php b/views/failsafe/settings/install.php
deleted file mode 100644
index 6fccfb06f..000000000
--- a/views/failsafe/settings/install.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-/**
- * Elgg system settings on initial installation
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- */
-
-echo "<p>" . autop(elgg_echo("installation:settings:description")) . "</p>";
-
-echo elgg_view("settings/system",array("action" => "action/systemsettings/install")); \ No newline at end of file
diff --git a/views/failsafe/settings/system.php b/views/failsafe/settings/system.php
deleted file mode 100644
index 9c4a40aa5..000000000
--- a/views/failsafe/settings/system.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/**
- * Elgg system settings form
- * The form to change system settings
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['action'] If set, the place to forward the form to (usually action/systemsettings/save)
- */
-
-// Set action appropriately
-if (!isset($vars['action'])) {
- $action = $vars['url'] . "action/systemsettings/save";
-} else {
- $action = $vars['action'];
-}
-
-$form_body = "";
-foreach(array('sitename','sitedescription', 'siteemail', 'wwwroot','path','dataroot', 'view') as $field) {
- $form_body .= "<p>";
- $form_body .= elgg_echo('installation:' . $field) . "<br />";
- $warning = elgg_echo('installation:warning:' . $field);
- if ($warning != 'installation:warning:' . $field) {
- echo "<b>" . $warning . "</b><br />";
- }
- $value = $vars['config']->$field;
- if ($field == 'view') {
- $value = 'default';
- }
- $form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value));
- $form_body .= "</p>";
-}
-
-$languages = get_installed_translations();
-$form_body .= "<p>" . elgg_echo('installation:language') . elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $vars['config']->language, 'options_values' => $languages)) . "</p>";
-
-$form_body .= "<p>" . elgg_echo('installation:sitepermissions') . elgg_view('input/access', array('internalname' => 'default_access','value' => ACCESS_LOGGED_IN)) . "</p>";
-
-$debug_options = array('0' => elgg_echo('installation:debug:none'), 'ERROR' => elgg_echo('installation:debug:error'), 'WARNING' => elgg_echo('installation:debug:warning'), 'NOTICE' => elgg_echo('installation:debug:notice'));
-$form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug');
-$form_body .= elgg_view('input/pulldown', array('options_values' => $debug_options, 'internalname' => 'debug', 'value' => $vars['config']->debug));
-$form_body .= '</p>';
-
-$form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
-
-$form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:disableapi') . "<br />";
-$on = elgg_echo('installation:disableapi:label');
-if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true)) {
- $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label'));
-}
-$form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on ));
-$form_body .= "</p>";
-
-$form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go'));
-
-$form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
-
-echo elgg_view('input/form', array('action' => $action, 'body' => $form_body)); \ No newline at end of file