Changeset 440801
- Timestamp:
- 09/20/2011 02:07:09 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nginx-manager/trunk/integration/class-nginxm-nextgengallery.php
r326643 r440801 18 18 function ngg_purge_url_on_saving_images($thumb_path) { 19 19 20 global $ nginxmNginx;20 global $wpdb, $nginxmNginx; 21 21 22 $nginxmNginx->log( "NGG image saved BEGIN ===" );22 $nginxmNginx->log( "NGG image saved BEGIN ===".$gallery_id ); 23 23 24 24 $thumb_path = home_url().substr(strstr($thumb_path, "/wp-content"), 0); … … 26 26 27 27 $nginxmNginx->log( "NGG image saved END ^^^" ); 28 29 // Get the picture id from the thumb path 30 31 $gallery_id = $wpdb->get_var( 32 $wpdb->prepare( "SELECT galleryid FROM $wpdb->nggpictures 33 WHERE filename = '%s'", substr($thumb_path, strpos($thumb_path, 'thumbs_') + 7)), 0, 0 ); 34 35 // Purge post that contains the image/thumb gallery 36 37 $this->ngg_purge_post_on_editing_galleries($gallery_id); 28 38 29 39 } 30 40 31 41 /** 32 * When a gallery is sorted in NGG, this function purge all related posts/pages42 * Purge posts/pages that cointain a specific gallery 33 43 * 34 44 * @param $gallery_id
Note: See TracChangeset
for help on using the changeset viewer.