Plugin Directory

Changeset 2828331


Ignore:
Timestamp:
12/04/2022 10:21:03 AM (3 years ago)
Author:
eideasy
Message:

Version 3.2

Location:
eid-easy-qualified-electonic-signature/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • eid-easy-qualified-electonic-signature/trunk/EidEasySigner.php

    r2682786 r2828331  
    113113        error_log("Starting to sign files: " . json_encode($fileLocations));
    114114
     115        // Make sure PDF generated from form fields is in the top, before other uploaded files
     116        $fileLocations = array_reverse($fileLocations);
     117
    115118        if (is_string($fileLocations)) {
    116119            $fileLocations = [$fileLocations];
     
    132135        }
    133136
    134         $files = [];
     137        $files         = [];
     138        $counter       = 1;
     139        $usedFileNames = [];
    135140        foreach ($fileLocations as $filePath) {
     141            if (is_array($filePath)) {
     142                $filePath = reset($filePath);
     143            }
    136144            $pathParts = explode(DIRECTORY_SEPARATOR, $filePath);
    137145            $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[] = [
    140157                'fileName'    => $fileName,
    141                 'mimeType'    => 'application/pdf',
     158                'mimeType'    => mime_content_type($filePath),
    142159                'fileContent' => $contents,
    143160            ];
     
    241258    }
    242259}
    243 
    244 
  • eid-easy-qualified-electonic-signature/trunk/EidEasySignerAdmin.php

    r2682786 r2828331  
    112112                <th>eID Easy client ID</th>
    113113                <td>
    114                     <input name="eideasy_client_id" size="50"
     114                    <input name="eideasy_client_id" size="50" required
    115115                           value="<?php echo esc_attr(get_option('eideasy_client_id')); ?>"/>
    116116                </td>
     
    119119                <th>eID Easy secret</th>
    120120                <td>
    121                     <input name="eideasy_secret" size="50" type="password"
     121                    <input name="eideasy_secret" size="50" type="password" required
    122122                           value="<?php echo esc_attr(get_option('eideasy_secret')); ?>"/>
    123123                </td>
     
    137137                <th>Redirect after signing</th>
    138138                <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
    140140                           value="<?php echo esc_attr(get_option('eideasy_signature_redirect')); ?>"/>
    141141                    <br>
  • eid-easy-qualified-electonic-signature/trunk/cf7-eideasy-attachment-signer.php

    r2682786 r2828331  
    44 * Plugin URI: https://eideasy.com
    55 * Description: Add Qualified Electronic Signatures to Contact Form 7 or Fluent Forms email PDF attachments.
    6  * Version: 3.1.1
     6 * Version: 3.2
    77 * Author: eID Easy
    88 * Text Domain: eid-easy
  • eid-easy-qualified-electonic-signature/trunk/readme.txt

    r2682786 r2828331  
    55Tags: fluent forms, qualified signature, electonicsignature, digitalsignature, esignature, signature, electronic signature, digital signature, qes, asice, bdoc, pades, xades, cades, eidas
    66Requires at least: 4.5
    7 Tested up to: 5.9
     7Tested up to: 6.1.1
    88Stable tag: trunk
    99License: GPLv3
     
    4141== Changelog ==
    4242
     43= 3.2 =
     44Support for signing uploaded files together with the generated PDF
     45
    4346= 3.1.1 =
    4447Tested with WP 5.9
Note: See TracChangeset for help on using the changeset viewer.