WordPress.org

Make WordPress Core

Ticket #31072: 31072.1.patch

File 31072.1.patch, 1.2 KB (added by leogermani, 7 months ago)

Refreshing patch

  • src/wp-admin/includes/schema.php

    diff --git a/src/wp-admin/includes/schema.php b/src/wp-admin/includes/schema.php
    index 20853da..cd69016 100644
    a b CREATE TABLE $wpdb->comments ( 
    119119        KEY comment_approved_date_gmt (comment_approved,comment_date_gmt),
    120120        KEY comment_date_gmt (comment_date_gmt),
    121121        KEY comment_parent (comment_parent),
    122         KEY comment_author_email (comment_author_email(10))
     122        KEY comment_author_email (comment_author_email(10)),
     123        KEY comment_type (comment_type)
    123124) $charset_collate;
    124125CREATE TABLE $wpdb->links (
    125126        link_id bigint(20) unsigned NOT NULL auto_increment,
  • src/wp-admin/includes/upgrade.php

    diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php
    index 0390110..864bda4 100644
    a b function maybe_disable_automattic_widgets() { 
    31963196                        break;
    31973197                }
    31983198        }
     3199
     3200        // Upgrade versions prior to 4.7
     3201        if ( $wp_current_db_version < 37966 ) {
     3202                // Add index to wp_comments comment_type field
     3203                $wpdb->query( "ALTER TABLE {$wpdb->comments} DROP INDEX comment_type, ADD INDEX comment_type (comment_type)" );
     3204        }
    31993205}
    32003206
    32013207/**