includes/functions.php
changeset 842 f13bb4f21890
parent 832 7152ca0a0ce9
child 851 b98798f6572d
--- a/includes/functions.php	Thu Feb 26 01:04:27 2009 -0500
+++ b/includes/functions.php	Thu Feb 26 01:06:58 2009 -0500
@@ -53,6 +53,9 @@
   }
   
   $enano_config[$n] = $v;
+  if ( $v === false )
+    unset($enano_config[$n]);
+  
   $v = $db->escape($v);
 
   $e = $db->sql_query('DELETE FROM '.table_prefix.'config WHERE config_name=\''.$n.'\';');
@@ -61,10 +64,13 @@
     $db->_die('Error during generic setConfig() call row deletion.');
   }
 
-  $e = $db->sql_query('INSERT INTO '.table_prefix.'config(config_name, config_value) VALUES(\''.$n.'\', \''.$v.'\')');
-  if ( !$e )
-  {
-    $db->_die('Error during generic setConfig() call row insertion.');
+  if ( $v !== false )
+  {
+    $e = $db->sql_query('INSERT INTO '.table_prefix.'config(config_name, config_value) VALUES(\''.$n.'\', \''.$v.'\')');
+    if ( !$e )
+    {
+      $db->_die('Error during generic setConfig() call row insertion.');
+    }
   }
 }
 
@@ -497,6 +503,8 @@
     }
   }
   
+  ob_end_clean();
+  
   $output->set_title($lang->get('user_csrf_confirm_title'));
   $output->header();