phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc class.gdgraph.inc.php class.gdimag...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] phpgwapi/inc class.gdgraph.inc.php class.gdimag...
Date: Sun, 26 Nov 2006 22:22:01 +0000

CVSROOT:        /sources/phpgwapi
Module name:    phpgwapi
Changes by:     Sigurd Nes <sigurdne>   06/11/26 22:22:01

Modified files:
        inc            : class.gdgraph.inc.php class.gdimage.inc.php 
                         class.common.inc.php 

Log message:
        notice

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.gdgraph.inc.php?cvsroot=phpgwapi&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.gdimage.inc.php?cvsroot=phpgwapi&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.common.inc.php?cvsroot=phpgwapi&r1=1.249&r2=1.250

Patches:
Index: class.gdgraph.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.gdgraph.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- class.gdgraph.inc.php       3 Sep 2006 06:15:27 -0000       1.21
+++ class.gdgraph.inc.php       26 Nov 2006 22:22:01 -0000      1.22
@@ -6,7 +6,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgwapi
        * @subpackage gui
-       * @version $Id: class.gdgraph.inc.php,v 1.21 2006/09/03 06:15:27 
skwashd Exp $
+       * @version $Id: class.gdgraph.inc.php,v 1.22 2006/11/26 22:22:01 
sigurdne Exp $
        * @internal This class based on boGraph.php3 - Double Choco Latte - 
Source Configuration Management System Copyright (C) 1999  Michael L. Dean & 
Tim R. Norman
        */
 
@@ -469,7 +469,7 @@
                        {
                        foreach($this->data as $line)
                        {
-                               if($line['extracolor'])
+                               if(isset($line['extracolor']) && 
$line['extracolor'])
                                {
                                        
$this->img->SetColorByName($line['extracolor']);
                                }
@@ -484,7 +484,7 @@
                                $linespace = ($this->graph_height - 
$this->margin_top - $this->margin_bottom) / ($this->num_lines_y - 1);
 
                                $y1 = $y2 = $this->graph_height - 
$this->margin_bottom - ($i * $linespace);
-                               $py = $line['f_sdate']?$y2:$py; // previous
+                               $py = isset($line['f_sdate'])?$y2:$py; // 
previous
 
                                $linespace = ($this->graph_width - 
$this->margin_left - $this->margin_right) / ($this->num_lines_x - 1);
 
@@ -559,7 +559,7 @@
                                                                echo 'PRO edate 
== x edate! pro_edate = ' . $line['edate'] . '<br>';
                                                        }
                                                        $x2 = $y * $linespace + 
$this->margin_left;
-                                                       $px = 
$line['f_sdate']?$x2:$px;
+                                                       $px = 
isset($line['f_sdate'])?$x2:$px;
                                                }
                                                else if($line['edate'] >= 
$this->line_captions_x[$y]['date'] && $line['edate'] <= 
$this->line_captions_x[$y+1]['date'])
                                                {
@@ -706,7 +706,7 @@
                        $space = 1;
                        foreach($this->data as $ytext)
                        {
-                               if($ytext['extracolor'])
+                               if(isset($ytext['extracolor']) && 
$ytext['extracolor'])
                                {
                                        
$this->img->SetColorByName($ytext['extracolor']);
                                }
@@ -763,7 +763,7 @@
 
                                foreach($this->color_legend as $legend)
                                {
-                                       if($legend['extracolor'])
+                                       if(isset($legend['extracolor']) && 
$legend['extracolor'])
                                        {
                                                
$this->img->SetColorByName($legend['extracolor']);
                                        }
@@ -781,7 +781,7 @@
                        $img_file = $this->img->save_img();
                        $this->img->Done();
                        return array('img_file' => $img_file,
-                                               'img_map'       => $gantt_map);
+                                               'img_map'       => 
(isset($gantt_map)?$gantt_map:array()));
                }
 
                function Open()

Index: class.gdimage.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.gdimage.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- class.gdimage.inc.php       3 Sep 2006 06:15:27 -0000       1.12
+++ class.gdimage.inc.php       26 Nov 2006 22:22:01 -0000      1.13
@@ -6,7 +6,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgwapi
        * @subpackage gui
-       * @version $Id: class.gdimage.inc.php,v 1.12 2006/09/03 06:15:27 
skwashd Exp $
+       * @version $Id: class.gdimage.inc.php,v 1.13 2006/11/26 22:22:01 
sigurdne Exp $
        * @internal This class based on htmlGD.php3 - Double Choco Latte - 
Source Configuration Management System - Copyright (C) 1999  Michael L. Dean & 
Tim R. Norman
        */
 
@@ -29,6 +29,7 @@
                var $colormap;
                var $hColor;
                var $font;
+               var $temp_file;
 
                function gdimage()
                {
@@ -51,6 +52,7 @@
                        $this->font = 0;
                        $this->type = 'png';                    
                        $this->temp_dir = PHPGW_SERVER_ROOT . SEP . 'phpgwapi' 
. SEP . 'images' . SEP;
+//                     $this->temp_dir = 
$GLOBALS['phpgw_info']['server']['temp_dir'] . SEP;
                }
 
                function check_gd()
@@ -91,7 +93,8 @@
                {
                        $name = 'draw_tmp_' . 
$GLOBALS['phpgw_info']['user']['account_id'] . '_';
                        srand((double)microtime()*1000000);
-                       return($this->tmpdir . $name . rand(1,100000));
+       //              return($this->tmpdir . $name . rand(1,100000));
+                       return($name . rand(1,100000));
                }
 
                function MoveTo($x, $y)

Index: class.common.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.249
retrieving revision 1.250
diff -u -b -r1.249 -r1.250
--- class.common.inc.php        10 Nov 2006 13:33:49 -0000      1.249
+++ class.common.inc.php        26 Nov 2006 22:22:01 -0000      1.250
@@ -8,7 +8,7 @@
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage utilities
-       * @version $Id: class.common.inc.php,v 1.249 2006/11/10 13:33:49 
sigurdne Exp $
+       * @version $Id: class.common.inc.php,v 1.250 2006/11/26 22:22:01 
sigurdne Exp $
        */
 
        /**
@@ -1434,6 +1434,7 @@
                function formattime($hour,$min,$sec='')
                {
                        $h12 = $hour;
+                       $ampm = '';
                        if 
($GLOBALS['phpgw_info']['user']['preferences']['common']['timeformat'] == '12')
                        {
                                if ($hour >= 12) 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]