Code Duplication    Length = 11-12 lines in 2 locations

wp-admin/includes/file.php 2 locations

@@ 440-451 (lines=12) @@
437
 * @return array On success, returns an associative array of file attributes. On failure, returns
438
 *               $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ).
439
 */
440
function wp_handle_upload( &$file, $overrides = false, $time = null ) {
441
	/*
442
	 *  $_POST['action'] must be set and its value must equal $overrides['action']
443
	 *  or this:
444
	 */
445
	$action = 'wp_handle_upload';
446
	if ( isset( $overrides['action'] ) ) {
447
		$action = $overrides['action'];
448
	}
449
450
	return _wp_handle_upload( $file, $overrides, $time, $action );
451
}
452
453
/**
454
 * Wrapper for _wp_handle_upload().
@@ 469-479 (lines=11) @@
466
 * @return array On success, returns an associative array of file attributes. On failure, returns
467
 *               $overrides['upload_error_handler'](&$file, $message ) or array( 'error'=>$message ).
468
 */
469
function wp_handle_sideload( &$file, $overrides = false, $time = null ) {
470
	/*
471
	 *  $_POST['action'] must be set and its value must equal $overrides['action']
472
	 *  or this:
473
	 */
474
	$action = 'wp_handle_sideload';
475
	if ( isset( $overrides['action'] ) ) {
476
		$action = $overrides['action'];
477
	}
478
	return _wp_handle_upload( $file, $overrides, $time, $action );
479
}
480
481
482
/**