Changeset 2828331
- Timestamp:
- 12/04/2022 10:21:03 AM (3 years ago)
- Location:
- eid-easy-qualified-electonic-signature/trunk
- Files:
-
- 4 edited
-
EidEasySigner.php (modified) (3 diffs)
-
EidEasySignerAdmin.php (modified) (3 diffs)
-
cf7-eideasy-attachment-signer.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eid-easy-qualified-electonic-signature/trunk/EidEasySigner.php
r2682786 r2828331 113 113 error_log("Starting to sign files: " . json_encode($fileLocations)); 114 114 115 // Make sure PDF generated from form fields is in the top, before other uploaded files 116 $fileLocations = array_reverse($fileLocations); 117 115 118 if (is_string($fileLocations)) { 116 119 $fileLocations = [$fileLocations]; … … 132 135 } 133 136 134 $files = []; 137 $files = []; 138 $counter = 1; 139 $usedFileNames = []; 135 140 foreach ($fileLocations as $filePath) { 141 if (is_array($filePath)) { 142 $filePath = reset($filePath); 143 } 136 144 $pathParts = explode(DIRECTORY_SEPARATOR, $filePath); 137 145 $fileName = $pathParts[count($pathParts) - 1]; 138 $contents = base64_encode(file_get_contents($filePath)); 139 $files[] = [ 146 147 // Handle duplicate file names 148 while (isset($usedFileNames[$fileName])) { 149 $fileName = $counter . "_" . $fileName; 150 $counter++; 151 } 152 $usedFileNames[$fileName] = $fileName; 153 154 $contents = base64_encode(file_get_contents($filePath)); 155 156 $files[] = [ 140 157 'fileName' => $fileName, 141 'mimeType' => 'application/pdf',158 'mimeType' => mime_content_type($filePath), 142 159 'fileContent' => $contents, 143 160 ]; … … 241 258 } 242 259 } 243 244 -
eid-easy-qualified-electonic-signature/trunk/EidEasySignerAdmin.php
r2682786 r2828331 112 112 <th>eID Easy client ID</th> 113 113 <td> 114 <input name="eideasy_client_id" size="50" 114 <input name="eideasy_client_id" size="50" required 115 115 value="<?php echo esc_attr(get_option('eideasy_client_id')); ?>"/> 116 116 </td> … … 119 119 <th>eID Easy secret</th> 120 120 <td> 121 <input name="eideasy_secret" size="50" type="password" 121 <input name="eideasy_secret" size="50" type="password" required 122 122 value="<?php echo esc_attr(get_option('eideasy_secret')); ?>"/> 123 123 </td> … … 137 137 <th>Redirect after signing</th> 138 138 <td> 139 <input name="eideasy_signature_redirect" size="50" placeholder="https://example.com/thank-you" 139 <input name="eideasy_signature_redirect" size="50" placeholder="https://example.com/thank-you" required 140 140 value="<?php echo esc_attr(get_option('eideasy_signature_redirect')); ?>"/> 141 141 <br> -
eid-easy-qualified-electonic-signature/trunk/cf7-eideasy-attachment-signer.php
r2682786 r2828331 4 4 * Plugin URI: https://eideasy.com 5 5 * Description: Add Qualified Electronic Signatures to Contact Form 7 or Fluent Forms email PDF attachments. 6 * Version: 3. 1.16 * Version: 3.2 7 7 * Author: eID Easy 8 8 * Text Domain: eid-easy -
eid-easy-qualified-electonic-signature/trunk/readme.txt
r2682786 r2828331 5 5 Tags: fluent forms, qualified signature, electonicsignature, digitalsignature, esignature, signature, electronic signature, digital signature, qes, asice, bdoc, pades, xades, cades, eidas 6 6 Requires at least: 4.5 7 Tested up to: 5.97 Tested up to: 6.1.1 8 8 Stable tag: trunk 9 9 License: GPLv3 … … 41 41 == Changelog == 42 42 43 = 3.2 = 44 Support for signing uploaded files together with the generated PDF 45 43 46 = 3.1.1 = 44 47 Tested with WP 5.9
Note: See TracChangeset
for help on using the changeset viewer.