diff -urNp ./trace_orig/trace.admin.inc ./trace/trace.admin.inc
--- ./trace_orig/trace.admin.inc	2006-12-03 15:41:59.000000000 +0200
+++ ./trace/trace.admin.inc	2007-04-23 17:18:54.000000000 +0300
@@ -13,9 +13,9 @@
  */
 function trace_settings_form($form = array()) {
   // Make sure the output file exists to prevent chaos later on
-  $trace_output = (!empty($_POST['edit']) ? $_POST['edit']['trace_file'] : TRACE_OUTPUT);
+  $trace_output = (!empty($_POST['trace_output']) ? $_POST['trace_output'] : TRACE_OUTPUT);
   if ($trace_output == 'file') {
-    $trace_file = (!empty($_POST['edit']) ? $_POST['edit']['trace_file'] : TRACE_FILE);
+    $trace_file = (!empty($_POST['trace_file']) ? $_POST['trace_file'] : TRACE_FILE);
     $trace_dir = dirname($trace_file); // to avoid E_STRICT on file_check_directory()
     file_check_directory($trace_dir, TRUE, 'trace_file');
   }
@@ -24,7 +24,7 @@ function trace_settings_form($form = arr
   require_once TRACE_PATH . '/trace.api.inc';
   $hook_choices = array();
   foreach (trace_hook_data() as $module => $hooks) {
-    if ($module == 'drupal' || module_exist($module)) {
+    if ($module == 'drupal' || module_exists($module)) {
       foreach ($hooks as $hook => $versions) {
         $package = ($module == 'drupal' ? 'Core' : 'Other');
         $hook_choices[$hook] = t($package . ' - ' . $hook);
@@ -150,8 +150,18 @@ function trace_settings_form($form = arr
     '#options'       => array(FALSE => t('Disabled'), TRUE => t('Enabled')),
     '#description'   => t('Whether to include the source code for the line and file where the PHP error occurred.'),
   );
-
+	$form['submit'] = array(
+		'#type'=>'submit',
+		'#value'=>t('Submit')
+	);
   return $form;
 }
 
 //////////////////////////////////////////////////////////////////////////////
+
+function trace_settings_submit($form_id, $form_values){
+	unset($form_values['op'],$form_values['submit'],$form_values['form_id'],$form_values['form_token']);
+	foreach ($form_values as $vname=>$data){
+		variable_set($vname,$data);
+	}
+}
diff -urNp ./trace_orig/trace.module ./trace/trace.module
--- ./trace_orig/trace.module	2006-12-03 16:20:58.000000000 +0200
+++ ./trace/trace.module	2007-04-23 17:20:58.000000000 +0300
@@ -58,7 +58,16 @@ function trace_menu($may_cache) {
   if (TRACE_ACTIVE && TRACE_HOOKS) {
     trace_hook('menu');
   }
-
+	if ($may_cache){
+		$items[] = Array(
+      'path' => 'admin/settings/trace',
+      'title' => t('Trace'),
+      'description' => t('Trace module settings.'),
+      'callback' => 'drupal_get_form',
+      'callback arguments' => array('trace_settings'),
+		);
+	}
+	return $items;
   // TODO: add admin/settings/trace handler for Drupal 5.0.
 }
 
