[Mapbender-commits] r9946 - trunk/mapbender/http/extensions/fpdf
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Aug 13 07:29:08 PDT 2018
Author: armin11
Date: 2018-08-13 07:29:08 -0700 (Mon, 13 Aug 2018)
New Revision: 9946
Modified:
trunk/mapbender/http/extensions/fpdf/fpdi.php
trunk/mapbender/http/extensions/fpdf/fpdi_pdf_parser.php
trunk/mapbender/http/extensions/fpdf/mb_fpdi.php
trunk/mapbender/http/extensions/fpdf/pdf_parser.php
Log:
Do some more fixing for php7
Modified: trunk/mapbender/http/extensions/fpdf/fpdi.php
===================================================================
--- trunk/mapbender/http/extensions/fpdf/fpdi.php 2018-08-10 12:33:00 UTC (rev 9945)
+++ trunk/mapbender/http/extensions/fpdf/fpdi.php 2018-08-13 14:29:08 UTC (rev 9946)
@@ -85,7 +85,9 @@
$fn =& $this->current_filename;
if (!isset($this->parsers[$fn]))
- $this->parsers[$fn] =& new fpdi_pdf_parser($fn,$this);
+ //$this->parsers[$fn] =& new fpdi_pdf_parser($fn,$this);
+ $newClass = new fpdi_pdf_parser($fn,$this);
+ $this->parsers[$fn] =& $newClass;
$this->current_parser =& $this->parsers[$fn];
return $this->parsers[$fn]->getPageCount();
@@ -497,4 +499,4 @@
return false;
}
-}
\ No newline at end of file
+}
Modified: trunk/mapbender/http/extensions/fpdf/fpdi_pdf_parser.php
===================================================================
--- trunk/mapbender/http/extensions/fpdf/fpdi_pdf_parser.php 2018-08-10 12:33:00 UTC (rev 9945)
+++ trunk/mapbender/http/extensions/fpdf/fpdi_pdf_parser.php 2018-08-13 14:29:08 UTC (rev 9946)
@@ -242,7 +242,8 @@
if (preg_match("/^\/[a-z85]*$/i", $_filter[1], $filterName) && @include_once('decoders'.$_filter[1].'.php')) {
$filterName = substr($_filter[1],1);
if (class_exists($filterName)) {
- $decoder =& new $filterName($this->fpdi);
+ $newClass = new $filterName($this->fpdi);
+ $decoder =& $newClass;
$stream = $decoder->decode(trim($stream));
} else {
$this->fpdi->error(sprintf("Unsupported Filter: %s",$_filter[1]));
@@ -377,4 +378,4 @@
$this->fpdi->PDFVersion = max($this->fpdi->PDFVersion, $this->pdfVersion);
}
-}
\ No newline at end of file
+}
Modified: trunk/mapbender/http/extensions/fpdf/mb_fpdi.php
===================================================================
--- trunk/mapbender/http/extensions/fpdf/mb_fpdi.php 2018-08-10 12:33:00 UTC (rev 9945)
+++ trunk/mapbender/http/extensions/fpdf/mb_fpdi.php 2018-08-13 14:29:08 UTC (rev 9946)
@@ -35,8 +35,8 @@
$type=substr($file,$pos+1);
}
$type=strtolower($type);
- $mqr=get_magic_quotes_runtime();
- set_magic_quotes_runtime(0);
+ //$mqr=get_magic_quotes_runtime();
+ //set_magic_quotes_runtime(0);
if($type=='jpg' || $type=='jpeg')
$info=$this->_parsejpg($file);
elseif($type=='png'){
@@ -51,7 +51,7 @@
$this->Error('Unsupported image type: '.$type);
$info=$this->$mtd($file);
}
- set_magic_quotes_runtime($mqr);
+ //set_magic_quotes_runtime($mqr);
if ($isMask){
$info['cs']="DeviceGray"; // try to force grayscale (instead of indexed)
Modified: trunk/mapbender/http/extensions/fpdf/pdf_parser.php
===================================================================
--- trunk/mapbender/http/extensions/fpdf/pdf_parser.php 2018-08-10 12:33:00 UTC (rev 9945)
+++ trunk/mapbender/http/extensions/fpdf/pdf_parser.php 2018-08-13 14:29:08 UTC (rev 9946)
@@ -100,8 +100,9 @@
$this->getPDFVersion();
- $this->c =& new pdf_context($this->f);
- // Read xref-Data
+ $newClass = new pdf_context($this->f);
+ $this->c =& $newClass;
+ // Read xref-Data
$this->pdf_read_xref($this->xref, $this->pdf_find_xref());
// Check for Encryption
@@ -281,7 +282,8 @@
fseek($this->f, $o_pos+$trailerPos+7);
- $c =& new pdf_context($this->f);
+ $newClass = new pdf_context($this->f);
+ $c =& $newClass;
$trailer = $this->pdf_read_value($c);
$c = null;
@@ -426,8 +428,9 @@
$e++;
if ($this->actual_obj[1][1]['/Length'][0] == PDF_TYPE_OBJREF) {
- $tmp_c =& new pdf_context($this->f);
- $tmp_length = $this->pdf_resolve_object($tmp_c,$this->actual_obj[1][1]['/Length']);
+ $newClass = new pdf_context($this->f);
+ $tmp_c =& $newClass;
+ $tmp_length = $this->pdf_resolve_object($tmp_c,$this->actual_obj[1][1]['/Length']);
$length = $tmp_length[1][1];
} else {
$length = $this->actual_obj[1][1]['/Length'][1];
@@ -687,4 +690,4 @@
}
-}
\ No newline at end of file
+}
More information about the Mapbender_commits
mailing list