WordPress.org

Making WordPress.org

Ticket #2787: 2787.patch

File 2787.patch, 1.5 KB (added by SergeyBiryukov, 8 months ago)
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php

     
    9696 
    9797                $plugin_post = Plugin_Directory::get_plugin_post( $this->plugin_slug ); 
    9898 
    99                 // Is there already a plugin by a different author? 
     99                // Is there already a plugin with the same slug by a different author? 
    100100                if ( $plugin_post && $plugin_post->post_author != get_current_user_id() ) { 
    101101                        /* translators: 1: plugin slug, 2: 'Plugin Name:' */ 
    102102                        return sprintf( __( 'There is already a plugin called %1$s by a different author. Please change the %2$s line in your main plugin file and upload it again.', 'wporg-plugins' ), 
     
    105105                        ); 
    106106                } 
    107107 
    108                 // Check the plugin can accept uploads (New submissions, or pending further review). 
    109                 if ( $plugin_post && ! in_array( $plugin_post->post_status, array( 'new', 'pending' ) ) ) { 
     108                // Is there already a plugin with the same slug by the same author? 
     109                if ( $plugin_post ) { 
    110110                        /* translators: 1: plugin slug, 2: 'Plugin Name:' */ 
    111111                        return sprintf( __( 'There is already a plugin called %1$s. Please change the %2$s line in your main plugin file and upload it again.', 'wporg-plugins' ), 
    112112                                '<code>' . $this->plugin_slug . '</code>',