[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] pdflib and cypht email printing: fix missing variables and warnings, ...

"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68f7a063447b6_2c14b09017077@gitlab-sidekiq-low-urgency-cpu-bound-v2-d6f4b755c-m5kjn.mail>

Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
890008e7 by Victor Emanouilov at 2025-10-21T18:01:36+03:00
[FIX] pdflib and cypht email printing: fix missing variables and warnings, skip fetching empty urls as this ended up fetching blocked images over and over again the Tiki homepage

- - - - -


2 changed files:

- lib/pdflib.php
- tiki-webmail.php


Changes:

=====================================
lib/pdflib.php
=====================================
@@ -1060,7 +1060,7 @@ class PdfGenerator
         foreach ($tags as $tag) {
             $imgSrc = $tag->getAttribute('src');
             //bypassing base64 encoded images
-            if (! str_contains($imgSrc, ';base64')) {
+            if (! empty($imgSrc) && ! str_contains($imgSrc, ';base64')) {
                 //replacing image with new temp image, all these images will be unlinked after pdf creation
                 $newFile = $this->file_get_contents_by_fget($imgSrc);
                 //replacing old protected image path with temp image


=====================================
tiki-webmail.php
=====================================
@@ -91,8 +91,8 @@ if (isset($_POST['display']) && $_POST['display'] == 'pdf') {
         if (isset($_POST['uid'])) {
             $uid = $_POST['uid'];
         }
-        if (isset($_POST['list_path'])) {
-            $list_path = $_POST['list_path'];
+        if (isset($_REQUEST['list_path'])) {
+            $list_path = $_REQUEST['list_path'];
         }
         if (isset($_POST['header_subject'])) {
             $header_subject = $_POST['header_subject'];
@@ -119,6 +119,8 @@ if (isset($_POST['display']) && $_POST['display'] == 'pdf') {
         }
         if (isset($_POST['header_cc'])) {
             $header_cc = $_POST['header_cc'];
+        } else {
+            $header_cc = '';
         }
 
         $contentpage = createWebPage($header_subject, $header_date, $header_from, $header_to, $msg_text, $header_cc);
@@ -182,9 +184,9 @@ function createWebPage($header_subject, $header_date, $header_from, $header_to,
     body, td {font-size:13px}
     body{background: #fff !important;}
     a:link, a:active {color:#1155CC; text-decoration:none}
-    a:hover {text-decoration:underline; cursor: pointer} 
-    a:visited{color:##6611CC} img{border:0px} 
-    pre { white-space: pre; white-space: -moz-pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word; max-width: 800px; overflow: auto;} 
+    a:hover {text-decoration:underline; cursor: pointer}
+    a:visited{color:##6611CC} img{border:0px}
+    pre { white-space: pre; white-space: -moz-pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; word-wrap: break-word; max-width: 800px; overflow: auto;}
     .logo { left: -7px; position: relative; }
   </style>
 </head>



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/890008e7b8ed2c78e5299e5653fbda99ece9b5a3

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/890008e7b8ed2c78e5299e5653fbda99ece9b5a3
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.