From 2bd8c5f569f19697b56effd0897d5a4ef0c9824c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Fri, 14 Aug 2009 18:14:26 +0000 Subject: [PATCH] PHP 5.3 compatibility --- lam/lib/fpdf.php | 6 ------ lam/lib/tree.inc | 2 -- lam/templates/pdfedit/pdfmain.php | 3 --- 3 files changed, 11 deletions(-) diff --git a/lam/lib/fpdf.php b/lam/lib/fpdf.php index 0f846bc5..a38523d9 100644 --- a/lam/lib/fpdf.php +++ b/lam/lib/fpdf.php @@ -918,8 +918,6 @@ function Image($file,$x,$y,$w=0,$h=0,$type='',$link='') $type=substr($file,$pos+1); } $type=strtolower($type); - $mqr=get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); if($type=='jpg' || $type=='jpeg') $info=$this->_parsejpg($file); elseif($type=='png') @@ -932,7 +930,6 @@ function Image($file,$x,$y,$w=0,$h=0,$type='',$link='') $this->Error('Unsupported image type: '.$type); $info=$this->$mtd($file); } - set_magic_quotes_runtime($mqr); $info['i']=count($this->images)+1; $this->images[$file]=$info; } @@ -1173,8 +1170,6 @@ function _putfonts() $this->_out('<>'); $this->_out('endobj'); } - $mqr=get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); foreach($this->FontFiles as $file=>$info) { //Font file embedding @@ -1212,7 +1207,6 @@ function _putfonts() $this->_putstream($font); $this->_out('endobj'); } - set_magic_quotes_runtime($mqr); foreach($this->fonts as $k=>$font) { //Font objects diff --git a/lam/lib/tree.inc b/lam/lib/tree.inc index b8302dfa..8af3b227 100644 --- a/lam/lib/tree.inc +++ b/lam/lib/tree.inc @@ -171,8 +171,6 @@ function draw_server_tree() */ function initialize_session_tree() { - // From the PHP manual: If you use $_SESSION don't use - // session_register(), session_is_registered() or session_unregister()! if( ! array_key_exists( 'tree', $_SESSION ) ) $_SESSION['tree'] = array(); if( ! array_key_exists( 'tree_icons', $_SESSION ) ) diff --git a/lam/templates/pdfedit/pdfmain.php b/lam/templates/pdfedit/pdfmain.php index 6a78119a..bdcf6b4a 100644 --- a/lam/templates/pdfedit/pdfmain.php +++ b/lam/templates/pdfedit/pdfmain.php @@ -49,9 +49,6 @@ setlanguage(); // Unset pdf structure definitions in session if set if(isset($_SESSION['currentPDFStructure'])) { - session_unregister('currentPDFStructure'); - session_unregister('availablePDFFields'); - session_unregister('currentPageDefinitions'); unset($_SESSION['currentPDFStructure']); unset($_SESSION['availablePDFFields']); unset($_SESSION['currentPageDefinitions']);