Making WordPress.org

Changeset 13512


Ignore:
Timestamp:
04/12/2024 05:24:54 AM (9 months ago)
Author:
dd32
Message:

Plugin Directory: Add missed changes in [13507].

See #7386.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php

    r13307 r13512  
    551551        $plugin = get_post( $postarr['ID'] );
    552552        if ( $plugin && $plugin->post_name !== $data['post_name'] ) {
    553             Tools::audit_log( sprintf(
    554                 "Slug changed from '%s' to '%s'.",
    555                 $plugin->post_name,
    556                 $data['post_name']
    557             ), $plugin->ID );
     553            // Only log if the slugs don't appear to be rejection-related.
     554            if (
     555                ! preg_match( '!^rejected-.+-rejected$!', $post->post_name ) &&
     556                ! preg_match( '!^rejected-.+-rejected$!', $data['post_name'] )
     557            ) {
     558                Tools::audit_log( sprintf(
     559                    "Slug changed from '%s' to '%s'.",
     560                    $plugin->post_name,
     561                    $data['post_name']
     562                ), $plugin->ID );
     563            }
    558564        }
    559565
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/js/edit-form.js

    r13109 r13512  
    5353
    5454        setPluginStatus: function() {
    55             if ( 'approved' === $(this).val() ) {
     55            var $this = $(this),
     56                status = $this.val();
     57
     58            if ( 'new' == status ) {
     59                jQuery('#assigned_reviewer').val(0);
     60
     61            } else if ( 'pending' == status && $this.hasClass('pending-and-assign') ) {
     62                jQuery('#assigned_reviewer').val( userSettings.uid );
     63
     64            } else if ( 'approved' === status ) {
    5665                return confirm( pluginDirectory.approvePluginAYS );
    57             } else if ( 'rejected' === $(this).val() ) {
     66
     67            } else if ( 'rejected' === status ) {
    5868                return confirm( pluginDirectory.rejectPluginAYS );
     69
    5970            } else {
    6071                return true;
Note: See TracChangeset for help on using the changeset viewer.