⚡ NEW: Changeset/ - Complete Album!

Changeset 2908825


Ignore:
Timestamp:
05/06/2023 09:24:20 AM (3 years ago)
Author:
davejesch
Message:

Update text domain to match plugin slug.

Location:
database-collation-fix
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • database-collation-fix/trunk/databasecollationfix.php

    r2903073 r2908825  
    44Plugin URL: https://serverpress.com/plugins/databasecollationfix
    55Description: Convert tables using utf8mb4_unicode_520_ci or utf8_unicode_520_ci collation to standard collation on a cron interval, plus on DesktopServer Create, Copy, Move, Import and Export operations.
    6 Version: 1.2.8
     6Version: 1.2.9
    77Author: Dave Jesch
    88Author URI: http://serverpress.com
    99Network: True
    10 Text Domain: dbcollationfix
     10Text Domain: database-collation-fix
    1111Domain path: /language
    1212License: GNU General Public License, version 2 http://www.gnu.org/license/gpl-20.0.html
     
    1717    private static $_instance = NULL;
    1818
    19     const VERSION = '1.2.8';
     19    const VERSION = '1.2.9';
    2020    const CRON_NAME = 'ds_database_collation_fix';
    2121    const TRIGGER_FILE = 'trigger.txt';
     
    135135            echo '<div style="width:100%; margin-top:15px">';
    136136            if ($force) {
    137                 echo '<p>', sprintf(__('Forcing Collation Algorithm to: <b>%s</b>.', 'dbcollationfix'),
     137                echo '<p>', sprintf(__('Forcing Collation Algorithm to: <b>%s</b>.', 'database-collation-fix'),
    138138                    $force_algorithm), '</p>';
    139139            }
    140140        }
    141141
    142         $this->_report(sprintf(__('Changing database Collation Algorithm to: %s', 'dbcollationfix'),
     142        $this->_report(sprintf(__('Changing database Collation Algorithm to: %s', 'database-collation-fix'),
    143143            ($force ? $force_algorithm : $this->_collation)));
    144144        $sql = 'ALTER DATABASE `' . DB_NAME . '` COLLATE=' . ($force ? $force_algorithm : $this->_collation);
     
    159159                $indexes = array();
    160160
    161                 $this->_report(sprintf(__('Checking table "%s"...', 'dbcollationfix'), $table));
     161                $this->_report(sprintf(__('Checking table "%s"...', 'database-collation-fix'), $table));
    162162                // check how the table was created
    163163                $sql = "SHOW CREATE TABLE `{$table}`";
     
    220220$this->_log(__METHOD__.'() checking collation: ' . $collation_term);
    221221                    $new_coll = $force ? $force_algorithm : $this->_collation;
    222                     $this->_report(sprintf(__('- found "%1$s" and ALTERing to "%2$s"...', 'dbcollationfix'),
     222                    $this->_report(sprintf(__('- found "%1$s" and ALTERing to "%2$s"...', 'database-collation-fix'),
    223223                        $old_coll, $new_coll));
    224224                    ++$table_count;
     
    231231                }
    232232                if (!$mod) {
    233                     $this->_report(__('- no ALTERations required.', 'dbcollationfix'));
     233                    $this->_report(__('- no ALTERations required.', 'database-collation-fix'));
    234234                }
    235235
     
    255255                            $default = !empty($rpw['Default']) ? "DEFAULT '{$row['Default']}" : '';
    256256
    257                             $this->_report(sprintf(__('- found column `%1$s` with collation of "%2$s" and ALTERing to "%3$s".', 'dbcollationfix'),
     257                            $this->_report(sprintf(__('- found column `%1$s` with collation of "%2$s" and ALTERing to "%3$s".', 'database-collation-fix'),
    258258                                $row['Field'], $row['Collation'], $this->_collation));
    259259//                          $row['Collation'] = $this->_collation;
     
    279279        }
    280280
    281         $this->_report(sprintf(__('Altered %1$d tables, %2$d columns and %3$d indexes.', 'dbcollationfix'),
     281        $this->_report(sprintf(__('Altered %1$d tables, %2$d columns and %3$d indexes.', 'database-collation-fix'),
    282282            $table_count, $column_count, $index_count));
    283283        if ($report)
     
    317317    public function admin_menu()
    318318    {
    319         add_management_page(__('Collation Fix', 'dbcollationfix'),          // page title
    320             __('Collation Fix', 'dbcollationfix'),                          // menu title
     319        add_management_page(__('Collation Fix', 'database-collation-fix'),  // page title
     320            __('Collation Fix', 'database-collation-fix'),                  // menu title
    321321            'manage_options',                                               // capability
    322322            'ds-db-collation',                                              // menu_slug
     
    339339
    340340        echo '<div class="wrap">';
    341         echo '<h2>', sprintf(__('ServerPress Database Collation Fix%1$s tool', 'dbcollationfix'), ' v' . self::VERSION), '</h2>';
    342         echo '<p>', __('This tool is used to convert your site\'s database tables from using the ...unicode_520_ci Collation Algorithms to use a slightly older, but more compatible utf8mb4_unicode_ci Collation Algorithm.', 'dbcollationfix'), '</p>';
    343         echo '<p>', __('The tool will automatically run every 24 hours and change any newly created database table. Or, you can use the button below to perform the database alterations on demand.', 'dbcollationfix'), '</p>';
     341        echo '<h2>', sprintf(__('ServerPress Database Collation Fix%1$s tool', 'database-collation-fix'), ' v' . self::VERSION), '</h2>';
     342        echo '<p>', __('This tool is used to convert your site\'s database tables from using the ...unicode_520_ci Collation Algorithms to use a slightly older, but more compatible utf8mb4_unicode_ci Collation Algorithm.', 'database-collation-fix'), '</p>';
     343        echo '<p>', __('The tool will automatically run every 24 hours and change any newly created database table. Or, you can use the button below to perform the database alterations on demand.', 'database-collation-fix'), '</p>';
    344344
    345345        echo '<form action="', esc_url(add_query_arg()), '" method="post">';
     
    348348        echo '<input type="hidden" name="force-collation" value="0" />';
    349349        echo '<input type="checkbox" name="force-collation" value="1" />';
    350         echo '&nbsp;', __('Force Collation Algorithm to: ', 'dbcollationfix');
     350        echo '&nbsp;', __('Force Collation Algorithm to: ', 'database-collation-fix');
    351351
    352352        echo '<select name="force-collation-algorithm">';
     
    358358        echo '</p>';
    359359
    360         echo '<input type="submit" name="collation-fix" class="button-primary" value="', __('Fix Database Collation', 'dbcollationfix'), '" />';
     360        echo '<input type="submit" name="collation-fix" class="button-primary" value="', __('Fix Database Collation', 'database-collation-fix'), '" />';
    361361        echo '</form>';
    362362
  • database-collation-fix/trunk/readme.txt

    r2903073 r2908825  
    1414== Description ==
    1515
    16 Since version 4.2, WordPress has been detecting the MySQL version and if it's version 5.5.3 or greater,
    17 automatically selecting the 'utf8mb4_unicode_520_ci' Collation Algorithm. This works well until you need
    18 to migrate your database to an older version of MySQL that does not support the utf8mb4 algorithms. Then,
    19 you run into the error message: "#1273 - Unknown collation: 'utf8mb4_unicode_520_ci'" when importing your database.
     16Since version 4.2, WordPress has been detecting the MySQL version and if it's version 5.5.3 or greater, automatically selecting the 'utf8mb4_unicode_520_ci' Collation Algorithm. This works well until you need to migrate your database to an older version of MySQL that does not support the utf8mb4 algorithms. Then, you run into the error message: "#1273 - Unknown collation: 'utf8mb4_unicode_520_ci'" when importing your database.
    2017
    21 With the WordPress 5.7 update and WooCommerce 5.1, some users are reporting an error: "SQLSTATE[HY000]: General
    22 error: 1267 Illegal mix of collations (utf8mb4_unicode_520_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT)". The
    23 Database Collation Fix tool also fixes this issue by changing the collation of all columns in your database to
    24 use the same algorithm, removing the "mix" of collations.
     18With the WordPress 5.7 update and WooCommerce 5.1, some users are reporting an error: "SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8mb4_unicode_520_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT)". The Database Collation Fix tool also fixes this issue by changing the collation of all columns in your database to use the same algorithm, removing the "mix" of collations.
    2519
    2620<strong>Usage Scenarios:</strong>
     
    6862= Is this safe? =
    6963
    70 Yes. The Database Collation Fix tool does not change any data. It only changes the Collation
    71 Algorithm that specified for your database columns and indexes.
     64Yes. The Database Collation Fix tool does not change any data. It only changes the Collation Algorithm that specified for your database columns and indexes.
    7265
    7366= Do I need to backup my data before using this? =
    7467
    75 Yes. Always backup your site before making database changes. The Database Collation Fix tool
    76 is unlikely to cause any problems but there is still a small chance that something else (like
    77 the version of MySQL/MariaDB that you're using) can have a compatibility issue.
     68Yes. Always backup your site before making database changes. The Database Collation Fix tool is unlikely to cause any problems but there is still a small chance that something else (like the version of MySQL/MariaDB that you're using) can have a compatibility issue.
    7869
    7970= Once my tables are fixed, do I still need to use this tool? =
    8071
    81 No. The Database Collation Fix tool changes the database. It only needs to do this once. However,
    82 future versions of WordPress or one or more of your plugins can also make database changes. These
    83 future changes may require updates to keep your Collation Algorithms updated. If you leave the
    84 Database Collation Fix tool active, it will scan your database once per day and look for any tables
    85 that need to be adjusted, fixing them automatically.
     72No. The Database Collation Fix tool changes the database. It only needs to do this once. However, future versions of WordPress or one or more of your plugins can also make database changes. These future changes may require updates to keep your Collation Algorithms updated. If you leave the Database Collation Fix tool active, it will scan your database once per day and look for any tables that need to be adjusted, fixing them automatically.
    8673
    8774== Screenshots ==
     
    9077
    9178== Changelog ==
     79= 1.2.9 - May 6, 2023 =
     80Update text domain to match plugin slug.
     81
    9282= 1.2.8 - Apr 24, 2023 =
    9383Fix CSRF vulnerability.
Note: See TracChangeset for help on using the changeset viewer.