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

Description: Unnamed repository; edit this file to name it for gitweb.
Last Change: Wed 2/3/10 13:04

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Wed 2/3/10 13:04
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 12:38
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 12:27
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 9:26
Michael Larabel  
pts: Drop MD5 hashes in... 
Tue 2/2/10 23:43
Michael Larabel  
phoromatic: Add... 
Tue 2/2/10 23:35
Michael Larabel  
pts-core: Phoromatic... 
 
> --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php
index 8104c0e
..fd43149 100644
--- a/pts-core/functions/pts-functions.php
+++ b/pts-core/functions/pts-functions.php
@@ -378,+378,11 @@ function pts_bool_question($question$default true)

     return 
$answer;
 }
+function 
pts_clean_information_string($str)
+{
+    
$remove_phrases = array("Corporation ""Technologies ""Technology ""Processor ""processor ""Genuine ""(R)""(TM)""(tm)""Inc. ""Inc ");
+
+    return 
str_replace($remove_phrases""$str);
+}

 
?>
diff --git a/pts-core/functions/pts-functions_linux.php b/pts-core/functions/pts-functions_linux.php
index 676b1e5..5d08edd 100644
--- a/pts-core/functions/pts-functions_linux.php
+++ b/pts-core/functions/pts-functions_linux.php
@@ -41,7 +41,7 @@ function processor_string()
         $info = file_get_contents("/proc/cpuinfo");
         $info = substr($info, strpos($info, "model name"));
         $info = trim(substr($info, strpos($info, ":") + 1, strpos($info, "\n") - strpos($info, ":")));
-        $info = str_replace(array("Corporation ", "Technologies ", "Processor ", "processor ", "(R)", "(TM)", "(tm)", "Technology "), "", $info);
+        $info = pts_clean_information_string($info);
     }
     else
         $info = "Unknown";
@@ -200,7 +200,7 @@ function parse_lspci_output($desc)
         if(($strlen = strlen($info)) < 6 || $strlen > 96)
             $info = "N/A";
         else
-            $info = str_replace(array("Corporation ", "Technologies ", "(R)", "(TM)", "(tm)", "Inc. ", ",", "Technology "), "", $info);
+            $info = pts_clean_information_string($info);
     }

   &n
 
Phoronix.com
Linux Driver Forums
Copyright © 2010 by Phoronix Media