Making WordPress.org

Changeset 11304


Ignore:
Timestamp:
11/02/2021 07:15:12 AM (4 years ago)
Author:
dd32
Message:

Theme Directory: Slack Firehose: When a theme import came from SVN, include a 'Compare' link along side the changeset, as the changeset diff is unlikely to show the changes directly.

See #5899.

File:
1 edited

Legend:

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

    r11299 r11304  
    131131     */
    132132    protected $version_status = 'new';
     133
     134    /**
     135     * Where the import is triggered from. 'svn' or 'upload'.
     136     *
     137     * @var string
     138     */
     139    protected $importing_from = 'upload';
    133140
    134141    /**
     
    169176        );
    170177        $this->version_status = 'new';
     178        $this->importing_from = 'upload';
    171179
    172180        // $this->tmp_dir = '';    // Temporary folder per each instance of this class. Doesn't need to be reset each time.
     
    217225        $this->reset_properties();
    218226
    219         $this->theme_slug = $slug;
     227        $this->importing_from = 'svn';
     228        $this->theme_slug     = $slug;
    220229
    221230        // Check out from SVN.
     
    17431752                        (
    17441753                            $this->trac_changeset ?
    1745                             "<https://themes.trac.wordpress.org/changeset/{$this->trac_changeset}|[{$this->trac_changeset}]>" :
     1754                            "<https://themes.trac.wordpress.org/changeset/{$this->trac_changeset}|[{$this->trac_changeset}]> " :
     1755                            ''
     1756                        ) .
     1757                        (
     1758                            // When importing from SVN, include a 'Compare' link as the Changeset likely won't show a Diff unless the author did a `svn cp`.
     1759                            'svn' === $this->importing_from && ! empty( $this->theme_post->max_version ) ?
     1760                            "<https://themes.trac.wordpress.org/changeset?old_path={$this->theme_slug}/{$this->theme_post->max_version}&new_path={$this->theme_slug}/{$this->theme->display( 'Version' )}|Compare>" :
    17461761                            ''
    17471762                        ),
Note: See TracChangeset for help on using the changeset viewer.