Changes in directory nightlytest-serverside:

NightlyTestAccept.php updated: 1.62 -> 1.63
---
Log message:

Including new accept script file, moved database connection to a function so 
its not global.


---
Diffs of the changes:  (+18 -20)

 NightlyTestAccept.php |   38 ++++++++++++++++++--------------------
 1 files changed, 18 insertions(+), 20 deletions(-)


Index: nightlytest-serverside/NightlyTestAccept.php
diff -u nightlytest-serverside/NightlyTestAccept.php:1.62 
nightlytest-serverside/NightlyTestAccept.php:1.63
--- nightlytest-serverside/NightlyTestAccept.php:1.62   Fri Apr 13 01:18:01 2007
+++ nightlytest-serverside/NightlyTestAccept.php        Sun Apr 29 14:08:19 2007
@@ -70,29 +70,13 @@
   die();
 }
 
-if ($print_debug) {
-  print "Support Included\n";
+if(!(include"AcceptTestResults.php")){
+  print "Error: could not load necessary files!\n";
+  die();
 }
 
-/*******************************************************************************
- *
- * Important variables
- *
- 
*******************************************************************************/
-$database = "nightlytestresults";
-$loginname = "llvm";
-$password = "ll2002vm";
-
-/*******************************************************************************
- *
- * Connecting to the database
- *
- 
*******************************************************************************/
-$mysql_link = mysql_connect("127.0.0.1", $loginname, $password) or die("Error: 
could not connect to database!");
-mysql_select_db($database) or die("Error: could not find \"$database\" 
database!");
-
 if ($print_debug) {
-  print "Database connected\n";
+  print "Support Included\n";
 }
 
 
/*******************************************************************************
@@ -482,6 +466,20 @@
  *
  
*******************************************************************************/
 function acceptTest() {
+  
+  $database = "nightlytestresults";
+  $loginname = "llvm";
+  $password = "ll2002vm";
+  
+  // connect to database
+  $mysql_link = mysql_connect("127.0.0.1", $loginname, $password) or 
die("Error: could not connect to database!");
+  mysql_select_db($database) or die("Error: could not find \"$database\" 
database!");
+  
+  if ($print_debug) {
+    print "Database connected\n";
+  }
+  
+  
   if ($print_debug) {
     print "Reading _POST Variables\n";
   }



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to