[llvm-commits] CVS: nightlytest-serverside/NightlyTestAccept.php

Tanya Lattner tonic at nondot.org
Sun Apr 29 12:08:37 PDT 2007



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";
   }






More information about the llvm-commits mailing list