- File:
-
- 1 edited
-
photo-gallery/trunk/admin/models/Galleries.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
photo-gallery/trunk/admin/models/Galleries.php
r2135029 r2150912 446 446 } 447 447 $thumb_url = WDWLibrary::get('thumb_url_' . $image_id, ''); 448 $description = str_replace(array('\\', '\t'), '', WDWLibrary::get('image_description_' . $image_id, ' '));449 $alt = str_replace(array('\\', '\t'), '', WDWLibrary::get('image_alt_text_' . $image_id, '', FALSE));450 $alt = esc_html(preg_replace("/<a[^>]*>|<\/a>/", '', $alt));448 $description = str_replace(array('\\', '\t'), '', WDWLibrary::get('image_description_' . $image_id, 'wp_filter_post_kses')); 449 $alt = str_replace(array('\\', '\t'), '', WDWLibrary::get('image_alt_text_' . $image_id, '', 'wp_filter_post_kses')); 450 $alt = preg_replace("/<a[^>]*>|<\/a>/", '', $alt); 451 451 $date = WDWLibrary::get('input_date_modified_' . $image_id, ''); 452 452 $size = WDWLibrary::get('input_size_' . $image_id, ''); … … 503 503 } 504 504 else { 505 $resolution_thumb = WDWLibrary::get_thumb_size( $thumb_url ); 506 $data['resolution_thumb'] = $resolution_thumb; 505 if($data['resolution_thumb'] == '') { 506 unset($data['resolution_thumb']); 507 } 507 508 $save = $wpdb->update($wpdb->prefix . 'bwg_image', $data, array( 'id' => $image_id )); 508 509 } … … 655 656 $where .= ' AND `filename` LIKE "%' . $search . '%"'; 656 657 } 657 $image_where = ($all ? ' ': ' WHERE image_id=' . $id);658 $image_where = ($all ? 'WHERE gallery_id=' . $gallery_id : ' WHERE image_id=' . $id); 658 659 659 660 $delete = $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_image`' . $where);
Note: See TracChangeset
for help on using the changeset viewer.