<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[13600] trunk/wp-admin/includes/media.php:
  Display an Attachment Icon if an Attachment thumbnail is not available.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13600">13600</a></dd>
<dt>Author</dt> <dd>dd32</dd>
<dt>Date</dt> <dd>2010-03-06 08:00:42 +0000 (Sat, 06 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Display an Attachment Icon if an Attachment thumbnail is not available. Fixes display of Upload edit fields. Fixes <a href="http://trac.wordpress.org/ticket/12328">#12328</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (13599 => 13600)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2010-03-06 05:57:24 UTC (rev 13599)
+++ trunk/wp-admin/includes/media.php        2010-03-06 08:00:42 UTC (rev 13600)
</span><span class="lines">@@ -1148,10 +1148,10 @@
</span><span class="cx"> function get_media_item( $attachment_id, $args = null ) {
</span><span class="cx">         global $redir_tab;
</span><span class="cx"> 
</span><del>-        if ( ( $attachment_id = intval( $attachment_id ) ) &amp;&amp; $thumb_url = wp_get_attachment_image_src( $attachment_id ) )
</del><ins>+        if ( ( $attachment_id = intval( $attachment_id ) ) &amp;&amp; $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) )
</ins><span class="cx">                 $thumb_url = $thumb_url[0];
</span><span class="cx">         else
</span><del>-                return false;
</del><ins>+                $thumb_url = false;
</ins><span class="cx"> 
</span><span class="cx">         $default_args = array( 'errors' =&gt; null, 'send' =&gt; true, 'delete' =&gt; true, 'toggle' =&gt; true, 'show_title' =&gt; true );
</span><span class="cx">         $args = wp_parse_args( $args, $default_args );
</span><span class="lines">@@ -1474,7 +1474,7 @@
</span><span class="cx">         &lt;div&gt;
</span><span class="cx">         &lt;?php _e( 'Choose files to upload' ); ?&gt;
</span><span class="cx">         &lt;div id=&quot;flash-browse-button&quot;&gt;&lt;/div&gt;
</span><del>-        &lt;span&gt;&lt;input id=&quot;cancel-upload&quot; disabled=&quot;disabled&quot; onclick=&quot;cancelUpload()&quot; type=&quot;button&quot; value=&quot;&lt;?php esc_attr_e('Cancel Upload'); ?&gt;&quot; class=&quot;button&quot; /&gt;&lt;/span&gt;
</del><ins>+        &lt;span&gt;&lt;input id=&quot;cancel-upload&quot; disabled=&quot;disabled&quot; onClick=&quot;cancelUpload()&quot; type=&quot;button&quot; value=&quot;&lt;?php esc_attr_e('Cancel Upload'); ?&gt;&quot; class=&quot;button&quot; /&gt;&lt;/span&gt;
</ins><span class="cx">         &lt;/div&gt;
</span><span class="cx"> &lt;?php do_action('post-flash-upload-ui'); ?&gt;
</span><span class="cx">         &lt;p class=&quot;howto&quot;&gt;&lt;?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?&gt;&lt;/p&gt;
</span><span class="lines">@@ -2034,11 +2034,11 @@
</span><span class="cx">                         &lt;td class=&quot;field&quot;&gt;
</span><span class="cx">                                 &lt;input name=&quot;align&quot; id=&quot;align-none&quot; value=&quot;none&quot; onclick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'none' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</span><span class="cx">                                 &lt;label for=&quot;align-none&quot; class=&quot;align image-align-none-label&quot;&gt;' . __('None') . '&lt;/label&gt;
</span><del>-                                &lt;input name=&quot;align&quot; id=&quot;align-left&quot; value=&quot;left&quot; onclick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'left' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</del><ins>+                                &lt;input name=&quot;align&quot; id=&quot;align-left&quot; value=&quot;left&quot; onClick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'left' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</ins><span class="cx">                                 &lt;label for=&quot;align-left&quot; class=&quot;align image-align-left-label&quot;&gt;' . __('Left') . '&lt;/label&gt;
</span><del>-                                &lt;input name=&quot;align&quot; id=&quot;align-center&quot; value=&quot;center&quot; onclick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'center' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</del><ins>+                                &lt;input name=&quot;align&quot; id=&quot;align-center&quot; value=&quot;center&quot; onClick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'center' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</ins><span class="cx">                                 &lt;label for=&quot;align-center&quot; class=&quot;align image-align-center-label&quot;&gt;' . __('Center') . '&lt;/label&gt;
</span><del>-                                &lt;input name=&quot;align&quot; id=&quot;align-right&quot; value=&quot;right&quot; onclick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'right' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</del><ins>+                                &lt;input name=&quot;align&quot; id=&quot;align-right&quot; value=&quot;right&quot; onClick=&quot;addExtImage.align=\'align\'+this.value&quot; type=&quot;radio&quot;' . ($default_align == 'right' ? ' checked=&quot;checked&quot;' : '').' /&gt;
</ins><span class="cx">                                 &lt;label for=&quot;align-right&quot; class=&quot;align image-align-right-label&quot;&gt;' . __('Right') . '&lt;/label&gt;
</span><span class="cx">                         &lt;/td&gt;
</span><span class="cx">                 &lt;/tr&gt;
</span><span class="lines">@@ -2049,15 +2049,15 @@
</span><span class="cx">                         &lt;/th&gt;
</span><span class="cx">                         &lt;td class=&quot;field&quot;&gt;&lt;input id=&quot;url&quot; name=&quot;url&quot; value=&quot;&quot; type=&quot;text&quot; /&gt;&lt;br /&gt;
</span><span class="cx"> 
</span><del>-                        &lt;button type=&quot;button&quot; class=&quot;button&quot; value=&quot;&quot; onclick=&quot;document.forms[0].url.value=null&quot;&gt;' . __('None') . '&lt;/button&gt;
-                        &lt;button type=&quot;button&quot; class=&quot;button&quot; value=&quot;&quot; onclick=&quot;document.forms[0].url.value=document.forms[0].src.value&quot;&gt;' . __('Link to image') . '&lt;/button&gt;
</del><ins>+                        &lt;button type=&quot;button&quot; class=&quot;button&quot; value=&quot;&quot; onClick=&quot;document.forms[0].url.value=null&quot;&gt;' . __('None') . '&lt;/button&gt;
+                        &lt;button type=&quot;button&quot; class=&quot;button&quot; value=&quot;&quot; onClick=&quot;document.forms[0].url.value=document.forms[0].src.value&quot;&gt;' . __('Link to image') . '&lt;/button&gt;
</ins><span class="cx">                         &lt;p class=&quot;help&quot;&gt;' . __('Enter a link URL or click above for presets.') . '&lt;/p&gt;&lt;/td&gt;
</span><span class="cx">                 &lt;/tr&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;tr&gt;
</span><span class="cx">                         &lt;td&gt;&lt;/td&gt;
</span><span class="cx">                         &lt;td&gt;
</span><del>-                                &lt;input type=&quot;button&quot; class=&quot;button&quot; id=&quot;go_button&quot; style=&quot;color:#bbb;&quot; onclick=&quot;addExtImage.insert()&quot; value=&quot;' . esc_attr__('Insert into Post') . '&quot; /&gt;
</del><ins>+                                &lt;input type=&quot;button&quot; class=&quot;button&quot; id=&quot;go_button&quot; style=&quot;color:#bbb;&quot; onClick=&quot;addExtImage.insert()&quot; value=&quot;' . esc_attr__('Insert into Post') . '&quot; /&gt;
</ins><span class="cx">                         &lt;/td&gt;
</span><span class="cx">                 &lt;/tr&gt;
</span><span class="cx">         &lt;/tbody&gt;&lt;/table&gt;
</span></span></pre>
</div>
</div>

</body>
</html>