Plugin Directory


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • photo-gallery/trunk/admin/models/Galleries.php

    r2135029 r2150912  
    446446        }
    447447        $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);
    451451        $date = WDWLibrary::get('input_date_modified_' . $image_id, '');
    452452        $size = WDWLibrary::get('input_size_' . $image_id, '');
     
    503503        }
    504504        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          }
    507508          $save = $wpdb->update($wpdb->prefix . 'bwg_image', $data, array( 'id' => $image_id ));
    508509        }
     
    655656      $where .= ' AND `filename` LIKE "%' . $search . '%"';
    656657    }
    657     $image_where = ($all ? '' : ' WHERE image_id=' . $id);
     658    $image_where = ($all ? 'WHERE gallery_id=' . $gallery_id : ' WHERE image_id=' . $id);
    658659
    659660    $delete = $wpdb->query('DELETE FROM `' . $wpdb->prefix . 'bwg_image`' . $where);
Note: See TracChangeset for help on using the changeset viewer.