From 03979a48356c4061d412aa038009c4e93d3f10cc Mon Sep 17 00:00:00 2001 From: jmslbam Date: Sun, 3 Mar 2013 17:16:34 +0100 Subject: [PATCH] Use concate instead of sprintf --- php/commands/media.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/php/commands/media.php b/php/commands/media.php index b1bd073f..a9b6c9a3 100644 --- a/php/commands/media.php +++ b/php/commands/media.php @@ -79,15 +79,10 @@ class Media_Command extends WP_CLI_Command { unset( $array_file[ count( $array_file ) - 1 ] ); $imagePath = implode( DIRECTORY_SEPARATOR, $array_path ) . DIRECTORY_SEPARATOR . implode( '.', $array_file ); - - - /** - * Continue - */ $dirPath = explode( DIRECTORY_SEPARATOR, $imagePath ); - $imageName = sprintf( "%s-", $dirPath[ count( $dirPath ) - 1 ] ); + $imageName = $dirPath[ count( $dirPath ) - 1 ] . "-"; unset( $dirPath[ count( $dirPath ) - 1 ] ); - $dirPath = sprintf( "%s%s", implode( DIRECTORY_SEPARATOR, $dirPath ), DIRECTORY_SEPARATOR ); + $dirPath = implode( DIRECTORY_SEPARATOR, $dirPath ) . DIRECTORY_SEPARATOR; // Read and delete files $dir = opendir( $dirPath ); -- 2.11.0