mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Fixed deprecated issues in html2pdf converter
This commit is contained in:
parent
6a917a62f8
commit
98c173a29f
@ -1383,7 +1383,8 @@ function Image($file,$x,$y,$w=0,$h=0,$type='',$link='',$paint=true)
|
||||
}
|
||||
$type=strtolower($type);
|
||||
$mqr=get_magic_quotes_runtime();
|
||||
set_magic_quotes_runtime(0);
|
||||
if(version_compare(PHP_VERSION, '5.3.0', '<'))
|
||||
set_magic_quotes_runtime(0);
|
||||
if($type=='jpg' or $type=='jpeg') $info=$this->_parsejpg($file);
|
||||
elseif($type=='png') $info=$this->_parsepng($file);
|
||||
elseif($type=='gif') $info=$this->_parsegif($file); //EDITEI - GIF format included
|
||||
@ -1394,7 +1395,8 @@ function Image($file,$x,$y,$w=0,$h=0,$type='',$link='',$paint=true)
|
||||
if(!method_exists($this,$mtd)) $this->Error('Unsupported image type: '.$type);
|
||||
$info=$this->$mtd($file);
|
||||
}
|
||||
set_magic_quotes_runtime($mqr);
|
||||
if(version_compare(PHP_VERSION, '5.3.0', '<'))
|
||||
set_magic_quotes_runtime($mqr);
|
||||
$info['i']=count($this->images)+1;
|
||||
$this->images[$file]=$info;
|
||||
}
|
||||
@ -1811,7 +1813,8 @@ function _putfonts()
|
||||
$this->_out('endobj');
|
||||
}
|
||||
$mqr=get_magic_quotes_runtime();
|
||||
set_magic_quotes_runtime(0);
|
||||
if(version_compare(PHP_VERSION, '5.3.0', '<'))
|
||||
set_magic_quotes_runtime(0);
|
||||
foreach($this->FontFiles as $file=>$info)
|
||||
{
|
||||
//Font file embedding
|
||||
@ -1834,7 +1837,8 @@ function _putfonts()
|
||||
fclose($f);
|
||||
$this->_out('endobj');
|
||||
}
|
||||
set_magic_quotes_runtime($mqr);
|
||||
if(version_compare(PHP_VERSION, '5.3.0', '<'))
|
||||
set_magic_quotes_runtime($mqr);
|
||||
foreach($this->fonts as $k=>$font)
|
||||
{
|
||||
//Font objects
|
||||
|
@ -461,13 +461,14 @@ function WriteHTML($html)
|
||||
$attr=array();
|
||||
if (!empty($contents))
|
||||
{
|
||||
foreach($contents[0] as $v)
|
||||
{
|
||||
if(ereg('^([^=]*)=["\']?([^"\']*)["\']?$',$v,$a3))
|
||||
{
|
||||
$attr[strtoupper($a3[1])]=$a3[2];
|
||||
}
|
||||
}
|
||||
foreach($contents[0] as $v)
|
||||
{
|
||||
// FIXED BY ANDRE
|
||||
//if(ereg('^([^=]*)=["\']?([^"\']*)["\']?$',$v,$a3))
|
||||
if(preg_match('/^([^=]*)=["\']?([^"\']*)["\']?$/',$v,$a3))
|
||||
$attr[strtoupper($a3[1])]=$a3[2];
|
||||
// FIXED BY ANDRE
|
||||
}
|
||||
}
|
||||
$this->OpenTag($tag,$attr);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user