Making WordPress.org


Ignore:
Timestamp:
10/19/2014 02:17:33 PM (10 years ago)
Author:
Otto42
Message:

Correct translations lib to return correct URL for translation/plugin/theme URLs. Affects update-check api response.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/translations/lib.php

    r913 r914  
    171171        if ( 'core' === $type ) {
    172172            $path = "core/{$result['version']}/$language.zip";
     173            $urlpath = $path; // paths are identical for core
    173174        } else {
    174             $path = "{$type}s/$domain/{$result['version']}/$language.zip";
     175            $path = "{$type}s/$domain/{$result['version']}/$language.zip"; // rosetta builds dir uses plural plugins/themes path
     176            $urlpath = "{$type}/$domain/{$result['version']}/$language.zip"; // url uses singular plugin/theme path
    175177        }
    176178
     
    182184                'version'  => $result['version'],
    183185                'updated'  => $result['updated'],
    184                 'package'  => maybe_ssl_url( "http://downloads.wordpress.org/translation/$path" ),
     186                'package'  => maybe_ssl_url( "http://downloads.wordpress.org/translation/$urlpath" ),
    185187                'autoupdate' => true,
    186188            );
Note: See TracChangeset for help on using the changeset viewer.