Changeset 14126 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php
- Timestamp:
- 10/21/2024 02:25:39 AM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php
r13507 r14126 244 244 * 245 245 * @param \WP_Post $post Post object. 246 * @param \WP_User $plugin_author Plugin author. 246 * @param \WP_User $plugin_author Plugin author. Optional. 247 247 * @return bool 248 248 */ 249 public function approved_create_svn_repo( $post, $plugin_author ) { 249 public function approved_create_svn_repo( $post, $plugin_author = null ) { 250 $post = get_post( $post ); 251 $plugin_author ??= get_user_by( 'id', $post->post_author ); 252 250 253 $dir = Filesystem::temp_directory( $post->post_name ); 251 254 foreach ( array( 'assets', 'tags', 'trunk' ) as $folder ) { … … 269 272 */ 270 273 271 $result = 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 ) ); 272 274 $result = SVN::import( 275 $dir, 276 'http://plugins-testing.svn.wordpress.org/' . $post->post_name, 277 sprintf( 278 'Adding %1$s by %2$s.', 279 html_entity_decode( $post->post_title ), 280 $plugin_author->user_login 281 ) 282 ); 283 284 // Record the last failure attempt. 273 285 if ( $result['errors'] ) { 274 286 Tools::audit_log( 'Error creating SVN repository: ' . var_export( $result['errors'], true ), $post->ID ); 287 288 // Retry in a minute. 289 wp_schedule_single_event( time() + MINUTE_IN_SECONDS, 'plugin_directory_create_svn_repo', [ $post->ID, $plugin_author->ID ] ); 290 275 291 return false; 276 292 }
Note: See TracChangeset
for help on using the changeset viewer.