]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Standardized views/failsafe/*
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 16 Oct 2009 21:05:54 +0000 (21:05 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 16 Oct 2009 21:05:54 +0000 (21:05 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3558 36083f99-b078-4883-b0ff-0f9b5a30f544

22 files changed:
views/failsafe/canvas/default.php
views/failsafe/input/access.php
views/failsafe/input/button.php
views/failsafe/input/checkboxes.php
views/failsafe/input/form.php
views/failsafe/input/hidden.php
views/failsafe/input/longtext.php
views/failsafe/input/pulldown.php
views/failsafe/input/reset.php
views/failsafe/input/submit.php
views/failsafe/input/text.php
views/failsafe/messages/errors/error.php
views/failsafe/messages/errors/list.php
views/failsafe/messages/exceptions/exception.php
views/failsafe/messages/list.php
views/failsafe/messages/messages/list.php
views/failsafe/messages/messages/message.php
views/failsafe/messages/sanitisation/htaccess.php
views/failsafe/messages/sanitisation/settings.php
views/failsafe/pageshells/pageshell.php
views/failsafe/settings/install.php
views/failsafe/settings/system.php

index a5c30fe52b4c1699d72027ffd40841be270724aa..0cfa8b49a01a1f8a232c1f66ababb2389ccdb1ea 100644 (file)
@@ -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
index 74fc56ddf4de96efb7e346c67ebd1cd78aa6d397..c0dabccaf23be1869ba48fa6cf681a2319422156 100644 (file)
@@ -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
index 0f6fdf6a5fb9b55b01e1ed25282571fe5fcc85e2..2c36841df9e582c2edaf07d4f351a71ebc845af7 100644 (file)
@@ -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
index 0e394af55f3825cbda251708e0e0e8450360e459..0cc32958f44c91506fc741add5303cfecf3650d0 100644 (file)
@@ -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
index 99b6f9965d443ca767e01e8eeb7958e596130be9..10fe89dcf435452885c2910acfa2c0e3fd87de12 100644 (file)
@@ -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\""; ?>>
index 58b86c25e0469792be85d4716a4227508f1e58a7..dd5c8bb9813070fc21088595afa5f01c054dd829 100644 (file)
@@ -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
index c1f38fe6945580c64dab79a2a6e042f7552b8790..9c89583def9e7a36a9e1827e20915b5945651e91 100644 (file)
@@ -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
index 1adbad099be07650105a9fe23c0570e8b9b12728..6ad12eec49196aec22a94b3a074ba44fc6acfaf4 100644 (file)
@@ -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
index 96fc57a4f7174d0de408edefc2767486331c620f..bb8d278c37bf54f67fc56ce288139e02f25ebdd4 100644 (file)
@@ -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
index 79d6522b9d6a7431166811e92ee9747f8aa6b93f..cfa7989d02e91f2b7c0903cdf3ff2f58d9329892 100644 (file)
@@ -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
index 4c37e52196c1784b51da9e396f09f41b006c41fb..f94ee0135a51017c2a1aaa9467122eb1861df0d7 100644 (file)
@@ -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
index e3eb065e7b12c4795bc3ea0674b6d13c253f6903..2ec365890a31ae8588c61e04325fa4da1df239c0 100644 (file)
@@ -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
index 8a4b26056e9544a28c66502dc6cbf53831a9c163..c270d6c0a77dfb90626a9eca69d15a270d83ff3c 100644 (file)
@@ -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
index 12e49c50f5b81738f43d329b0a6cd1960bc04066..f6fb4d144ba1b5916b04f257396ab4eee27e5915 100644 (file)
@@ -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
index dd02fdac5c67b732010288baadb225511ec4ec53..2410103da05042e75f5687dee073829ef661da75 100644 (file)
@@ -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
index 2cb94b4e1da6530c9d743a34170bae7e719cb59b..ed169c69283146c4f19a07513186a58847edf064 100644 (file)
@@ -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
index c63c274989d5762865ccb4db4c6cd16b3eb68eee..6bc24d7301eb1ba88bb6b9dda2fa1dd702a305f6 100644 (file)
@@ -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
index b8800c9be81c5237bafc01c60ff3f127068adb2a..e0eddacef1d817ddcca187ecc587b59f0671c453 100644 (file)
@@ -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
index ac17d16cd100bf2fd1eff163cecc015c409a9de8..cf3ee719d5b25cce51e45b003c91b58f4c3ded33 100644 (file)
@@ -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
index d5ae145b4cda11dde64553bc51ad54c2c8ba4f1a..468e00ef178241e9a18fbcde73bd770c9fc97364 100644 (file)
@@ -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;
                        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;
                        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>
index 2bf632c6ad32694e0281f73d0528b4da6e61a857..6fccfb06fc4fa9e3707eed625f00cc50b79a8ef6 100644 (file)
@@ -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
index 2f7a85031124ed93a8912e981daa765cf417f471..aa06dd44c68d3efea69bde2397eda5aa4ac03002 100644 (file)
@@ -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