Make WordPress Core

Changeset 6445


Ignore:
Timestamp:
12/21/2007 01:40:00 AM (18 years ago)
Author:
ryan
Message:

Check attachment link when deleting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/wp-app.php

    r6125 r6445  
    495495
    496496        $location = get_post_meta($entry['ID'], '_wp_attached_file', true);
     497        $filetype = wp_check_filetype($location);
     498
     499        if(!isset($location) || 'attachment' != $entry['post_type'] || empty($filetype['ext']))
     500            $this->internal_error(__('Error ocurred while accessing post metadata for file location.'));
    497501
    498502        // delete file
Note: See TracChangeset for help on using the changeset viewer.