[Tutos-commits] SF.net SVN: tutos:[1267] trunk/php
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
From: <gok...@us...> - 2014-05-09 20:02:07
|
Revision: 1267 http://sourceforge.net/p/tutos/code/1267 Author: gokohnert Date: 2014-05-09 20:02:04 +0000 (Fri, 09 May 2014) Log Message: ----------- fixing Modified Paths: -------------- trunk/php/admin_show.php trunk/php/scrum/sprint_show.php trunk/php/stc/stc_show.php Modified: trunk/php/admin_show.php =================================================================== --- trunk/php/admin_show.php 2014-05-09 20:01:17 UTC (rev 1266) +++ trunk/php/admin_show.php 2014-05-09 20:02:04 UTC (rev 1267) @@ -465,8 +465,15 @@ return $r; } $fd = fopen($tutos[errlog], 'rb'); - if ($fd === false) return $r; - $r .= '<pre>'; + if ($fd === false) { + $r .= $this->error('could not open '.$tutos[errlog]); + return $r; + } + if (0 == filesize ($tutos[errlog])) { + fclose($fd); + return 'empty '.$r; + } + $r .= '<pre>'."\n"; if (isset($_GET['filter'])) { $f = $_GET['filter']; while (!feof($fd)) { @@ -477,10 +484,10 @@ } } } else if (filesize ($tutos[errlog])) { - $r .= htmlspecialchars(fread ($fd, filesize ($tutos[errlog]))); + $r .= fread ($fd, filesize ($tutos[errlog])); } fclose($fd); - $r .= '</pre>'; + $r .= '</pre>'."\n"; return $r; } else if ( ($tutos[debug] == 1) && ($this->mode == 'sqlfile') ) { if ( ! $this->user->isAdmin() ) { @@ -492,7 +499,10 @@ return $r; } $fd = fopen($tutos[errlog].'.sql', 'rb'); - if ($fd === false) return $r; + if ($fd === false) { + $r .= $this->error('could not open '.$tutos[errlog].'.sql'); + return $r; + } $r .= '<pre>'; if (filesize ($tutos[errlog].'.sql')) { $r .= htmlspecialchars(fread ($fd, filesize ($tutos[errlog].'.sql'))); @@ -510,7 +520,10 @@ return $r; } $fd = fopen($tutos[errlog].'.mail', 'rb'); - if ($fd === false) return $r; + if ($fd === false) { + $r .= $this->error('could not open '.$tutos[errlog].'.mail'); + return $r; + } $r .= '<pre>'; if (filesize ($tutos[errlog].'.mail')) { $r .= htmlspecialchars(fread ($fd, filesize ($tutos[errlog].'.mail'))); @@ -528,7 +541,10 @@ return $r; } $fd = fopen($tutos[errlog].'.log', 'rb'); - if ($fd === false) return $r; + if ($fd === false) { + $r .= $this->error('could not open '.$tutos[errlog].'.log'); + return $r; + } if (0 == filesize ($tutos[errlog].'.log')) { fclose($fd); return $r; Modified: trunk/php/scrum/sprint_show.php =================================================================== --- trunk/php/scrum/sprint_show.php 2014-05-09 20:01:17 UTC (rev 1266) +++ trunk/php/scrum/sprint_show.php 2014-05-09 20:02:04 UTC (rev 1267) @@ -359,11 +359,11 @@ $graph = new Graph(GB_WIDTH,GB_HEIGHT*2,'auto'); + $font = jpgraph_init($graph); $graph->SetScale("datlin"); $graph->SetYScale(0,'lin'); # $graph->SetYScale(1,'lin'); $graph->img->SetMargin(50,110,20,120); - $font = jpgraph_init($graph); $graph->title->Set($lang['SprintBurndown'].': '.$this->obj->getFullName()); // ideal @@ -826,4 +826,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file Modified: trunk/php/stc/stc_show.php =================================================================== --- trunk/php/stc/stc_show.php 2014-05-09 20:01:17 UTC (rev 1266) +++ trunk/php/stc/stc_show.php 2014-05-09 20:02:04 UTC (rev 1267) @@ -110,9 +110,9 @@ $radius = (count($this->obj->states)>10 ? 70:88); $g = new CanvasGraph(400,480); + $font = jpgraph_init($g); $g->SetMargin(0,0,0,0); $g->title->SetColor('black@0.5'); - $font = jpgraph_init($g); $g->img->setFont($font,FS_NORMAL,8); $g->title->Set($lang['STC'].' '. $this->obj->getFullName()); $g->InitFrame(); @@ -325,4 +325,4 @@ <!-- SVN Info $Id$ $Author$ ---> +--> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |