Making WordPress.org

Changeset 3082


Ignore:
Timestamp:
05/05/2016 07:45:24 AM (9 years ago)
Author:
dd32
Message:

Plugin Directory: Move the SVN authentication handlers into the SVN class.
This also fixes an issue where the commit message was being prefixed with a = due to invalid arguement creation.

See [3026]
See #1570

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-status-transitions.php

    r3078 r3082  
    9696        rename( $plugin_root, "$dir/trunk" );
    9797
    98         SVN::import( $dir, 'http://plugins.svn.wordpress.org/' . $post->post_name, array(
    99             'm'        => sprintf( 'Adding %1$s by %2$s.', $post->post_title, $plugin_author->user_login ),
    100             'username' => AUTOMATTIC_SVN_TRACKER__SVN_USER,
    101             'password' => AUTOMATTIC_SVN_TRACKER__SVN_PASSWORD,
    102         ) );
     98        SVN::import( $dir, 'http://plugins.svn.wordpress.org/' . $post->post_name, sprintf( 'Adding %1$s by %2$s.', $post->post_title, $plugin_author->user_login ) );
    10399
    104100        // Delete zips.
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/tools/class-svn.php

    r3026 r3082  
    1010
    1111    /**
    12      * Create an SVN Export of a local directory to a URL.
    13      *
    14      * Note: An exception will be thrown upon SVN error.
     12     * Import a local directory to a SVN path.
    1513     *
    1614     * @param string $path    The local folder to import into SVN.
    1715     * @param string $url     The URL to import to.
    18      * @param array  $options A list of options to pass to SVN. Optional.
     16     * @param string $message The commit message.
    1917     *
    2018     * @return array {
     
    2321     * }
    2422     */
    25     public static function import( $path, $url, $options = array() ) {
     23    public static function import( $path, $url, $message ) {
     24        $options = array(
     25            'non-interactive',
     26            'm' => $message,
     27            'user' => PLUGIN_SVN_MANAGEMENT_USER,
     28            'pass' => PLUGIN_SVN_MANAGEMENT_PASS,
     29        );
    2630        $esc_options = self::parse_esc_parameters( $options );
    2731
     
    4448     * Create an SVN Export of a URL to a local directory.
    4549     *
    46      * Note: An exception will be thrown upon SVN error.
    47      *
    4850     * @param string $url         The URL to export.
    4951     * @param string $destination The local folder to export into.
     
    5658     */
    5759    public static function export( $url, $destination, $options = array() ) {
     60        $options[] = 'non-interactive';
    5861        $esc_options = self::parse_esc_parameters( $options );
    5962
     
    8285     */
    8386    public static function ls( $url, $verbose = false ) {
    84         $esc_options = '';
     87        $options = array(
     88            'non-interactive'
     89        );
    8590        if ( $verbose ) {
    86             $esc_options = '-v';
     91            $options[] = 'v';
    8792        }
     93        $esc_options = self::parse_esc_parameters( $options );
    8894        $esc_url = escapeshellarg( $url );
    8995
     
    133139            }
    134140
    135             $result[] = escapeshellarg( $key ) . ( $no_parameters ? '' : '=' . escapeshellarg( $value ) );
     141            $result[] = escapeshellarg( $key ) . ( $no_parameters ? '' : ' ' . escapeshellarg( $value ) );
    136142        }
    137143
Note: See TracChangeset for help on using the changeset viewer.