Changeset 11305
- Timestamp:
- 11/02/2021 07:25:50 AM (4 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory
- Files:
-
- 2 edited
-
class-wporg-themes-upload.php (modified) (4 diffs)
-
jobs/class-svn-import.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php
r11304 r11305 138 138 */ 139 139 protected $importing_from = 'upload'; 140 141 /** 142 * The SVN commit message, if user defined. 143 * 144 * @var string 145 */ 146 protected $commit_msg = ''; 140 147 141 148 /** … … 177 184 $this->version_status = 'new'; 178 185 $this->importing_from = 'upload'; 186 $this->commit_msg = ''; 179 187 180 188 // $this->tmp_dir = ''; // Temporary folder per each instance of this class. Doesn't need to be reset each time. … … 222 230 * @return true|WP_Error See ::import() for error conditions. 223 231 */ 224 public function process_update_from_svn( $slug, $version, $changeset = 0, $author = '' ) {232 public function process_update_from_svn( $slug, $version, $changeset = 0, $author = '', $commit_message = '' ) { 225 233 $this->reset_properties(); 226 234 227 235 $this->importing_from = 'svn'; 228 236 $this->theme_slug = $slug; 237 $this->commit_msg = $commit_message; 229 238 230 239 // Check out from SVN. … … 1761 1770 '' 1762 1771 ), 1772 ]; 1773 } 1774 1775 if ( $this->commit_msg ) { 1776 $fields[] = [ 1777 'type' => 'mrkdwn', 1778 'text' => "*Commit Message:*\n{$this->commit_msg}", 1763 1779 ]; 1764 1780 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/jobs/class-svn-import.php
r11233 r11305 71 71 72 72 $changeset = (int) $element->xpath( '@revision' )[0]; 73 $author = (string) $element->xpath( 'author' )[0];74 $msg = (string) $element->xpath( 'msg' )[0];73 $author = trim( (string) $element->xpath( 'author' )[0] ); 74 $msg = trim( (string) $element->xpath( 'msg' )[0] ); 75 75 76 76 $info = compact( 'slug', 'version', 'changeset', 'author', 'msg' ); … … 116 116 $args['version'], 117 117 $args['changeset'] ?? false, 118 $args['author'] ?? false 118 $args['author'] ?? false, 119 $args['msg'] ?? '' 119 120 ); 120 121
Note: See TracChangeset
for help on using the changeset viewer.