projects / phoronix-test-suite.git / commitdiff
Build Results
 
Summary

Description: Unnamed repository; edit this file to name it for gitweb.
Last Change: Mon 8/30/10 20:43

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Mon 8/30/10 20:43
Michael Larabel  
 
Mon 8/30/10 20:37
Michael Larabel  
pts-core: Last minute... 
Sat 8/28/10 12:53
Michael Larabel  
pts-core: Detect if a... 
Sat 8/28/10 10:34
Michael Larabel  
pts-core: Fix test result... 
Fri 8/27/10 8:51
Michael Larabel  
pts-core: When doing a... 
Wed 8/25/10 18:46
Michael Larabel  
 
 
> --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php
index 69f1978
..4742323 100644
--- a/pts-core/functions/pts-functions.php
+++ b/pts-core/functions/pts-functions.php
@@ -448,19 +448,31 @@ function pts_request_new_id()
 function 
pts_global_upload_result($result_file$tags "")
 {
     
$benchmark_results file_get_contents($result_file);
+    
$benchmark_results str_replace(array("\n""\t"), ""$benchmark_results);
     
$switch_tags = array("Benchmark>" => "B>""Results>" => "R>""Group>" => "G>""Entry>" => "E>""Identifier>" => "I>""Value>" => "V>""System>" => "S>""Attributes>" => "A>");

     foreach(
$switch_tags as $f => $t)
         
$benchmark_results str_replace($f$t$benchmark_results);

-    
$benchmark_results str_replace(array("\n""\t"), ""$benchmark_results);
-
-    
$ToUpload rawurlencode(base64_encode($benchmark_results));
+    
$ToUpload base64_encode($benchmark_results);
     
$GlobalUser pts_current_user();
-    
$Globalkey pts_read_user_config(P_OPTION_GLOBAL_UPLOADKEY"");
-    
$tags rawurlencode(base64_encode($tags));
+    
$GlobalKey pts_read_user_config(P_OPTION_GLOBAL_UPLOADKEY"");
+    
$tags base64_encode($tags);
+    
$return_stream "";
+
+    
$upload_data = array("result_xml" => $ToUpload"global_user" => $GlobalUser"global_key" => $GlobalKey"tags" => $tags);
+    
$upload_data http_build_query($upload_data);
+
+    
$http_parameters = array("http" => array("method" => "POST""content" => $upload_data));
+
+    
$stream_context stream_context_create($http_parameters);
+    
$opened_url = @fopen("http://www.phoronix-test-suite.com/global/user-upload.php""rb"FALSE$stream_context);
+    
$response = @stream_get_contents($opened_url);
+
+    if(
$response !== false)
+        
$return_stream $response;

-    return @
file_get_contents("http://www.phoronix-test-suite.com/global/user-upload.php?result_xml=$ToUpload&global_user=$GlobalUser&global_key=$Globalkey&tags=$tags"); // Rudimentary, but works
+    return $return_stream;
 }
 function 
pts_trim_double($double$accuracy 2)
 {
<
 
Phoronix.com
Linux Driver Forums
Copyright © 2010 by Phoronix Media