Author: vip
Date: Thu Oct  8 15:05:56 2009
New Revision: 10722

Modified:
   toys/stbr/index.php
Log:
- pass url in tmp file
- different descriptions when status unknown


Modified: toys/stbr/index.php
==============================================================================
--- toys/stbr/index.php (original)
+++ toys/stbr/index.php Thu Oct  8 15:05:56 2009
@@ -1,5 +1,7 @@
 <?
+header('Content-type: text/html; charset=utf-8');
 error_reporting(E_ALL);
+#setlocale(LC_ALL, 'C');
 ob_start("ob_gzhandler");
 $db = sqlite_open("../db/stbrlog.db");
 
@@ -360,9 +362,23 @@
 
                        foreach($filled['builder'] as $key => $value)
                        {
-                               $url = `./buildlog_link.py {$q['line']} 
{$filled['no']} {$key}`;
-                               $url = urlencode(trim($url));
-                               $title .= $value . " @ [a href=&quot;" . $url . 
"&quot;]" . $key . "[/a][br/]";
+                               $randname = '/tmp/stbr-' . rand();
+                               $url = `./buildlog_link.py {$q['line']} 
{$filled['no']} {$key} $randname`;
+
+                               $url = file_get_contents($randname);
+
+                               if(empty($url))
+                               {
+                                       $request_status_unknown = true;
+                                       $title .= $value . " @ " . $key . 
"[br/]";
+                               }
+                               else
+                               {
+                                       $url = urlencode(trim($url));
+                                       $title .= $value . " @ [a href=&quot;" 
. $url . "&quot;]" . $key . "[/a][br/]";
+                               }
+                               unlink($randname);
+
                                if($value === '?')
                                        $request_status_unknown = true;
                        }
@@ -389,6 +405,7 @@
 
                        // check for src builder status
                        $src_status = `./src-builder-status.py {$q['line']} 
{$q['aspec']}`;
+                       //$src_status = `./src-builder-status-maildir.py 
{$q['line']} {$q['aspec']}`;
 
                        if(trim($src_status) == 'FAILED')
                        {
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to