Changeset 11102
- Timestamp:
- 07/07/2021 06:43:06 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php
r11059 r11102 428 428 429 429 if ( ! $ticket_id ) { 430 // Since it's been added to SVN at this point, remove it from SVN to prevent future issues. 431 $this->remove_from_svn( 'Trac ticket creation failed.' ); 432 430 433 /* translators: %s: mailto link */ 431 434 return sprintf( __( 'There was an error creating a Trac ticket for your theme, please report this error to %s', 'wporg-themes' ), … … 1111 1114 1112 1115 return false; 1116 } 1117 1118 /** 1119 * Remove a theme version commited to SVN. 1120 */ 1121 function remove_from_svn( $reason ) { 1122 $svn_path = "{$this->theme_slug}/{$this->theme->display( 'Version' )}"; 1123 if ( ! $this->theme_slug || ! $this->theme->display( 'Version' ) || strlen( $svn_path ) < 3 ) { 1124 return false; 1125 } 1126 1127 $import_msg = 'Removing theme %1$s - %2$s: %3$s'; 1128 $import_msg = escapeshellarg( sprintf( $import_msg, $this->theme->display( 'Name' ), $this->theme->display( 'Version' ), $reason ) ); 1129 $svn_path = escapeshellarg( "https://themes.svn.wordpress.org/{$svn_path}" ); 1130 $password = escapeshellarg( THEME_DROPBOX_PASSWORD ); 1131 1132 $last_line = $this->exec_with_notify( self::SVN . " --non-interactive --username themedropbox --password {$password} -m {$import_msg} rm {$svn_path}" ); 1133 1134 return (bool) preg_match( '/Committed revision (\d+)\./i', $last_line ); 1113 1135 } 1114 1136
Note: See TracChangeset
for help on using the changeset viewer.