WordPress.org

Making WordPress.org


Ignore:
Timestamp:
04/05/17 03:10:53 (8 months ago)
Author:
dd32
Message:

Plugin Directory: When a version of '.1' is passed to the ZIP builder, correct it to '0.1'.
Although the rest of the directory handles these version numbers correctly, if the ZIP builder is passed the '.1' variant it created the incorrect ZIP filenames.
This didn't affect the plugin directory, but did occur when I bulk-built ZIP files from a svn tag listing, causing some plugins to have incorrect ZIP filenames generated (resulting in 404's).

See #1578

File:
1 edited

Legend:

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

    r5147 r5246  
    7878            } 
    7979        } else { 
    80             throw new Exception( __METHOD__ . ": Failed to create checkout of {$svn_url}." ); 
     80            throw new Exception( __METHOD__ . ': Failed to create checkout of ' . self::ZIP_SVN_URL . '.' ); 
    8181        } 
    8282 
    8383        // Build the requested ZIPs 
    8484        foreach ( $versions as $version ) { 
     85            // Incase .1 was passed, treat it as 0.1 
     86            if ( '.' == substr( $version, 0, 1 ) ) { 
     87                $version = "0{$version}"; 
     88            } 
    8589            $this->version = $version; 
    8690 
Note: See TracChangeset for help on using the changeset viewer.