aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/failsafe/canvas/default.php32
-rw-r--r--views/failsafe/input/access.php90
-rw-r--r--views/failsafe/input/button.php82
-rw-r--r--views/failsafe/input/checkboxes.php89
-rw-r--r--views/failsafe/input/form.php62
-rw-r--r--views/failsafe/input/hidden.php32
-rw-r--r--views/failsafe/input/longtext.php39
-rw-r--r--views/failsafe/input/pulldown.php83
-rw-r--r--views/failsafe/input/reset.php47
-rw-r--r--views/failsafe/input/submit.php47
-rw-r--r--views/failsafe/input/text.php41
-rw-r--r--views/failsafe/messages/errors/error.php31
-rw-r--r--views/failsafe/messages/errors/list.php51
-rw-r--r--views/failsafe/messages/exceptions/exception.php65
-rw-r--r--views/failsafe/messages/list.php39
-rw-r--r--views/failsafe/messages/messages/list.php60
-rw-r--r--views/failsafe/messages/messages/message.php31
-rw-r--r--views/failsafe/messages/sanitisation/htaccess.php25
-rw-r--r--views/failsafe/messages/sanitisation/settings.php36
-rw-r--r--views/failsafe/pageshells/pageshell.php74
-rw-r--r--views/failsafe/settings/install.php31
-rw-r--r--views/failsafe/settings/system.php119
22 files changed, 589 insertions, 617 deletions
diff --git a/views/failsafe/canvas/default.php b/views/failsafe/canvas/default.php
index a5c30fe52..0cfa8b49a 100644
--- a/views/failsafe/canvas/default.php
+++ b/views/failsafe/canvas/default.php
@@ -1,21 +1,15 @@
<?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}"];
-
+/**
+ * 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
+} \ No newline at end of file
diff --git a/views/failsafe/input/access.php b/views/failsafe/input/access.php
index 74fc56ddf..c0dabccaf 100644
--- a/views/failsafe/input/access.php
+++ b/views/failsafe/input/access.php
@@ -1,51 +1,49 @@
<?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();
+/**
+ * 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>";
+ }
}
-
- 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
+ ?>
+ </select>
- }
+ <?php
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/views/failsafe/input/button.php b/views/failsafe/input/button.php
index 0f6fdf6a5..2c36841df 100644
--- a/views/failsafe/input/button.php
+++ b/views/failsafe/input/button.php
@@ -1,39 +1,53 @@
<?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
- *
- */
+/**
+ * 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";
+global $CONFIG;
- 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'];
- if (strpos($src,$CONFIG->wwwroot)===false) $src = ""; // blank src if trying to access an offsite image.
+$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
index 0e394af55..0cc32958f 100644
--- a/views/failsafe/input/checkboxes.php
+++ b/views/failsafe/input/checkboxes.php
@@ -1,49 +1,48 @@
<?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
+ *
+ */
- /**
- * Elgg checkbox input
- * Displays a checkbox input field
- *
- * @package Elgg
- * @subpackage Core
+$class = $vars['class'];
+if (!$class) {
+ $class = "input-checkboxes";
+}
- * @author Curverider Ltd
+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;
+ }
- * @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
+ $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
index 99b6f9965..10fe89dcf 100644
--- a/views/failsafe/input/form.php
+++ b/views/failsafe/input/form.php
@@ -1,27 +1,43 @@
<?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'; }
+/**
+ * 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';
+}
?>
<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\""; ?>>
diff --git a/views/failsafe/input/hidden.php b/views/failsafe/input/hidden.php
index 58b86c25e..dd5c8bb98 100644
--- a/views/failsafe/input/hidden.php
+++ b/views/failsafe/input/hidden.php
@@ -1,18 +1,18 @@
<?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
- *
- */
+/**
+ * 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
+<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
index c1f38fe69..9c89583de 100644
--- a/views/failsafe/input/longtext.php
+++ b/views/failsafe/input/longtext.php
@@ -1,25 +1,24 @@
<?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
+ *
+ */
- /**
- * Elgg long text input
- * Displays a long text input field
- *
- * @package Elgg
- * @subpackage Core
+$class = $vars['class'];
+if (!$class) {
+ $class = "input-textarea";
+}
- * @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
+<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
index 1adbad099..6ad12eec4 100644
--- a/views/failsafe/input/pulldown.php
+++ b/views/failsafe/input/pulldown.php
@@ -1,52 +1,45 @@
<?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";
-
+/**
+ * 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>";
- }
- }
+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>";
- }
- }
+} 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
index 96fc57a4f..bb8d278c3 100644
--- a/views/failsafe/input/reset.php
+++ b/views/failsafe/input/reset.php
@@ -1,25 +1,26 @@
<?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.
- *
- */
+/**
+ * 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
+$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/submit.php b/views/failsafe/input/submit.php
index 79d6522b9..cfa7989d0 100644
--- a/views/failsafe/input/submit.php
+++ b/views/failsafe/input/submit.php
@@ -1,25 +1,26 @@
<?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.
- *
- */
+/**
+ * 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
+$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
index 4c37e5219..f94ee0135 100644
--- a/views/failsafe/input/text.php
+++ b/views/failsafe/input/text.php
@@ -1,27 +1,26 @@
<?php
+/**
+ * Elgg text input
+ * Displays a text input field
+ *
+ * @package Elgg
+ * @subpackage Core
- /**
- * Elgg text input
- * Displays a text input field
- *
- * @package Elgg
- * @subpackage Core
+ * @author Curverider Ltd
- * @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
+ */
- * @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";
+}
-
- $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
+<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
index e3eb065e7..2ec365890 100644
--- a/views/failsafe/messages/errors/error.php
+++ b/views/failsafe/messages/errors/error.php
@@ -1,20 +1,17 @@
<?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)
- */
+/**
+ * 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
+<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
index 8a4b26056..c270d6c0a 100644
--- a/views/failsafe/messages/errors/list.php
+++ b/views/failsafe/messages/errors/list.php
@@ -1,32 +1,29 @@
<?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'])) {
+/**
+ * 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%;
+ 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">
@@ -41,8 +38,4 @@
</div>
</div>
<?php
- }
-
-
-
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/views/failsafe/messages/exceptions/exception.php b/views/failsafe/messages/exceptions/exception.php
index 12e49c50f..f6fb4d144 100644
--- a/views/failsafe/messages/exceptions/exception.php
+++ b/views/failsafe/messages/exceptions/exception.php
@@ -1,37 +1,36 @@
<?php
+/**
+ * Elgg exception (fallback mode)
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An exception
+ */
- /**
- * Elgg exception (fallback mode)
- * Displays a single exception
- *
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An exception
- */
-
- global $CONFIG;
+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());
-
- ?>
- </span>
- </p>
-
- <?php if ($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
+<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());
+
+ ?>
+ </span>
+</p>
+
+<?php if ($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
index dd02fdac5..2410103da 100644
--- a/views/failsafe/messages/list.php
+++ b/views/failsafe/messages/list.php
@@ -1,25 +1,18 @@
<?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
+ */
- /**
- * 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
+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
index 2cb94b4e1..ed169c692 100644
--- a/views/failsafe/messages/messages/list.php
+++ b/views/failsafe/messages/messages/list.php
@@ -1,51 +1,43 @@
<?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'])) {
+/**
+ * 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%;
+ 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));
- }
-
+ foreach($vars['object'] as $message) {
+ echo elgg_view('messages/messages/message',array('object' => $message));
+ }
?>
</div>
-
-<?php
- }
+<?php
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/views/failsafe/messages/messages/message.php b/views/failsafe/messages/messages/message.php
index c63c27498..6bc24d730 100644
--- a/views/failsafe/messages/messages/message.php
+++ b/views/failsafe/messages/messages/message.php
@@ -1,20 +1,17 @@
<?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)
- */
+/**
+ * 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
+<p>
+ <?php echo nl2br($vars['object']); ?>
+</p> \ No newline at end of file
diff --git a/views/failsafe/messages/sanitisation/htaccess.php b/views/failsafe/messages/sanitisation/htaccess.php
index b8800c9be..e0eddacef 100644
--- a/views/failsafe/messages/sanitisation/htaccess.php
+++ b/views/failsafe/messages/sanitisation/htaccess.php
@@ -1,17 +1,14 @@
<?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'));
+/**
+ * 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 cols="120" rows="30"><?php echo $vars['.htaccess']; ?></textarea> \ No newline at end of file
diff --git a/views/failsafe/messages/sanitisation/settings.php b/views/failsafe/messages/sanitisation/settings.php
index ac17d16cd..cf3ee719d 100644
--- a/views/failsafe/messages/sanitisation/settings.php
+++ b/views/failsafe/messages/sanitisation/settings.php
@@ -1,28 +1,23 @@
<?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/
+ */
- /**
- * 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/
- */
-
- if ($vars['settings.php'])
- {
- echo elgg_echo('installation:settings:dbwizard:savefail');
+if ($vars['settings.php']) {
+ echo elgg_echo('installation:settings:dbwizard:savefail');
?>
<div>
<textarea rows="50" cols="120"><?php echo $vars['settings.php']; ?></textarea>
</div>
<?php
- }
- else
- {
-
- echo autop(elgg_echo('installation:error:settings'));
+} else {
+ echo autop(elgg_echo('installation:error:settings'));
?>
<div>
<h2><?php echo elgg_echo('installation:settings:dbwizard:prompt'); ?></h2>
@@ -34,8 +29,9 @@
<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="localhost" /></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="elgg" /></td></tr>
</table>
-
+
<input type="submit" name="<?php echo elgg_echo('save'); ?>" value="<?php echo elgg_echo('save'); ?>" />
</form>
</div>
-<?php } ?> \ No newline at end of file
+<?php
+} \ No newline at end of file
diff --git a/views/failsafe/pageshells/pageshell.php b/views/failsafe/pageshells/pageshell.php
index d5ae145b4..468e00ef1 100644
--- a/views/failsafe/pageshells/pageshell.php
+++ b/views/failsafe/pageshells/pageshell.php
@@ -1,28 +1,26 @@
<?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()
- */
-
-
+/**
+ * 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()
+ */
?>
<html>
<head>
<title><?php echo $vars['title']; ?></title>
-
+
<style type="text/css">
-
+
body {
text-align:left;
margin:0;
@@ -60,7 +58,7 @@
border-right: 1px solid #666666;
border-bottom: 1px solid #666666;
}
-
+
label {
font-weight: bold;
color:#333333;
@@ -89,19 +87,19 @@
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;
+ -webkit-border-radius: 4px;
-moz-border-radius: 4px;
width: auto;
height: 35px;
@@ -117,32 +115,32 @@
text-align: left;
vertical-align: middle;
}
-
+
.messages {
- border:1px solid #00cc00;
- background:#ccffcc;
- color:#000000;
- padding:3px 10px 3px 10px;
+ 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;
-
+ 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>
diff --git a/views/failsafe/settings/install.php b/views/failsafe/settings/install.php
index 2bf632c6a..6fccfb06f 100644
--- a/views/failsafe/settings/install.php
+++ b/views/failsafe/settings/install.php
@@ -1,19 +1,14 @@
<?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
+/**
+ * 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
index 2f7a85031..aa06dd44c 100644
--- a/views/failsafe/settings/system.php
+++ b/views/failsafe/settings/system.php
@@ -1,66 +1,67 @@
<?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)
+ */
- /**
- * Elgg system settings form
- * The form to change system settings
- *
- * @package Elgg
- * @subpackage Core
+// Set action appropriately
+if (!isset($vars['action'])) {
+ $action = $vars['url'] . "action/systemsettings/save";
+} else {
+ $action = $vars['action'];
+}
- * @author Curverider Ltd
+$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>";
+}
- * @link http://elgg.org/
- *
- * @uses $vars['action'] If set, the place to forward the form to (usually action/systemsettings/save)
- */
+$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>";
- // 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>";
+$form_body .= "<p>" . elgg_echo('installation:sitepermissions') . elgg_view('input/access', array('internalname' => 'default_access','value' => ACCESS_LOGGED_IN)) . "</p>";
- $form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</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 .= "<p class=\"admin_usage\">" . elgg_echo('installation:usage') . "<br />";
- $on = elgg_echo('installation:usage:label');
+$form_body .= "<p class=\"admin_debug\">" . elgg_echo('installation:debug') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:debug:label')), 'internalname' => 'debug', 'value' => ($vars['config']->debug ? elgg_echo('installation:debug:label') : "") )) . "</p>";
- if (isset($CONFIG->ping_home))
- $on = ($vars['config']->ping_home!='disabled' ? elgg_echo('installation:usage:label') : "");
- $form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:usage:label')), 'internalname' => 'usage', '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
+$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 .= "<p class=\"admin_usage\">" . elgg_echo('installation:usage') . "<br />";
+$on = elgg_echo('installation:usage:label');
+
+if (isset($CONFIG->ping_home)) {
+ $on = ($vars['config']->ping_home!='disabled' ? elgg_echo('installation:usage:label') : "");
+}
+$form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:usage:label')), 'internalname' => 'usage', '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