| 1 | Index: wp-admin/includes/upload.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/includes/upload.php (revision 6574) |
|---|
| 4 | +++ wp-admin/includes/upload.php (working copy) |
|---|
| 5 | @@ -163,11 +163,11 @@ |
|---|
| 6 | <?php endif; ?> |
|---|
| 7 | <tr> |
|---|
| 8 | <th scope="row"><label for="post_title"><?php _e('Title'); ?></label></th> |
|---|
| 9 | - <td><input type="text" id="post_title" name="post_title" value="<?php echo $attachment->post_title; ?>" /></td> |
|---|
| 10 | + <td><input type="text" id="post_title" name="post_title" value="<?php echo ( isset($attachment->post_title) ) ? $attachment->post_title : ''; ?>" /></td> |
|---|
| 11 | </tr> |
|---|
| 12 | <tr> |
|---|
| 13 | <th scope="row"><label for="post_content"><?php _e('Description'); ?></label></th> |
|---|
| 14 | - <td><textarea name="post_content" id="post_content"><?php echo $attachment->post_content; ?></textarea></td> |
|---|
| 15 | + <td><textarea name="post_content" id="post_content"><?php echo ( isset($attachment->post_conent) ) ? $attachment->post_content : ''; ?></textarea></td> |
|---|
| 16 | </tr> |
|---|
| 17 | <?php if (isset($attachment_data['image_meta'])) { ?> |
|---|
| 18 | <tr> |
|---|
| 19 | Index: wp-admin/includes/post.php |
|---|
| 20 | =================================================================== |
|---|
| 21 | --- wp-admin/includes/post.php (revision 6574) |
|---|
| 22 | +++ wp-admin/includes/post.php (working copy) |
|---|
| 23 | @@ -134,8 +134,10 @@ |
|---|
| 24 | $text = wp_specialchars( stripslashes( urldecode( $_REQUEST['text'] ) ) ); |
|---|
| 25 | $text = funky_javascript_fix( $text); |
|---|
| 26 | $popupurl = clean_url($_REQUEST['popupurl']); |
|---|
| 27 | - $post_content = '<a href="'.$popupurl.'">'.$post_title.'</a>'."\n$text"; |
|---|
| 28 | - } |
|---|
| 29 | + $post_content = '<a href="'.$popupurl.'">'.$post_title.'</a>'."\n$text"; |
|---|
| 30 | + } else |
|---|
| 31 | + $post_content = ''; |
|---|
| 32 | + |
|---|
| 33 | |
|---|
| 34 | if ( !empty( $_REQUEST['excerpt'] ) ) |
|---|
| 35 | $post_excerpt = wp_specialchars( stripslashes( $_REQUEST['excerpt'] )); |
|---|
| 36 | @@ -478,8 +480,8 @@ |
|---|
| 37 | global $wpdb; |
|---|
| 38 | if ( false === $q ) |
|---|
| 39 | $q = $_GET; |
|---|
| 40 | - $q['m'] = (int) $q['m']; |
|---|
| 41 | - $q['cat'] = (int) $q['cat']; |
|---|
| 42 | + $q['m'] = ( isset($q['m']) ) ? (int) $q['m'] : 0; |
|---|
| 43 | + $q['cat'] = ( isset($q['cat']) ) ? (int) $q['cat'] : 0; |
|---|
| 44 | $post_stati = array( // array( adj, noun ) |
|---|
| 45 | 'draft' => array(__('Draft'), _c('Drafts|manage posts header')), |
|---|
| 46 | 'future' => array(__('Scheduled'), __('Scheduled posts')), |
|---|
| 47 | @@ -497,10 +499,10 @@ |
|---|
| 48 | $post_status_q = '&post_status=' . $q['post_status']; |
|---|
| 49 | } |
|---|
| 50 | |
|---|
| 51 | - if ( 'pending' === $q['post_status'] ) { |
|---|
| 52 | + if ( isset($q['post_status']) && 'pending' === $q['post_status'] ) { |
|---|
| 53 | $order = 'ASC'; |
|---|
| 54 | $orderby = 'modified'; |
|---|
| 55 | - } elseif ( 'draft' === $q['post_status'] ) { |
|---|
| 56 | + } elseif ( isset($q['post_status']) && 'draft' === $q['post_status'] ) { |
|---|
| 57 | $order = 'DESC'; |
|---|
| 58 | $orderby = 'modified'; |
|---|
| 59 | } else { |
|---|