Änderungen https Andy Müller rückgängig gemacht
This commit is contained in:
@ -1770,16 +1770,16 @@ class HTML2PDF_parsingCss
|
||||
// get the content of the css file
|
||||
$content = @file_get_contents($url);
|
||||
|
||||
// if "https://" in the url
|
||||
if (strpos($url, 'https://')!==false) {
|
||||
// if "http://" in the url
|
||||
if (strpos($url, 'http://')!==false) {
|
||||
|
||||
// get the domain "https://xxx/"
|
||||
$url = str_replace('https://', '', $url);
|
||||
// get the domain "http://xxx/"
|
||||
$url = str_replace('http://', '', $url);
|
||||
$url = explode('/', $url);
|
||||
$urlMain = 'https://'.$url[0].'/';
|
||||
$urlMain = 'http://'.$url[0].'/';
|
||||
|
||||
// get the absolute url of the path
|
||||
$urlSelf = $url; unset($urlSelf[count($urlSelf)-1]); $urlSelf = 'https://'.implode('/', $urlSelf).'/';
|
||||
$urlSelf = $url; unset($urlSelf[count($urlSelf)-1]); $urlSelf = 'http://'.implode('/', $urlSelf).'/';
|
||||
|
||||
// adapt the url in the css content
|
||||
$content = preg_replace('/url\(([^\\\\][^)]*)\)/isU', 'url('.$urlSelf.'$1)', $content);
|
||||
|
@ -25,8 +25,8 @@
|
||||
* Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
|
||||
* @package com.tecnick.tcpdf
|
||||
* @version 4.0.014
|
||||
* @link https://tcpdf.sourceforge.net
|
||||
* @license https://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @link http://tcpdf.sourceforge.net
|
||||
* @license http://www.gnu.org/copyleft/lesser.html LGPL
|
||||
* @since 2004-10-27
|
||||
*/
|
||||
|
||||
@ -67,14 +67,14 @@ if (!defined('K_TCPDF_EXTERNAL_CONFIG')) {
|
||||
if (isset($_SERVER['HTTPS']) AND (!empty($_SERVER['HTTPS'])) AND strtolower($_SERVER['HTTPS'])!='off') {
|
||||
$kPathUrl = 'https://';
|
||||
} else {
|
||||
$kPathUrl = 'https://';
|
||||
$kPathUrl = 'http://';
|
||||
}
|
||||
$kPathUrl .= $_SERVER['HTTP_HOST'];
|
||||
$kPathUrl .= str_replace('\\', '/', substr(K_PATH_MAIN, (strlen($_SERVER['DOCUMENT_ROOT']) - 1)));
|
||||
}
|
||||
|
||||
/**
|
||||
* URL path to tcpdf installation folder (https://localhost/tcpdf/).
|
||||
* URL path to tcpdf installation folder (http://localhost/tcpdf/).
|
||||
* By default it is automatically calculated but you can also set it as a fixed string to improve performances.
|
||||
*/
|
||||
define('K_PATH_URL', $kPathUrl);
|
||||
|
Reference in New Issue
Block a user