diff options
Diffstat (limited to 'views/failsafe')
-rw-r--r-- | views/failsafe/canvas/default.php | 36 | ||||
-rw-r--r-- | views/failsafe/input/access.php | 100 | ||||
-rw-r--r-- | views/failsafe/input/checkboxes.php | 78 | ||||
-rw-r--r-- | views/failsafe/input/longtext.php | 38 | ||||
-rw-r--r-- | views/failsafe/input/pulldown.php | 70 | ||||
-rw-r--r-- | views/failsafe/input/text.php | 38 | ||||
-rw-r--r-- | views/failsafe/messages/errors/error.php | 34 | ||||
-rw-r--r-- | views/failsafe/messages/errors/list.php | 94 | ||||
-rw-r--r-- | views/failsafe/messages/list.php | 44 | ||||
-rw-r--r-- | views/failsafe/messages/messages/list.php | 100 | ||||
-rw-r--r-- | views/failsafe/messages/messages/message.php | 34 | ||||
-rw-r--r-- | views/failsafe/messages/sanitisation/htaccess.php | 22 | ||||
-rw-r--r-- | views/failsafe/settings/install.php | 32 | ||||
-rw-r--r-- | views/failsafe/settings/system.php | 126 |
14 files changed, 423 insertions, 423 deletions
diff --git a/views/failsafe/canvas/default.php b/views/failsafe/canvas/default.php index 34ff1984d..a5c30fe52 100644 --- a/views/failsafe/canvas/default.php +++ b/views/failsafe/canvas/default.php @@ -1,21 +1,21 @@ -<?php
-
- /**
- * Elgg default layout
- *
- * @package Elgg
- * @subpackage Core
+<?php - * @author Curverider Ltd
+ /** + * 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}"]; + + } - * @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 index d83b265ce..74fc56ddf 100644 --- a/views/failsafe/input/access.php +++ b/views/failsafe/input/access.php @@ -1,51 +1,51 @@ -<?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
-
- }
-
+<?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/checkboxes.php b/views/failsafe/input/checkboxes.php index 46894c5cb..0e394af55 100644 --- a/views/failsafe/input/checkboxes.php +++ b/views/failsafe/input/checkboxes.php @@ -1,49 +1,49 @@ -<?php
-
- /**
- * Elgg checkbox input
- * Displays a checkbox input field
- *
- * @package Elgg
- * @subpackage Core
+<?php - * @author Curverider Ltd
+ /** + * Elgg checkbox input + * Displays a checkbox input field + * + * @package Elgg + * @subpackage Core - * @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
- *
- */
+ * @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\"";
- }
+ + 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;
+ 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 />";
- }
-
+ 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/longtext.php b/views/failsafe/input/longtext.php index 41cb395c2..c1f38fe69 100644 --- a/views/failsafe/input/longtext.php +++ b/views/failsafe/input/longtext.php @@ -1,25 +1,25 @@ -<?php
-
- /**
- * Elgg long text input
- * Displays a long text input field
- *
- * @package Elgg
- * @subpackage Core
+<?php - * @author Curverider Ltd
+ /** + * Elgg long text input + * Displays a long text input field + * + * @package Elgg + * @subpackage Core - * @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
- *
- */
+ * @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 index a0e91ce25..1adbad099 100644 --- a/views/failsafe/input/pulldown.php +++ b/views/failsafe/input/pulldown.php @@ -1,33 +1,33 @@ -<?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
+<?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.
- */
+ * 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
+ +?> + + +<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) { @@ -39,14 +39,14 @@ } } else - {
- foreach($vars['options'] as $option) {
- if ($option != $vars['value']) {
- echo "<option>{$option}</option>";
- } else {
- echo "<option selected=\"selected\">{$option}</option>";
- }
- }
- }
-?>
+ { + 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/text.php b/views/failsafe/input/text.php index 2195741f2..4c37e5219 100644 --- a/views/failsafe/input/text.php +++ b/views/failsafe/input/text.php @@ -1,27 +1,27 @@ -<?php
-
- /**
- * Elgg text input
- * Displays a text input field
- *
- * @package Elgg
- * @subpackage Core
+<?php - * @author Curverider Ltd
+ /** + * Elgg text input + * Displays a text input field + * + * @package Elgg + * @subpackage Core - * @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
+ * @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
- */
+ * @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 index ea43f1c37..e3eb065e7 100644 --- a/views/failsafe/messages/errors/error.php +++ b/views/failsafe/messages/errors/error.php @@ -1,20 +1,20 @@ -<?php
-
- /**
- * Elgg error message
- * Displays a single error message
- *
- * @package Elgg
- * @subpackage Core
+<?php - * @author Curverider Ltd
+ /** + * Elgg error message + * Displays a single error message + * + * @package Elgg + * @subpackage Core - * @link http://elgg.org/
- *
- * @uses $vars['object'] An error message (string)
- */
-?>
-
- <p>
- <?php echo $vars['object']; ?>
+ * @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 index fd90a8d1f..8a4b26056 100644 --- a/views/failsafe/messages/errors/list.php +++ b/views/failsafe/messages/errors/list.php @@ -1,48 +1,48 @@ -<?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
- }
-
-
-
+<?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/list.php b/views/failsafe/messages/list.php index d454841d8..dd02fdac5 100644 --- a/views/failsafe/messages/list.php +++ b/views/failsafe/messages/list.php @@ -1,25 +1,25 @@ -<?php
-
- /**
- * Elgg global system message list
- * Lists all system messages
- *
- * @package Elgg
- * @subpackage Core
+<?php - * @author Curverider Ltd
+ /** + * Elgg global system message list + * Lists all system messages + * + * @package Elgg + * @subpackage Core - * @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));
- }
-
- }
-
+ * @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 index d103060b2..2cb94b4e1 100644 --- a/views/failsafe/messages/messages/list.php +++ b/views/failsafe/messages/messages/list.php @@ -1,51 +1,51 @@ -<?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
-
- }
-
+<?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 index b3286e469..c63c27498 100644 --- a/views/failsafe/messages/messages/message.php +++ b/views/failsafe/messages/messages/message.php @@ -1,20 +1,20 @@ -<?php
-
- /**
- * Elgg standard message
- * Displays a single Elgg system message
- *
- * @package Elgg
- * @subpackage Core
+<?php - * @author Curverider Ltd
+ /** + * Elgg standard message + * Displays a single Elgg system message + * + * @package Elgg + * @subpackage Core - * @link http://elgg.org/
- *
- * @uses $vars['object'] A system message (string)
- */
-?>
-
- <p>
- <?php echo nl2br($vars['object']); ?>
+ * @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/htaccess.php b/views/failsafe/messages/sanitisation/htaccess.php index 5bfbb38f8..b8800c9be 100644 --- a/views/failsafe/messages/sanitisation/htaccess.php +++ b/views/failsafe/messages/sanitisation/htaccess.php @@ -1,17 +1,17 @@ -<?php
-
- /**
- * Elgg .htaccess not found message
- * Is saved to the errors register when the main .htaccess cannot be found
- *
- * @package Elgg
- * @subpackage Core
+<?php - * @author Curverider Ltd
+ /** + * Elgg .htaccess not found message + * Is saved to the errors register when the main .htaccess cannot be found + * + * @package Elgg + * @subpackage Core - * @link http://elgg.org/
+ * @author Curverider Ltd + + * @link http://elgg.org/ */ - echo autop(elgg_echo('installation:error:htaccess'));
+ 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/settings/install.php b/views/failsafe/settings/install.php index 6a3e075d9..2bf632c6a 100644 --- a/views/failsafe/settings/install.php +++ b/views/failsafe/settings/install.php @@ -1,19 +1,19 @@ -<?php
-
- /**
- * Elgg system settings on initial installation
- *
- * @package Elgg
- * @subpackage Core
+<?php - * @author Curverider Ltd
+ /** + * 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")); - * @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 85f625336..2f7a85031 100644 --- a/views/failsafe/settings/system.php +++ b/views/failsafe/settings/system.php @@ -1,66 +1,66 @@ -<?php
-
- /**
- * Elgg system settings form
- * The form to change system settings
- *
- * @package Elgg
- * @subpackage Core
+<?php - * @author Curverider Ltd
+ /** + * Elgg system settings form + * The form to change system settings + * + * @package Elgg + * @subpackage Core - * @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>";
-
- $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');
-
- 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));
-
+ * @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>"; + + $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'); + + 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 |