Ticket #3594: 3594.diff
File 3594.diff, 4.2 KB (added by , 17 years ago) |
---|
-
wp-includes/post-template.php
368 368 $src_file = $icon_dir . '/' . basename($src); 369 369 } 370 370 371 if ( !isset($src) )371 if ( !isset($src) || !$src ) 372 372 return false; 373 373 374 return array($src, $src_file); 374 375 } 375 376 -
wp-includes/script-loader.php
38 38 $this->add( 'admin-comments', '/wp-admin/edit-comments.js', array('listman'), '3847' ); 39 39 $this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '4583' ); 40 40 $this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' ); 41 $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '200 61223' );41 $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '20070116' ); 42 42 } 43 43 } 44 44 -
wp-admin/upload-js.php
56 56 this.currentImage.width = false; 57 57 this.currentImage.height = false; 58 58 } 59 this.currentImage.isImage = ( 0 == id ? '': $('attachment-is-image-' + id).value );59 this.currentImage.isImage = ( 0 == id ? 0 : $('attachment-is-image-' + id).value ); 60 60 this.currentImage.ID = id; 61 61 }, 62 62 … … 74 74 h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('« Back')) ?></a>"; 75 75 } 76 76 h += "<div id='file-title'>" 77 if ( !this.currentImage.isImage )77 if ( 0 == this.currentImage.isImage ) 78 78 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo attribute_escape(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>"; 79 79 else 80 80 h += "<h2>" + this.currentImage.title + "</h2>"; … … 83 83 h += "</span>"; 84 84 h += '</div>' 85 85 h += "<div id='upload-file-view' class='alignleft'>"; 86 if ( this.currentImage.isImage ) {86 if ( 1 == this.currentImage.isImage ) { 87 87 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo attribute_escape(__('Direct link to file')); ?>'>"; 88 88 h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />"; 89 89 h += "</a>"; … … 152 152 h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo attribute_escape(__('Browse your files')); ?>' class='back'><?php echo attribute_escape(__('« Back')); ?></a>"; 153 153 } 154 154 h += "<div id='file-title'>" 155 if ( !this.currentImage.isImage )155 if ( 0 == this.currentImage.isImage ) 156 156 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo attribute_escape(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>"; 157 157 else 158 158 h += "<h2>" + this.currentImage.title + "</h2>"; … … 161 161 h += "</span>"; 162 162 h += '</div>' 163 163 h += "<div id='upload-file-view' class='alignleft'>"; 164 if ( this.currentImage.isImage ) {164 if ( 1 == this.currentImage.isImage ) { 165 165 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo wp_specialchars(__('Direct link to file')); ?>'>"; 166 166 h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />"; 167 167 h += "</a>"; … … 230 230 displayEl = $A(document.forms.uploadoptions.elements.display).detect( function(i) { return i.checked; } ) 231 231 if ( displayEl ) 232 232 display = displayEl.value; 233 else if ( this.currentImage.isImage )233 else if ( 1 == this.currentImage.isImage ) 234 234 display = 'full'; 235 235 236 236 if ( 'none' != link )