Plugin Directory

Changeset 3250449


Ignore:
Timestamp:
03/04/2025 01:40:47 PM (11 months ago)
Author:
Tussendoor
Message:

##### 5.2.0
Updated: Jquery for more native JS implementation.
Fixed: Autofill issues for CF7 when generating fields.

Location:
open-rdw-kenteken-voertuiginformatie/trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • open-rdw-kenteken-voertuiginformatie/trunk/admin/js/open-rdw-kenteken-voertuiginformatie-admin.js

    r3148441 r3250449  
    1 (function( $ ) {
     1(function ($) {
    22    'use strict';
    33
    44    document.addEventListener('DOMContentLoaded', function () {
    5         /**
    6          * Enables us to toggle the field categories
    7          */
    8         $(document).on('click', '.rdw-expand-fields a', function(e) {
     5        // Field category toggling
     6        $(document).on('click', '.rdw-expand-fields a', function (e) {
    97            e.preventDefault();
    108            $(this).next().slideToggle('fast', 'linear');
    119        });
    1210
    13         /**
    14          * Enables us to select all checkboxes in one go per categorie
    15          */
    16         $(document).on('click', '.rdw-sort-fields input[type=checkbox]', function(e) {
    17             $(this).parent().find('li input[type=checkbox]').prop('checked', $(this).is(':checked'));
    18             var sibs = false;
    19 
    20             $(this).closest('ul').children('li').each(function () {
    21                 if($('input[type=checkbox]', this).is(':checked')) sibs=true;
    22             });
    23 
    24             $(this).parents('ul').prev().prop('checked', sibs);
    25         });
    26 
    27         /**
    28          * Switches to clicked tab in the back-end when clicked.
    29          */
    30         $(document).on('click', '.nav-tabs li', function(e) {
     11        // Add this new code to handle field selection
     12        $(document).on('click', '.rdw-expand-fields input[type="text"]', function (e) {
     13            // Prevent propagation to avoid conflicts with other click events
     14            e.stopPropagation();
     15
     16            // Select the input text
     17            this.select();
     18
     19            // Optional: Copy to clipboard on modern browsers
     20            try {
     21                const successful = document.execCommand('copy');
     22                if (successful) {
     23                    // Visual feedback (briefly change background color)
     24                    const $this = $(this);
     25                    const originalColor = $this.css('background-color');
     26
     27                    $this.css('background-color', '#d7ffb8');
     28                    setTimeout(function () {
     29                        $this.css('background-color', originalColor);
     30                    }, 300);
     31                }
     32            } catch (err) {
     33                // Silent fail - just selection will work
     34            }
     35        });
     36
     37        $(document).on('click', '.cf-7-row-expand li ul li input[type="text"]', function (e) {
    3138            e.preventDefault();
    32             var target = this;
    33 
    34             if (!$(this).hasClass('active')) {
    35                 $($('.active').find('a').attr('href')).fadeOut('fast', 'linear', function() {
    36                     $($(target).find('a').attr('href')).fadeIn('fast', 'linear');
    37                     $('.active').removeClass('active');
    38                     $(target).addClass('active');
    39                 });
     39            e.stopPropagation();
     40
     41            // Get the field value (format: "[text field_key]")
     42            const fieldValue = $(this).val();
     43
     44            // Extract the field key from the value
     45            const fieldMatch = fieldValue.match(/\[text\s+([^\]]+)\]/);
     46            const fieldKey = fieldMatch ? fieldMatch[1] : '';
     47
     48            // Get the name from the form for reference only
     49            const formTagName = $('.control-box .tg-name').val() || 'kenteken';
     50
     51            // Check if the "Required field" checkbox is checked
     52            const isRequired = $('.control-box input[name="required"]').is(':checked');
     53
     54            // Generate the tag syntax in the new format
     55            let tagText = '';
     56            if (fieldKey) {
     57                // Create tag with asterisk if required is checked
     58                tagText = `[text${isRequired ? '*' : ''} ${fieldKey} id:${fieldKey}]`;
     59            } else if (fieldValue) {
     60                // Fallback to basic text field
     61                tagText = `[text${isRequired ? '*' : ''} ${formTagName}]`;
    4062            }
    41         });
    42 
    43         $(document).on('click', '#app-container .open-rdw-kenteken-voertuiginformatie .save-changes', function(e) {
     63
     64            // Set the generated tag to the tag input
     65            $('.rdw-insert-box .tag').val(tagText);
     66
     67            // Update the mail tag - use the field key as the mail tag
     68            $('.rdw-insert-box .mail-tag').text(fieldKey || formTagName);
     69
     70            // Select the tag text
     71            $('.rdw-insert-box .tag').select();
     72        });
     73
     74        // Handle Insert Tag button click
     75        $(document).on('click', '.rdw-insert-box .insert-tag', function (e) {
    4476            e.preventDefault();
    4577
    46             if ($('#formatters-doc').is(':visible')) {
    47                 return saveFormatters();
     78            const tag = $('.rdw-insert-box .tag').val();
     79            if (tag) {
     80                // Use the CF7 built-in function to insert the tag
     81                if (typeof wpcf7.taggen !== 'undefined' && typeof wpcf7.taggen.insert === 'function') {
     82                    wpcf7.taggen.insert(tag);
     83                } else {
     84                    // Fallback for older CF7 versions
     85                    const $form = $('textarea.tag-generator-panel-active');
     86                    if ($form.length > 0) {
     87                        $form.each(function () {
     88                            const caret = this.selectionStart;
     89                            const value = this.value;
     90                            this.value = value.substring(0, caret) + tag + value.substring(caret);
     91                            this.setSelectionRange(caret + tag.length, caret + tag.length);
     92                            this.focus();
     93                        });
     94                    }
     95                }
     96                tb_remove(); // Close the thickbox
    4897            }
    49 
    50             if ($('#dashboard-doc').is(':hidden')) {
    51                 return;
    52             }
    53 
    54             $("body").css("cursor", "progress");
    55 
    56             var useCPT = false;
    57             if ($('#app-container #useCPT').is(':checked')) {
    58                 useCPT = true;
    59             }
    60 
    61             var inputData = {
    62                 license: $('#app-container #rdw_license').val(),
    63                 useCPT: useCPT,
    64                 cptKeyword: $('#app-container #cptKeyword').val(),
    65                 brandKeyword: $('#app-container #brandKeyword').val(),
    66                 modelKeyword: $('#app-container #modelKeyword').val(),
    67                 cfLink: $('#app-container #cfLink').val(),
    68             };
    69 
    70             var data = {
    71                 action: 'rdw_save_changes',
    72                 options: inputData,
    73             };
    74 
    75             $.post(ajaxurl, data, function(res) {
    76                 if (res.success == true) {
    77                     $('#app-container .save-changes').css('background-color', '#46b450');
    78                 }
    79             }).fail(function() {
    80                 $('#app-container .save-changes').css('background-color', '#d54e21');
    81             }).always(function() {
    82                 $("body").css("cursor", "default");
    83                 setTimeout(function() {
    84                     $('#app-container .save-changes').css('background-color', '#428bca');
    85                 },2000);
    86             });
    87         });
    88 
    89         function addFormatterRow(e) {
    90             e.preventDefault();
    91 
    92             var fieldName = $('select[name=rdw_field_name]').val();
    93             var type = $('select[name=rdw_formatter_type]').val();
    94 
    95             if (fieldName == '' || type == '') {
    96                 return alert('Ongeldige veldnaam of formatter type');
    97             }
    98 
    99             // Remove the table header, remove the hidden blueprint.
    100             var formatterCount = $('.formatter_table tr').length - 2;
    101             var inputName = 'formatter['+(formatterCount + 1)+']';
    102 
    103             var tableRow = $('.formatter_table_blueprint').clone();
    104             tableRow.find('.formatter_field').prepend(fieldName);
    105             tableRow.find('.formatter_field input').val(fieldName)
    106                 .attr('name', inputName+'[name]');
    107 
    108             tableRow.find('.formatter_type').prepend(type);
    109             tableRow.find('.formatter_type input').val(type)
    110                 .attr('name', inputName+'[type]');
    111 
    112             if (type == 'callback') {
    113                 tableRow.find('.formatter_callback input').attr('name', inputName+'[callback]');
    114             } else {
    115                 tableRow.find('.formatter_callback').prepend('N.v.t.');
    116                 tableRow.find('.formatter_callback input').remove();
    117             }
    118 
    119             tableRow.css('display', '')
    120                 .removeClass('formatter_table_blueprint')
    121                 .attr('data-row', (formatterCount + 1));
    122 
    123             $('.formatter_table').append(tableRow);
    124         }
    125 
    126 
    127         function deleteFormatterRow(e) {
    128             e.preventDefault();
    129 
    130             var tableRow = $(e.currentTarget).parents('tr');
    131             var rowId = tableRow.length <= 0 ? '' : tableRow.attr('data-row');
    132 
    133             if (rowId == '' || isNaN(Number(rowId)) || Number(rowId) < 0) {
    134                 alert('Verwijderen mislukt: ongeldige regel.');
    135             }
    136 
    137             tableRow.remove();
    138 
    139             var tableRows = $('.formatter_table tr');
    140             var customCount = 0;
    141             for (var i = 0; i < tableRows.length; i++) {
    142                 if ($(tableRows[i]).hasClass('formatter_table_blueprint') || $(tableRows[i]).hasClass('formatter_table_header')) {
    143                     continue;
    144                 }
    145 
    146                 $(tableRows[i]).attr('data-row', customCount);
    147                 customCount++;
    148             }
    149         }
    150 
    151         function saveFormatters() {
    152             return $('input[name=rdw_formatter_save]').trigger('click');
    153         }
    154 
    155         $(document).on('click', '.add-formatter', addFormatterRow);
    156         $(document).on('click', '.delete-formatter', deleteFormatterRow);
    157 
    158         var pageUrl = decodeURIComponent(window.location.search.substring(1)),
    159             urlVariables = pageUrl.split('&'), parameterName, i;
    160         if (pageUrl != '') {
    161             for (i = 0; i < urlVariables.length; i++) {
    162                 parameterName = urlVariables[i].split('=');
    163                 var urlName = parameterName[0];
    164                 var urlValue = parameterName[1];
    165                 if (urlName == 'tsdtab') {
    166                     $('a[href*="'+urlValue+'"]').trigger('click');
    167                 }
    168             }
    169         }
    170     });
    171 
    172 })( jQuery );
     98        });
     99
     100        // Add this after your existing click handlers
     101
     102        // Handle changes to the "Required field" checkbox
     103        $(document).on('change', '.control-box input[name="required"]', function() {
     104            // Get current values
     105            const isRequired = $(this).is(':checked');
     106            const currentTagValue = $('.rdw-insert-box .tag').val();
     107
     108            // Only process if we have a tag value
     109            if (currentTagValue) {
     110                // Match the tag pattern to extract components
     111                const tagMatch = currentTagValue.match(/\[(text)(\*?)\s+([^\s]+)(.+)?\]/);
     112
     113                if (tagMatch) {
     114                    // Rebuild the tag with or without asterisk based on checkbox state
     115                    const tagType = tagMatch[1]; // "text"
     116                    const fieldName = tagMatch[3]; // field name
     117                    const tagRemainder = tagMatch[4] || ''; // rest of tag including id, etc.
     118
     119                    const updatedTag = `[${tagType}${isRequired ? '*' : ''} ${fieldName}${tagRemainder}]`;
     120
     121                    $('.rdw-insert-box .tag').val(updatedTag);
     122                }
     123            }
     124        });
     125
     126        // Tab navigation handler
     127        $(document).on('click', '.nav-tabs li', function(e) {
     128            e.preventDefault();
     129            const $target = $(this);
     130
     131            if (!$target.hasClass('active')) {
     132                const $activeTab = $('.active');
     133                const $activeContent = $($activeTab.find('a').attr('href'));
     134                const $newContent = $($target.find('a').attr('href'));
     135
     136                $activeContent.fadeOut('fast', 'linear', function() {
     137                    $newContent.fadeIn('fast', 'linear');
     138                    $activeTab.removeClass('active');
     139                    $target.addClass('active');
     140                });
     141            }
     142        });
     143
     144        // Save changes handler
     145        $(document).on('click', '#app-container .open-rdw-kenteken-voertuiginformatie .save-changes', function(e) {
     146            e.preventDefault();
     147
     148            if ($('#formatters-doc').is(':visible')) {
     149                return saveFormatters();
     150            }
     151
     152            if ($('#dashboard-doc').is(':hidden')) {
     153                return;
     154            }
     155
     156            $("body").css("cursor", "progress");
     157
     158            const inputData = {
     159                license: $('#app-container #rdw_license').val(),
     160                useCPT: $('#app-container #useCPT').is(':checked'),
     161                cptKeyword: $('#app-container #cptKeyword').val(),
     162                brandKeyword: $('#app-container #brandKeyword').val(),
     163                modelKeyword: $('#app-container #modelKeyword').val(),
     164                cfLink: $('#app-container #cfLink').val(),
     165            };
     166
     167            const data = {
     168                action: 'rdw_save_changes',
     169                options: inputData,
     170            };
     171
     172            $.post(ajaxurl, data)
     173                .done(function(res) {
     174                    if (res.success === true) {
     175                        $('#app-container .save-changes').css('background-color', '#46b450');
     176                    }
     177                })
     178                .fail(function() {
     179                    $('#app-container .save-changes').css('background-color', '#d54e21');
     180                })
     181                .always(function() {
     182                    $("body").css("cursor", "default");
     183                    setTimeout(function() {
     184                        $('#app-container .save-changes').css('background-color', '#428bca');
     185                    }, 2000);
     186                });
     187        });
     188
     189        // Add formatter row handler
     190        function addFormatterRow(e) {
     191            e.preventDefault();
     192
     193            const fieldName = $('select[name=rdw_field_name]').val();
     194            const type = $('select[name=rdw_formatter_type]').val();
     195
     196            if (!fieldName || !type) {
     197                return alert('Ongeldige veldnaam of formatter type');
     198            }
     199
     200            // Calculate new row index
     201            const formatterCount = $('.formatter_table tr').length - 2;
     202            const inputName = `formatter[${formatterCount + 1}]`;
     203
     204            // Clone blueprint row
     205            const $tableRow = $('.formatter_table_blueprint').clone();
     206            $tableRow.find('.formatter_field').prepend(fieldName);
     207            $tableRow.find('.formatter_field input')
     208                .val(fieldName)
     209                .attr('name', `${inputName}[name]`);
     210
     211            $tableRow.find('.formatter_type').prepend(type);
     212            $tableRow.find('.formatter_type input')
     213                .val(type)
     214                .attr('name', `${inputName}[type]`);
     215
     216            // Handle callback field type
     217            if (type === 'callback') {
     218                $tableRow.find('.formatter_callback input')
     219                    .attr('name', `${inputName}[callback]`);
     220            } else {
     221                $tableRow.find('.formatter_callback').prepend('N.v.t.');
     222                $tableRow.find('.formatter_callback input').remove();
     223            }
     224
     225            // Prepare and append the new row
     226            $tableRow.css('display', '')
     227                .removeClass('formatter_table_blueprint')
     228                .attr('data-row', formatterCount + 1);
     229
     230            $('.formatter_table').append($tableRow);
     231        }
     232
     233        // Delete formatter row handler
     234        function deleteFormatterRow(e) {
     235            e.preventDefault();
     236
     237            const $tableRow = $(e.currentTarget).closest('tr');
     238            const rowId = $tableRow.length <= 0 ? '' : $tableRow.attr('data-row');
     239
     240            if (!rowId || isNaN(Number(rowId)) || Number(rowId) < 0) {
     241                return alert('Verwijderen mislukt: ongeldige regel.');
     242            }
     243
     244            $tableRow.remove();
     245
     246            // Re-index remaining rows
     247            let customCount = 0;
     248            $('.formatter_table tr').each(function() {
     249                const $row = $(this);
     250                if ($row.hasClass('formatter_table_blueprint') || $row.hasClass('formatter_table_header')) {
     251                    return;
     252                }
     253                $row.attr('data-row', customCount++);
     254            });
     255        }
     256
     257        // Save formatters helper function
     258        function saveFormatters() {
     259            return $('input[name=rdw_formatter_save]').trigger('click');
     260        }
     261
     262        // Bind formatter buttons
     263        $(document).on('click', '.add-formatter', addFormatterRow);
     264        $(document).on('click', '.delete-formatter', deleteFormatterRow);
     265
     266        // Handle URL tab parameters using modern URLSearchParams
     267        const urlParams = new URLSearchParams(window.location.search);
     268        const tabParam = urlParams.get('tsdtab');
     269
     270        if (tabParam) {
     271            $(`a[href*="${tabParam}"]`).trigger('click');
     272        }
     273    });
     274})(jQuery);
  • open-rdw-kenteken-voertuiginformatie/trunk/admin/js/open-rdw-kenteken-voertuiginformatie-tinymce.js

    r3138718 r3250449  
    1515        // Add Command when Button Clicked
    1616        editor.addCommand('open_rdw_kenteken_button', function() {
     17
     18            console.log('open_rdw_kenteken_button');
     19
    1720            tb_show('Open RDW shortcode', '#TB_inline?inlineId=rdw-thickbox');
    1821
     
    2225
    2326            $('#rdw-thickbox-submit').unbind().click(function(e) {
     27                console.log('unbind');
     28
    2429                e.preventDefault();
    2530
     
    4045                }
    4146
     47                console.log(content);
     48
    4249                tinymce.execCommand('mceInsertContent', false, content);
    4350                tb_remove();
  • open-rdw-kenteken-voertuiginformatie/trunk/admin/partials/ContactForm7.php

    r3139133 r3250449  
    2525    public function __construct()
    2626    {
    27         add_action('init', [$this, 'wpcf7AddShortcode'], 7);
    28         add_action('admin_init', [$this, 'wpcf7AddTagGenerator'], 22);
     27        add_action('wpcf7_init', [$this, 'wpcf7AddShortcode'], 7);
     28        add_action('wpcf7_admin_init', [$this, 'wpcf7AddTagGenerator']);
    2929
    3030        add_filter('wpcf7_validate_open_rdw', [$this, 'wpcf7Validate'], 10, 2);
     
    7878    public function wpcf7AddTagGenerator()
    7979    {
     80        print '<pre>';
     81        print_r('hii');
     82        print '</pre>';
     83        exit;
    8084        if (function_exists('wpcf7_add_tag_generator')) {
    81             wpcf7_add_tag_generator(
     85            $tag_generator = \WPCF7_TagGenerator::get_instance();
     86            $tag_generator->add(
    8287                'open_rdw',
    8388                'Kenteken (Open RDW)',
    84                 'wpcf7-tg-pane-open-rdw',
    85                 [$this, 'wpcf7TagPane']
     89                [$this, 'wpcf7TagPane'],
     90                [
     91                    'version' => 2, // For CF7 6.0+
     92                ]
    8693            );
    8794        }
     
    145152
    146153        $fields = Fields::getFields();
     154        print '<pre>';
     155        print_r($fields);
     156        print '</pre>';
     157        exit;
    147158        self::render('admin/wpcf7-display.php', array('fields' => $fields), $this);
    148159    }
  • open-rdw-kenteken-voertuiginformatie/trunk/admin/partials/ContactForm7Display.php

    r3148441 r3250449  
    1515        if (isset($args)) {
    1616            $args = wp_parse_args($args, array());
     17        } else {
     18            $args = array();
    1719        }
    1820
     
    2123        }
    2224
     25        $this->args = $args;
    2326        $this->fields = Fields::getFields();
    2427    }
  • open-rdw-kenteken-voertuiginformatie/trunk/app/Config.php

    r3212251 r3250449  
    4444            case 'development':
    4545                add_filter('https_ssl_verify', '__return_false');
    46                 return $this->config['base_url'] = 'https://tussendoor.nl';
     46                return $this->config['base_url'] = 'https://tussendoor.test';
    4747
    4848            case 'production':
    4949            default:
    50                 return $this->config['base_url'] = 'https://tussendoor.nl';
     50                return $this->config['base_url'] = 'https://tussendoor.test';
    5151        }
    5252    }
  • open-rdw-kenteken-voertuiginformatie/trunk/app/Http/Kernel.php

    r3212251 r3250449  
    257257        if (function_exists('wpcf7_add_form_tag')) {
    258258            $wpcf7 = new ContactForm7();
    259             wpcf7_add_form_tag(array('open_rdw', 'open_rdw*'), array($wpcf7, 'shortcode_handler'), true);
     259            wpcf7_add_form_tag(
     260                ['open_rdw', 'open_rdw*'],
     261                [$wpcf7, 'wpcf7_open_rdw_shortcode_handler'],
     262                true
     263            );
    260264        }
    261265    }
  • open-rdw-kenteken-voertuiginformatie/trunk/app/Services/ContactForm7.php

    r3212251 r3250449  
    1111    public function __construct()
    1212    {
    13         add_action('init', [$this, 'wpcf7_add_shortcode_open_rdw'], 7);
    14         add_action('admin_init', [$this, 'wpcf7_add_tag_generator_open_rdw'], 22);
     13        add_action('wpcf7_init', [$this, 'wpcf7_add_shortcode_open_rdw'], 7);
     14        add_action('wpcf7_admin_init', [$this, 'wpcf7_add_tag_generator_open_rdw'], 22);
    1515
    1616        add_filter('wpcf7_validate_open_rdw', [$this, 'wpcf7_validate_open_rdw'], 10, 2);
     
    5353            $tag_generator = WPCF7_TagGenerator::get_instance();
    5454            $tag_generator->add(
    55                 'open_rdw',
    56                 'Kenteken (Open RDW)',
    57                 array($this, 'wpcf7-tg-pane-open-rdw'),
    58                 array_merge(array(
    59                     'version' => 2, // Use form tag generator version 2 introduced in cf7 6.0
    60                     'name-attr',
    61                     'dtx_pageload'
    62                 ))
     55                'open_rdw', 'Kenteken (Open RDW)',
     56                [$this, 'wpcf7_tg_pane_open_rdw'],
     57                [
     58                    'version'     => 2, // Use tag generator version 2 introduced in CF7 6.0
     59                ]
    6360            );
    6461        }
  • open-rdw-kenteken-voertuiginformatie/trunk/config/plugin.php

    r3212251 r3250449  
    2727        'log_source'            => 'tussendoor-rdw',
    2828        'log_context'           => 'tsdRdwContext',
    29         'version'               => '5.1.4',
     29        'version'               => '5.2.0',
    3030        'php_minimum'           => '8.0',
    3131        'php_minimum_id'        => 80000,
  • open-rdw-kenteken-voertuiginformatie/trunk/plugin-gratis-open-rdw-kenteken-voertuiginformatie.php

    r3212251 r3250449  
    1212 * Author URI: https://www.tussendoor.nl
    1313 * Text Domain: tussendoor-rdw
    14  * Version: 5.1.4
    15  * Tested up to: 6.6.1
    16  * Requires at least: 6.2
     14 * Version: 5.2.0
     15 * Tested up to: 6.7
     16 * Requires at least: 6.5
    1717 * Requires PHP: 8.1
    1818 * Domain Path: /languages
  • open-rdw-kenteken-voertuiginformatie/trunk/readme.txt

    r3219651 r3250449  
    33Tags: tussendoor, rdw, kenteken, voertuig, kentekeninformatie
    44Stable tag: 5.1.4
    5 Tested up to: 6.6.1
     5Tested up to: 6.7
    66Requires at least: 6.2
    77Requires PHP: 8.1
     
    4646### Changelog
    4747
     48##### 5.2.0
     49Updated: Jquery for more native JS implementation.
     50Fixed: Autofill issues for CF7 when generating fields.
     51
    4852##### 5.1.4
    49 Updated: More robust API token expiry checking
    50 Fixed: Autofill issues on some forms
     53Updated: More robust API token expiry checking.
     54Fixed: Autofill issues on some forms.
    5155
    5256##### 5.1.3
  • open-rdw-kenteken-voertuiginformatie/trunk/vendor/composer/InstalledVersions.php

    r3138718 r3250449  
    3232     */
    3333    private static $installed;
     34
     35    /**
     36     * @var bool
     37     */
     38    private static $installedIsLocalDir;
    3439
    3540    /**
     
    310315        self::$installed = $data;
    311316        self::$installedByVendor = array();
     317
     318        // when using reload, we disable the duplicate protection to ensure that self::$installed data is
     319        // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
     320        // so we have to assume it does not, and that may result in duplicate data being returned when listing
     321        // all installed packages for example
     322        self::$installedIsLocalDir = false;
    312323    }
    313324
     
    323334
    324335        $installed = array();
     336        $copiedLocalDir = false;
    325337
    326338        if (self::$canGetVendors) {
     339            $selfDir = strtr(__DIR__, '\\', '/');
    327340            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
     341                $vendorDir = strtr($vendorDir, '\\', '/');
    328342                if (isset(self::$installedByVendor[$vendorDir])) {
    329343                    $installed[] = self::$installedByVendor[$vendorDir];
     
    331345                    /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
    332346                    $required = require $vendorDir.'/composer/installed.php';
    333                     $installed[] = self::$installedByVendor[$vendorDir] = $required;
    334                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
    335                         self::$installed = $installed[count($installed) - 1];
     347                    self::$installedByVendor[$vendorDir] = $required;
     348                    $installed[] = $required;
     349                    if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
     350                        self::$installed = $required;
     351                        self::$installedIsLocalDir = true;
    336352                    }
     353                }
     354                if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
     355                    $copiedLocalDir = true;
    337356                }
    338357            }
     
    351370        }
    352371
    353         if (self::$installed !== array()) {
     372        if (self::$installed !== array() && !$copiedLocalDir) {
    354373            $installed[] = self::$installed;
    355374        }
  • open-rdw-kenteken-voertuiginformatie/trunk/vendor/composer/autoload_psr4.php

    r3139457 r3250449  
    2626    'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
    2727    'Psr\\Clock\\' => array($vendorDir . '/psr/clock/src'),
    28     'Illuminate\\Support\\' => array($vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/support'),
     28    'Illuminate\\Support\\' => array($vendorDir . '/illuminate/support', $vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/macroable'),
    2929    'Illuminate\\Database\\' => array($vendorDir . '/illuminate/database'),
    3030    'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'),
  • open-rdw-kenteken-voertuiginformatie/trunk/vendor/composer/autoload_static.php

    r3158064 r3250449  
    166166        'Illuminate\\Support\\' =>
    167167        array (
    168             0 => __DIR__ . '/..' . '/illuminate/macroable',
     168            0 => __DIR__ . '/..' . '/illuminate/support',
    169169            1 => __DIR__ . '/..' . '/illuminate/collections',
    170             2 => __DIR__ . '/..' . '/illuminate/support',
     170            2 => __DIR__ . '/..' . '/illuminate/macroable',
    171171        ),
    172172        'Illuminate\\Database\\' =>
Note: See TracChangeset for help on using the changeset viewer.