Making WordPress.org

Changeset 1115


Ignore:
Timestamp:
01/09/2015 03:53:03 AM (9 years ago)
Author:
obenland
Message:

Theme Directory: Remove bundled trac class.

There is an IXR class on dotorg that is the same as the one in core, except
that it was modified to handle SSL connections. The Trac class was originally
written with this dotorg IXR class in mind. Here, we're switching to that class
and add support for WP_IXR_HTTP_Client, which is what WordPress uses when it
uses the IXR class, so we can connect to Trac installs that are SSL.
Soon, this Trac library will be placed in a common includes directory; for now,
we update it to use what is already on dotorg elsewhere.

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

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php

    r1114 r1115  
    491491        if ( empty( $this->trac ) ) {
    492492            if ( ! class_exists( 'Trac' ) ) {
    493                 include_once plugin_dir_path( __FILE__ ) . 'class-trac.php';
     493                require_once ABSPATH . WPINC . '/class-IXR.php';
     494                require_once ABSPATH . WPINC . '/class-wp-http-ixr-client.php';
     495                require_once WPORGPATH . 'bb-theme/themes/lib/class-trac.php';
    494496            }
    495497
    496             $this->trac = new Trac( 'themetracbot', THEME_TRACBOT_PASSWORD, 'themes.trac.wordpress.org', '/login/xmlrpc', 443, true /* is_ssl() */ );
     498            $this->trac = new Trac( 'themetracbot', THEME_TRACBOT_PASSWORD, 'https://themes.trac.wordpress.org/login/xmlrpc' );
    497499        }
    498500
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php

    r1111 r1115  
    127127
    128128    if ( ! class_exists( 'Trac' ) ) {
    129         include_once plugin_dir_path( __FILE__ ) . 'class-trac.php';
    130     }
    131 
    132     $trac         = new Trac( 'themetracbot', THEME_TRACBOT_PASSWORD, 'themes.trac.wordpress.org', '/login/xmlrpc', 443, true );
     129        require_once ABSPATH . WPINC . '/class-IXR.php';
     130        require_once ABSPATH . WPINC . '/class-wp-http-ixr-client.php';
     131        require_once WPORGPATH . 'bb-theme/themes/lib/class-trac.php';
     132    }
     133
     134    $trac         = new Trac( 'themetracbot', THEME_TRACBOT_PASSWORD, 'https://themes.trac.wordpress.org/login/xmlrpc' );
    133135    $last_request = get_option( 'wporg-themes-last-trac-sync', strtotime( '-2 days' ) );
    134136
Note: See TracChangeset for help on using the changeset viewer.