Index: /extensions/ContactForm/admin/cf_config.php
===================================================================
--- /extensions/ContactForm/admin/cf_config.php	(revision 8151)
+++ /extensions/ContactForm/admin/cf_config.php	(revision 8152)
@@ -1,222 +1,112 @@
 <?php
-
 /* $Id: cf_config.php,v 1.2 2009/08/14 08:05:38 Criss Exp $ */
-
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
 check_status(ACCESS_ADMINISTRATOR);
 
-
-
 global $template, $page;
-
 // Include language advices
-
 load_language('plugin.lang', CF_PATH);
 
-
-
 $cf_plugin = get_plugin_data($plugin_id);
-
 $cf_config = $cf_plugin->get_config();
 
+if (isset($_POST['submit'])) {
+  global $page;
+  // Allow guest
+  $new_value = false;
+  if (isset($_POST['cf_guest_allowed'])) {
+      if ('1' == $_POST['cf_guest_allowed']) {
+          $new_value = true;
+      }
+  }
+  $cf_config->set_value(CF_CFG_ALLOW_GUEST, $new_value);
 
-
-if (isset($_POST['submit'])) {
-
-  global $page;
-
-  // Allow guest
-
+  // Mandatory name
   $new_value = false;
-
-  if (isset($_POST['cf_guest_allowed'])) {
-
-      if ('1' == $_POST['cf_guest_allowed']) {
-
+  if (isset($_POST['cf_mandatory_name'])) {
+      if ('1' == $_POST['cf_mandatory_name']) {
           $new_value = true;
-
       }
-
+  }
+  $cf_config->set_value(CF_CFG_NAME_MANDATORY, $new_value);
+  
+  // Mandatory mail
+  $new_value = false;
+  if (isset($_POST['cf_mandatory_mail'])) {
+      if ('1' == $_POST['cf_mandatory_mail']) {
+          $new_value = true;
+      }
+  }
+  $cf_config->set_value(CF_CFG_MAIL_MANDATORY, $new_value);
+  
+  // Prefix
+  $new_value = '';
+  if (isset($_POST['cf_mail_prefix'])) {
+    $new_value = trim(stripslashes($_POST['cf_mail_prefix']));
+    $cf_config->set_value(CF_CFG_SUBJECT_PREFIX, $new_value);
   }
 
-  $cf_config->set_value(CF_CFG_ALLOW_GUEST, $new_value);
-
-
-
-  // Mandatory name
-
-  $new_value = false;
-
-  if (isset($_POST['cf_mandatory_name'])) {
-
-      if ('1' == $_POST['cf_mandatory_name']) {
-
-          $new_value = true;
-
-      }
-
+  // Separator
+  $new_value = '';
+  if (isset($_POST['cf_separator'])) {
+    $new_value = trim(stripslashes($_POST['cf_separator']));
+    $cf_config->set_value(CF_CFG_SEPARATOR, $new_value);
   }
-
-  $cf_config->set_value(CF_CFG_NAME_MANDATORY, $new_value);
-
+  if (isset($_POST['cf_separator_length'])) {
+    $new_value = trim(stripslashes($_POST['cf_separator_length']));
+    if (ctype_digit($new_value)) {
+      $cf_config->set_value(CF_CFG_SEPARATOR_LEN, $new_value);
+    } else {
+      array_push($page['errors'], l10n('cf_length_not_integer'));
+    }
+  }
   
-
-  // Mandatory mail
-
-  $new_value = false;
-
-  if (isset($_POST['cf_mandatory_mail'])) {
-
-      if ('1' == $_POST['cf_mandatory_mail']) {
-
-          $new_value = true;
-
-      }
-
+  // Redirect delay
+  if (isset($_POST['cf_redirect_delay'])) {
+    $new_value = trim(stripslashes($_POST['cf_redirect_delay']));
+    if (ctype_digit($new_value)) {
+      $cf_config->set_value(CF_CFG_REDIRECT_DELAY, $new_value);
+    } else {
+      array_push($page['errors'], l10n('cf_delay_not_integer'));
+    }
   }
-
-  $cf_config->set_value(CF_CFG_MAIL_MANDATORY, $new_value);
-
   
-
-  // Prefix
-
-  $new_value = '';
-
-  if (isset($_POST['cf_mail_prefix'])) {
-
-    $new_value = trim(stripslashes($_POST['cf_mail_prefix']));
-
-    $cf_config->set_value(CF_CFG_SUBJECT_PREFIX, $new_value);
-
+  // Save config
+  $cf_config->save_config();
+  $saved = $cf_config->save_config();
+  if ($saved) {
+      array_push($page['infos'], l10n('cf_config_saved'));
+  } else {
+      array_push($page['errors'], l10n('cf_config_saved_with_errors'));
   }
-
-
-
-  // Separator
-
-  $new_value = '';
-
-  if (isset($_POST['cf_separator'])) {
-
-    $new_value = trim(stripslashes($_POST['cf_separator']));
-
-    $cf_config->set_value(CF_CFG_SEPARATOR, $new_value);
-
-  }
-
-  if (isset($_POST['cf_separator_length'])) {
-
-    $new_value = trim(stripslashes($_POST['cf_separator_length']));
-
-    if (ctype_digit($new_value)) {
-
-      $cf_config->set_value(CF_CFG_SEPARATOR_LEN, $new_value);
-
-    } else {
-
-      array_push($page['errors'], l10n('cf_length_not_integer'));
-
-    }
-
-  }
-
   
-
-  // Redirect delay
-
-  if (isset($_POST['cf_redirect_delay'])) {
-
-    $new_value = trim(stripslashes($_POST['cf_redirect_delay']));
-
-    if (ctype_digit($new_value)) {
-
-      $cf_config->set_value(CF_CFG_REDIRECT_DELAY, $new_value);
-
-    } else {
-
-      array_push($page['errors'], l10n('cf_delay_not_integer'));
-
-    }
-
-  }
-
-  
-
-  // Save config
-
-  $cf_config->save_config();
-
-  $saved = $cf_config->save_config();
-
-  if ($saved) {
-
-      array_push($page['infos'], l10n('cf_config_saved'));
-
-  } else {
-
-      array_push($page['errors'], l10n('cf_config_saved_with_errors'));
-
-  }
-
-  
-
 }
 
-
-
 // Define template file
-
 $template->set_filenames(array(
-
     'plugin_admin_content' => realpath(cf_get_template('cf_config.tpl',
-
                                                        CF_AMDIN_TPL))
-
   ));
 
-
-
 $cf = array(
-
     'TITLE'     => $cf_plugin->get_title(),
-
     'VERSION'   => $cf_plugin->get_version(),
-
     'F_ACTION'  => '',
-
   );
 
-
-
 $config_values = array(
-
     'GUEST'             => $cf_config->get_value(CF_CFG_ALLOW_GUEST)?
-
                               CF_CHECKED:'',
-
     'NEED_NAME'         => $cf_config->get_value(CF_CFG_NAME_MANDATORY)?
-
                               CF_CHECKED:'',
-
     'NEED_MAIL'         => $cf_config->get_value(CF_CFG_MAIL_MANDATORY)?
-
                               CF_CHECKED:'',
-
     'PREFIX'            => $cf_config->get_value(CF_CFG_SUBJECT_PREFIX),
-
     'SEPARATOR'         => $cf_config->get_value(CF_CFG_SEPARATOR),
-
     'SEPARATOR_LENGTH'  => $cf_config->get_value(CF_CFG_SEPARATOR_LEN),
-
     'REDIRECT_DELAY'    => $cf_config->get_value(CF_CFG_REDIRECT_DELAY),
-
   );
-
 $template->assign('CF', $cf);  
-
 $template->assign('CF_CONFIG', $config_values);  
-
 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
 
Index: /extensions/ContactForm/include/cf_functions.inc.php
===================================================================
--- /extensions/ContactForm/include/cf_functions.inc.php	(revision 8151)
+++ /extensions/ContactForm/include/cf_functions.inc.php	(revision 8152)
@@ -119,5 +119,5 @@
 }
 
-/* Return template for user template/theme*/
+/* Return template for user template/theme */
 function cf_get_template($file, $dir=CF_TEMPLATE, $prefix='') {
   global $user, $template;
