From e2e95b5f8cf2e581c975579274797db55e18f6fc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Mar 2015 03:58:57 +0100 Subject: [PATCH] phpcs --- htdocs/core/class/dolgraph.class.php | 106 +++++++++++++-------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 5451d7457ce..d783445f276 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -65,7 +65,7 @@ class DolGraph var $bgcolorgrid=array(255,255,255); // array(R,G,B) var $datacolor; // array(array(R,G,B),...) - protected $_stringtoshow; // To store string to output graph into HTML page + protected $stringtoshow; // To store string to output graph into HTML page /** @@ -774,7 +774,7 @@ class DolGraph // Generate file $graph->draw($file); - $this->_stringtoshow=''.dol_escape_htmltag($this->title?$this->title:$this->YLabel).''; + $this->stringtoshow=''.dol_escape_htmltag($this->title?$this->title:$this->YLabel).''; } @@ -847,18 +847,18 @@ class DolGraph } $tag=dol_escape_htmltag(dol_string_unaccent(dol_string_nospecial(basename($file),'_',array('-','.')))); - $this->_stringtoshow =''."\n"; - if (! empty($this->title)) $this->_stringtoshow.='
'.$this->title.'
'; - $this->_stringtoshow.='
'."\n"; - $this->_stringtoshow.=''."\n"; + $this->stringtoshow.='plotWithOptions_'.$tag.'();'."\n"; + $this->stringtoshow.='});'."\n"; + $this->stringtoshow.=''."\n"; } @@ -1019,10 +1019,10 @@ class DolGraph */ function show() { - return $this->_stringtoshow; + return $this->stringtoshow; } - + /** * getDefaultGraphSizeForStats * @@ -1033,18 +1033,18 @@ class DolGraph static function getDefaultGraphSizeForStats($direction,$defaultsize='') { global $conf; - + if ($direction == 'width') { if (empty($conf->dol_optimize_smallscreen)) return ($defaultsize ? $defaultsize : '500'); else return (empty($_SESSION['dol_screen_width']) ? '280' : ($_SESSION['dol_screen_width']-40)); } - if ($direction == 'height') + if ($direction == 'height') { return (empty($conf->dol_optimize_smallscreen)?($defaultsize?$defaultsize:'200'):'160'); } return 0; } - + }