From fba798a103256f5f400cb1a1dcb9cc5b45cf8166 Mon Sep 17 00:00:00 2001 From: donncha Date: Sat, 3 Dec 2005 13:49:00 +0000 Subject: WP Merge and misc fixes, worth upgrading for! git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@460 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-inst/wp-admin/inline-uploading.php | 44 ++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 19 deletions(-) (limited to 'wp-inst/wp-admin/inline-uploading.php') diff --git a/wp-inst/wp-admin/inline-uploading.php b/wp-inst/wp-admin/inline-uploading.php index 0295200..69c5c78 100644 --- a/wp-inst/wp-admin/inline-uploading.php +++ b/wp-inst/wp-admin/inline-uploading.php @@ -38,7 +38,7 @@ switch($action) { case 'delete': if ( !current_user_can('edit_post', (int) $attachment) ) - die(printf(__('You are not allowed to delete this attachment. %sGo back'), '") ); +die(__('You are not allowed to delete this attachment.').' ".__('Go back').''); wp_delete_attachment($attachment); @@ -55,7 +55,7 @@ if( isset( $file[ 'error' ] ) == false ) $file[ 'error' ] = apply_filters( "check_uploaded_file", $file[ 'error' ] ); if ( isset($file['error']) ) - die($file['error'] . 'Back to Image Uploading'); + die($file['error'] . ''.__('Back to Image Uploading').''); $url = $file['url']; $file = $file['file']; @@ -97,7 +97,7 @@ if ( preg_match('!^image/!', $attachment['post_mime_type']) ) { } header("Location: ".basename(__FILE__)."?post=$post&all=$all&action=view&last=true"); -die; +die(); case 'upload': @@ -164,7 +164,7 @@ if ( count($attachments) > 0 ) { $__linked_to_file = __('Linked to File'); $__using_thumbnail = __('Using Thumbnail'); $__using_original = __('Using Original'); - $__no_thumbnail = __('No Thumbnail'); + $__no_thumbnail = ''.__('No Thumbnail').''; $__close = __('Close Options'); $__confirmdelete = __('Delete this file from the server?'); $__nothumb = __('There is no thumbnail associated with this photo.'); @@ -174,6 +174,12 @@ linkedtopage = '$__linked_to_page'; linkedtofile = '$__linked_to_file'; usingthumbnail = '$__using_thumbnail'; usingoriginal = '$__using_original'; +var aa = new Array(); +var ab = new Array(); +var imga = new Array(); +var imgb = new Array(); +var srca = new Array(); +var srcb = new Array(); "; foreach ( $attachments as $key => $attachment ) { $ID = $attachment['ID']; @@ -195,8 +201,8 @@ usingoriginal = '$__using_original'; $image = & $attachment; if ( ($image['width'] > 128 || $image['height'] > 96) && !empty($image['thumb']) && file_exists(dirname($image['file']).'/'.$image['thumb']) ) { $src = str_replace(basename($image['guid']), $image['thumb'], $image['guid']); - $script .= "src{$ID}a = '$src'; -src{$ID}b = '{$image['guid']}'; + $script .= "srca[{$ID}] = '$src'; +srcb[{$ID}] = '{$image['guid']}'; "; $thumb = 'true'; $thumbtext = $__using_thumbnail; @@ -210,10 +216,10 @@ src{$ID}b = '{$image['guid']}'; $xpadding = (128 - $image['uwidth']) / 2; $ypadding = (96 - $image['uheight']) / 2; $style .= "#target{$ID} img { padding: {$ypadding}px {$xpadding}px; }\n"; - $script .= "a{$ID}a = ''; -a{$ID}b = ''; -img{$ID}a = '\"{$image['post_title']}\"'; -img{$ID}b = '\"{$image['post_title']}\"'; + $script .= "aa[{$ID}] = ''; +ab[{$ID}] = ''; +imga[{$ID}] = '\"{$image['post_title']}\"'; +imgb[{$ID}] = '\"{$image['post_title']}\"'; "; $html .= "