Plugin Directory

Changeset 3392656


Ignore:
Timestamp:
11/10/2025 05:02:58 AM (5 weeks ago)
Author:
lev0
Message:

Bugfixes

Location:
db-access-adminer
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • db-access-adminer/tags/3.0.1/README.txt

    r3390799 r3392656  
    44Requires at least: 5.3
    55Tested up to: 6.8.3
    6 Stable tag: 3.0.0
     6Stable tag: 3.0.1
    77Requires PHP: 5.6.0
    88License: GPLv2 or later
     
    2121Note that any other databases on the same host and protected by the same credentials will also be accessible in Adminer. This is how databases operate and not a limitation of Adminer nor this plugin. If other databases need different access restrictions, they should have separate credentials.
    2222
     23It comes with all the themes published in Adminer's Git repository, so you can select a style that suits you.
     24
    2325== Installation ==
    2426
    25 After installing the plugin, go to *Settings > Adminer* to configure the plugin and confirm the warning about the risk to your data. Go to *Tools > Adminer* to use it.
     27After installing the plugin, go to *Settings > Database Access with Adminer* to configure the plugin and confirm the warning about the risk to your data. Go to *Tools > Adminer* to use it.
    2628
    2729== Changelog ==
     30
     31= 3.0.1 =
     32* Fix issue with style selection. Re-save your existing settings to ensure correct loading if using a dark theme.
     33* Clearer error when plugin deactivated.
    2834
    2935= 3.0.0 =
  • db-access-adminer/tags/3.0.1/db-access-adminer.php

    r3390799 r3392656  
    33Plugin Name: Database Access with Adminer
    44Description: Direct database administration using the open source Adminer application.
    5 Version: 3.0.0
     5Version: 3.0.1
    66Requires at least: 5.3
    77Requires PHP: 5.6
     
    2323const WP_REST_NONCE = 'wp_rest';
    2424const ENCRYPTION_LIFETIME = 300;
    25 const RES_CSS = __DIR__ . '/adminer.css';
    2625
    2726add_action('admin_menu', function() {
     
    132131                            [
    133132                                'auto_submit',
    134                                 'warning_accepted'
     133                                'looser_perms',
     134                                'warning_accepted',
    135135                            ]
    136136                            , false
    137137                        );
    138138
     139                        $design_reset_error = false;
     140                        foreach (['', '-dark'] as $design_link_suffix) {
     141                            $design_link_file = "adminer$design_link_suffix.css";
     142                            $design_link_path = __DIR__ . "/$design_link_file";
     143                            if (@is_link($design_link_path)) {
     144                                if (
     145                                    $design !== null
     146                                    && basename($design) === $design_link_file
     147                                    && $design === @readlink($design_link_path)
     148                                ) {
     149                                    $design = null; # setting unchanged so leave existing link
     150                                }
     151                                elseif (!@unlink($design_link_path)) {
     152                                    $design_reset_error = true;
     153                                }
     154                            }
     155                            elseif (@file_exists($design_link_path)) { # likely a custom file
     156                                $design_reset_error = true;
     157                            }
     158                        }
    139159                        if (
    140                             (
    141                                 file_exists(RES_CSS)
    142                                 && !@unlink(RES_CSS)
    143                             )
     160                            $design_reset_error
    144161                            || (
    145162                                $design !== null
    146                                 && !@symlink($design, RES_CSS)
     163                                && !@symlink($design, __DIR__ . '/' . basename($design))
    147164                            )
    148165                        ) {
     
    514531                __('Database communication error.', 'db-access-adminer'),
    515532            ],
    516             'load_failed' => [
    517                 __('Could not load Adminer.', 'db-access-adminer'),
     533            'inactive' => [
     534                __('The plugin must be activated to use Adminer.', 'db-access-adminer'),
    518535            ],
    519536            'unknown' => [
  • db-access-adminer/tags/3.0.1/index.php

    r3390799 r3392656  
    113113    ) {
    114114        $message = [
    115             'No messages file found. Check %sWP Admin > Settings > Adminer%s.',
     115            'No messages file found. Check %sWP Admin > Settings > Database Access with Adminer%s.',
    116116            [
    117117                '<em>',
     
    217217                $message = empty($body->message) ? $messages['unknown'] : (array) $body->message;
    218218            }
     219            elseif (
     220                $status == 404
     221                && !empty($body->code)
     222                && $body->code === 'rest_no_route'
     223            ) {
     224                $message = $messages['inactive'];
     225            }
    219226            else {
    220227                $message = $messages['unprivileged'];
  • db-access-adminer/tags/3.0.1/languages/db-access-adminer.pot

    r3390799 r3392656  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Database Access with Adminer 3.0.0\n"
     5"Project-Id-Version: Database Access with Adminer 3.0.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/db-access-adminer\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-11-05T08:44:07+00:00\n"
     12"POT-Creation-Date: 2025-11-10T04:43:06+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    3535msgstr ""
    3636
    37 #: db-access-adminer.php:66
     37#: db-access-adminer.php:65
    3838msgid "Open Adminer"
    3939msgstr ""
    4040
    4141#. translators: open and close <em> tag
    42 #: db-access-adminer.php:70
     42#: db-access-adminer.php:69
    4343#, php-format
    4444msgid "The link is also found under the %sTools%s menu."
    4545msgstr ""
    4646
    47 #: db-access-adminer.php:123
     47#: db-access-adminer.php:122
    4848msgid "Unknown design selection."
    4949msgstr ""
    5050
    51 #: db-access-adminer.php:152
     51#: db-access-adminer.php:169
    5252msgid "Failed to set design."
    5353msgstr ""
    5454
    55 #: db-access-adminer.php:174
     55#: db-access-adminer.php:191
    5656msgid "Alternative design"
    5757msgstr ""
    5858
    59 #: db-access-adminer.php:202
     59#: db-access-adminer.php:219
    6060msgid "Change the theme Adminer uses."
    6161msgstr ""
    6262
    63 #: db-access-adminer.php:229
     63#: db-access-adminer.php:246
    6464msgid "Auto-submit Adminer's login form"
    6565msgstr ""
    6666
    67 #: db-access-adminer.php:231
     67#: db-access-adminer.php:248
    6868msgid "Adminer has its own login system which must still be activated, even though this plugin limits access. It's slightly more secure to submit it manually at the cost of a little convenience."
    6969msgstr ""
    7070
    71 #: db-access-adminer.php:239
     71#: db-access-adminer.php:256
    7272msgid "Less restrictive permissions on authentication files"
    7373msgstr ""
    7474
    75 #: db-access-adminer.php:240
     75#: db-access-adminer.php:257
    7676msgid "This grants read access to the group set on those ephemeral files, for cases where the group is different to the owner and that prevents Adminer from running. This can occur when the web server runs under a different account to PHP. Enable only if necessary."
    7777msgstr ""
    7878
    79 #: db-access-adminer.php:252
     79#: db-access-adminer.php:269
    8080msgid "I accept"
    8181msgstr ""
    8282
    8383#. translators: open and close <strong> tag on consequences, WP capability name
    84 #: db-access-adminer.php:255
     84#: db-access-adminer.php:272
    8585#, php-format
    8686msgid "This tool enables direct editing of your database, which can be very useful. However, if you are unfamiliar with it, %syou risk irreversible loss of or damage to your site's data%s. This includes losing access to your site admin pages if you modify records in the users table. It is recommended you do not use this tool unless you have a regular backup regime. It will also be available to all accounts that have the %s capability (normally admins), so you may wish to limit other accounts' access now. Checking this box means you understand this and accept the risk."
    8787msgstr ""
    8888
    89 #: db-access-adminer.php:267
     89#: db-access-adminer.php:284
    9090msgid "Adminer"
    9191msgstr ""
    9292
    93 #: db-access-adminer.php:281
     93#: db-access-adminer.php:298
    9494msgid "Unable to override menu link."
    9595msgstr ""
    9696
    97 #: db-access-adminer.php:308
     97#: db-access-adminer.php:325
    9898msgid "Settings"
    9999msgstr ""
    100100
    101101#. translators: PHP config setting name
    102 #: db-access-adminer.php:424
     102#: db-access-adminer.php:441
    103103#, php-format
    104104msgid "You need the cURL PHP extension enabled, or the %s PHP config setting on to use this tool."
     
    106106
    107107#. translators: 1: open tag of link to WP admin 2: close tag 3: WP capability name
    108 #: db-access-adminer.php:478
     108#: db-access-adminer.php:495
    109109#, php-format
    110110msgid "You must be %1$slogged in to WordPress%2$s and possess the %3$s capability to use this tool."
     
    112112
    113113#. translators: open and close tags of link to plugin settings
    114 #: db-access-adminer.php:487
     114#: db-access-adminer.php:504
    115115#, php-format
    116116msgid "Ensure you have completed %sAdminer setup%s and addressed missing requirements, if any."
    117117msgstr ""
    118118
    119 #: db-access-adminer.php:494
     119#: db-access-adminer.php:511
    120120msgid "Could not create one or more ephemeral files for Adminer. Write access to the plugin directory is required."
    121121msgstr ""
    122122
    123123#. translators: open and close tags of link to plugin settings
    124 #: db-access-adminer.php:498
     124#: db-access-adminer.php:515
    125125#, php-format
    126126msgid "Could not load one or more ephemeral files from WordPress. The plugin may not be %sset up%s correctly."
    127127msgstr ""
    128128
    129 #: db-access-adminer.php:505
     129#: db-access-adminer.php:522
    130130msgid "Credentials were not shared because they could not first be secured."
    131131msgstr ""
    132132
    133 #: db-access-adminer.php:508
     133#: db-access-adminer.php:525
    134134msgid "Could not read secured credentials. Try again."
    135135msgstr ""
    136136
    137 #: db-access-adminer.php:511
     137#: db-access-adminer.php:528
    138138msgid "Could not communicate with WordPress. It may be being blocked."
    139139msgstr ""
    140140
    141 #: db-access-adminer.php:514
     141#: db-access-adminer.php:531
    142142msgid "Database communication error."
    143143msgstr ""
    144144
    145 #: db-access-adminer.php:517
    146 msgid "Could not load Adminer."
     145#: db-access-adminer.php:534
     146msgid "The plugin must be activated to use Adminer."
    147147msgstr ""
    148148
    149 #: db-access-adminer.php:520
     149#: db-access-adminer.php:537
    150150msgid "An unknown error has occurred."
    151151msgstr ""
    152152
    153153#. translators: no specific design selected
    154 #: db-access-adminer.php:613
     154#: db-access-adminer.php:630
    155155msgid "default"
    156156msgstr ""
  • db-access-adminer/trunk/README.txt

    r3390799 r3392656  
    44Requires at least: 5.3
    55Tested up to: 6.8.3
    6 Stable tag: 3.0.0
     6Stable tag: 3.0.1
    77Requires PHP: 5.6.0
    88License: GPLv2 or later
     
    2121Note that any other databases on the same host and protected by the same credentials will also be accessible in Adminer. This is how databases operate and not a limitation of Adminer nor this plugin. If other databases need different access restrictions, they should have separate credentials.
    2222
     23It comes with all the themes published in Adminer's Git repository, so you can select a style that suits you.
     24
    2325== Installation ==
    2426
    25 After installing the plugin, go to *Settings > Adminer* to configure the plugin and confirm the warning about the risk to your data. Go to *Tools > Adminer* to use it.
     27After installing the plugin, go to *Settings > Database Access with Adminer* to configure the plugin and confirm the warning about the risk to your data. Go to *Tools > Adminer* to use it.
    2628
    2729== Changelog ==
     30
     31= 3.0.1 =
     32* Fix issue with style selection. Re-save your existing settings to ensure correct loading if using a dark theme.
     33* Clearer error when plugin deactivated.
    2834
    2935= 3.0.0 =
  • db-access-adminer/trunk/db-access-adminer.php

    r3390799 r3392656  
    33Plugin Name: Database Access with Adminer
    44Description: Direct database administration using the open source Adminer application.
    5 Version: 3.0.0
     5Version: 3.0.1
    66Requires at least: 5.3
    77Requires PHP: 5.6
     
    2323const WP_REST_NONCE = 'wp_rest';
    2424const ENCRYPTION_LIFETIME = 300;
    25 const RES_CSS = __DIR__ . '/adminer.css';
    2625
    2726add_action('admin_menu', function() {
     
    132131                            [
    133132                                'auto_submit',
    134                                 'warning_accepted'
     133                                'looser_perms',
     134                                'warning_accepted',
    135135                            ]
    136136                            , false
    137137                        );
    138138
     139                        $design_reset_error = false;
     140                        foreach (['', '-dark'] as $design_link_suffix) {
     141                            $design_link_file = "adminer$design_link_suffix.css";
     142                            $design_link_path = __DIR__ . "/$design_link_file";
     143                            if (@is_link($design_link_path)) {
     144                                if (
     145                                    $design !== null
     146                                    && basename($design) === $design_link_file
     147                                    && $design === @readlink($design_link_path)
     148                                ) {
     149                                    $design = null; # setting unchanged so leave existing link
     150                                }
     151                                elseif (!@unlink($design_link_path)) {
     152                                    $design_reset_error = true;
     153                                }
     154                            }
     155                            elseif (@file_exists($design_link_path)) { # likely a custom file
     156                                $design_reset_error = true;
     157                            }
     158                        }
    139159                        if (
    140                             (
    141                                 file_exists(RES_CSS)
    142                                 && !@unlink(RES_CSS)
    143                             )
     160                            $design_reset_error
    144161                            || (
    145162                                $design !== null
    146                                 && !@symlink($design, RES_CSS)
     163                                && !@symlink($design, __DIR__ . '/' . basename($design))
    147164                            )
    148165                        ) {
     
    514531                __('Database communication error.', 'db-access-adminer'),
    515532            ],
    516             'load_failed' => [
    517                 __('Could not load Adminer.', 'db-access-adminer'),
     533            'inactive' => [
     534                __('The plugin must be activated to use Adminer.', 'db-access-adminer'),
    518535            ],
    519536            'unknown' => [
  • db-access-adminer/trunk/index.php

    r3390799 r3392656  
    113113    ) {
    114114        $message = [
    115             'No messages file found. Check %sWP Admin > Settings > Adminer%s.',
     115            'No messages file found. Check %sWP Admin > Settings > Database Access with Adminer%s.',
    116116            [
    117117                '<em>',
     
    217217                $message = empty($body->message) ? $messages['unknown'] : (array) $body->message;
    218218            }
     219            elseif (
     220                $status == 404
     221                && !empty($body->code)
     222                && $body->code === 'rest_no_route'
     223            ) {
     224                $message = $messages['inactive'];
     225            }
    219226            else {
    220227                $message = $messages['unprivileged'];
  • db-access-adminer/trunk/languages/db-access-adminer.pot

    r3390799 r3392656  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Database Access with Adminer 3.0.0\n"
     5"Project-Id-Version: Database Access with Adminer 3.0.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/db-access-adminer\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-11-05T08:44:07+00:00\n"
     12"POT-Creation-Date: 2025-11-10T04:43:06+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
     
    3535msgstr ""
    3636
    37 #: db-access-adminer.php:66
     37#: db-access-adminer.php:65
    3838msgid "Open Adminer"
    3939msgstr ""
    4040
    4141#. translators: open and close <em> tag
    42 #: db-access-adminer.php:70
     42#: db-access-adminer.php:69
    4343#, php-format
    4444msgid "The link is also found under the %sTools%s menu."
    4545msgstr ""
    4646
    47 #: db-access-adminer.php:123
     47#: db-access-adminer.php:122
    4848msgid "Unknown design selection."
    4949msgstr ""
    5050
    51 #: db-access-adminer.php:152
     51#: db-access-adminer.php:169
    5252msgid "Failed to set design."
    5353msgstr ""
    5454
    55 #: db-access-adminer.php:174
     55#: db-access-adminer.php:191
    5656msgid "Alternative design"
    5757msgstr ""
    5858
    59 #: db-access-adminer.php:202
     59#: db-access-adminer.php:219
    6060msgid "Change the theme Adminer uses."
    6161msgstr ""
    6262
    63 #: db-access-adminer.php:229
     63#: db-access-adminer.php:246
    6464msgid "Auto-submit Adminer's login form"
    6565msgstr ""
    6666
    67 #: db-access-adminer.php:231
     67#: db-access-adminer.php:248
    6868msgid "Adminer has its own login system which must still be activated, even though this plugin limits access. It's slightly more secure to submit it manually at the cost of a little convenience."
    6969msgstr ""
    7070
    71 #: db-access-adminer.php:239
     71#: db-access-adminer.php:256
    7272msgid "Less restrictive permissions on authentication files"
    7373msgstr ""
    7474
    75 #: db-access-adminer.php:240
     75#: db-access-adminer.php:257
    7676msgid "This grants read access to the group set on those ephemeral files, for cases where the group is different to the owner and that prevents Adminer from running. This can occur when the web server runs under a different account to PHP. Enable only if necessary."
    7777msgstr ""
    7878
    79 #: db-access-adminer.php:252
     79#: db-access-adminer.php:269
    8080msgid "I accept"
    8181msgstr ""
    8282
    8383#. translators: open and close <strong> tag on consequences, WP capability name
    84 #: db-access-adminer.php:255
     84#: db-access-adminer.php:272
    8585#, php-format
    8686msgid "This tool enables direct editing of your database, which can be very useful. However, if you are unfamiliar with it, %syou risk irreversible loss of or damage to your site's data%s. This includes losing access to your site admin pages if you modify records in the users table. It is recommended you do not use this tool unless you have a regular backup regime. It will also be available to all accounts that have the %s capability (normally admins), so you may wish to limit other accounts' access now. Checking this box means you understand this and accept the risk."
    8787msgstr ""
    8888
    89 #: db-access-adminer.php:267
     89#: db-access-adminer.php:284
    9090msgid "Adminer"
    9191msgstr ""
    9292
    93 #: db-access-adminer.php:281
     93#: db-access-adminer.php:298
    9494msgid "Unable to override menu link."
    9595msgstr ""
    9696
    97 #: db-access-adminer.php:308
     97#: db-access-adminer.php:325
    9898msgid "Settings"
    9999msgstr ""
    100100
    101101#. translators: PHP config setting name
    102 #: db-access-adminer.php:424
     102#: db-access-adminer.php:441
    103103#, php-format
    104104msgid "You need the cURL PHP extension enabled, or the %s PHP config setting on to use this tool."
     
    106106
    107107#. translators: 1: open tag of link to WP admin 2: close tag 3: WP capability name
    108 #: db-access-adminer.php:478
     108#: db-access-adminer.php:495
    109109#, php-format
    110110msgid "You must be %1$slogged in to WordPress%2$s and possess the %3$s capability to use this tool."
     
    112112
    113113#. translators: open and close tags of link to plugin settings
    114 #: db-access-adminer.php:487
     114#: db-access-adminer.php:504
    115115#, php-format
    116116msgid "Ensure you have completed %sAdminer setup%s and addressed missing requirements, if any."
    117117msgstr ""
    118118
    119 #: db-access-adminer.php:494
     119#: db-access-adminer.php:511
    120120msgid "Could not create one or more ephemeral files for Adminer. Write access to the plugin directory is required."
    121121msgstr ""
    122122
    123123#. translators: open and close tags of link to plugin settings
    124 #: db-access-adminer.php:498
     124#: db-access-adminer.php:515
    125125#, php-format
    126126msgid "Could not load one or more ephemeral files from WordPress. The plugin may not be %sset up%s correctly."
    127127msgstr ""
    128128
    129 #: db-access-adminer.php:505
     129#: db-access-adminer.php:522
    130130msgid "Credentials were not shared because they could not first be secured."
    131131msgstr ""
    132132
    133 #: db-access-adminer.php:508
     133#: db-access-adminer.php:525
    134134msgid "Could not read secured credentials. Try again."
    135135msgstr ""
    136136
    137 #: db-access-adminer.php:511
     137#: db-access-adminer.php:528
    138138msgid "Could not communicate with WordPress. It may be being blocked."
    139139msgstr ""
    140140
    141 #: db-access-adminer.php:514
     141#: db-access-adminer.php:531
    142142msgid "Database communication error."
    143143msgstr ""
    144144
    145 #: db-access-adminer.php:517
    146 msgid "Could not load Adminer."
     145#: db-access-adminer.php:534
     146msgid "The plugin must be activated to use Adminer."
    147147msgstr ""
    148148
    149 #: db-access-adminer.php:520
     149#: db-access-adminer.php:537
    150150msgid "An unknown error has occurred."
    151151msgstr ""
    152152
    153153#. translators: no specific design selected
    154 #: db-access-adminer.php:613
     154#: db-access-adminer.php:630
    155155msgid "default"
    156156msgstr ""
Note: See TracChangeset for help on using the changeset viewer.