Index: simpletestauto_server.module
===================================================================
--- simpletestauto_server.module	(revision 19)
+++ simpletestauto_server.module	(working copy)
@@ -1,5 +1,5 @@
 <?php
-
+//$Id$
 define('STA_PASS', 0);
 define('STA_FAIL', 1);
 define('STA_ERROR', 2);
@@ -12,7 +12,7 @@
 function simpletestauto_server_help($section='')  {
    $output = "";
    
-   switch($section) {
+   switch ($section) {
      case "admin/modules#description";
        $output = t("Simpletest automation test server");
        break;
@@ -68,11 +68,11 @@
  * Used to unset password fields if they are empty
  */
 function simpletestauto_server_form_alter($form_id, &$form) {
-  if($_POST['edit']['form_id'] == "simpletestauto_server_admin_settings") {
-  	$edit = $_POST['edit'];
-  	if ($edit['simpletestauto_server_pwd']['pass1'] == $edit['simpletestauto_server_pwd']['pass2'] && $edit['simpletestauto_server_pwd']['pass1'] == "") {
-  	  unset($form['simpletestauto_server_pwd']);
-  	}
+  if ($_POST['edit']['form_id'] == "simpletestauto_server_admin_settings") {
+    $edit = $_POST['edit'];
+    if ($edit['simpletestauto_server_pwd']['pass1'] == $edit['simpletestauto_server_pwd']['pass2'] && $edit['simpletestauto_server_pwd']['pass1'] == "") {
+      unset($form['simpletestauto_server_pwd']);
+    }
   }
 }
 
@@ -89,13 +89,13 @@
   $test_dir = $simpletest_install_dir;
   $dirs = file_scan_directory($test_dir, '\clean$');
   $removed_strings = array($test_dir, 'clean');
-  foreach($dirs as $instance_dir) {
+  foreach ($dirs as $instance_dir) {
     $dir = $instance_dir->filename;
-	$instance = trim(str_replace($removed_strings,'',$dir),'/');
-	$exec_cmd = $bins['mysqladmin'] . " -f -u $db_user -p$db_pass drop $instance";
-	exec($exec_cmd, $output, $status);
-	$exec_cmd = "rm -rf $test_dir/$instance";
-	exec($exec_cmd, $output, $status);
+    $instance = trim(str_replace($removed_strings, '', $dir), '/');
+    $exec_cmd = $bins['mysqladmin'] ." -f -u $db_user -p$db_pass drop $instance";
+    exec($exec_cmd, $output, $status);
+    $exec_cmd = "rm -rf $test_dir/$instance";
+    exec($exec_cmd, $output, $status);
   }
 }
 
@@ -104,9 +104,9 @@
  * Used on testserver side to receive 
  */
 function simpletestauto_server_xmlrpc() {
-	$handlers = array();
-    $handlers['simpletestautoServer.testPatch'] = 'simpletestauto_server_testPatch';
-	return $handlers;
+  $handlers = array();
+  $handlers['simpletestautoServer.testPatch'] = 'simpletestauto_server_test_patch';
+  return $handlers;
 }
 
 /**
@@ -116,7 +116,7 @@
  * @param $password Password which is needed to authenticate that server sending the request is valid.
  * @param $nid Id of the node we wish to test.
  */
-function simpletestauto_server_testPatch($password, $nid) {
+function simpletestauto_server_test_patch($password, $nid) {
   global $base_url;
   watchdog('test_it', "Test request for " . $nid, WATCHDOG_NOTICE);
   $path = drupal_get_path('module', 'simpletestauto');
@@ -125,9 +125,9 @@
   }
   if ( $password == sha1(variable_get('simpletestauto_server_pwd', ''))) {
     $test_it_path = drupal_get_path('module', 'simpletestauto_server');
-  	stq_add($nid);
-  	exec($bins['phpExec'] . " $test_it_path/test_it.php > /dev/null &");
-	return TRUE;
+    stq_add($nid);
+    exec($bins['phpExec'] ." $test_it_path/test_it.php > /dev/null &");
+    return TRUE;
   } 
   else {
     return "Error: Wrong simpletestauto server password please check your settings"; 
