Plugin Directory

Changeset 440801


Ignore:
Timestamp:
09/20/2011 02:07:09 PM (15 years ago)
Author:
rukbat
Message:

Upgrade to version 1.3.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nginx-manager/trunk/integration/class-nginxm-nextgengallery.php

    r326643 r440801  
    1818        function ngg_purge_url_on_saving_images($thumb_path) {
    1919           
    20             global $nginxmNginx;
     20            global $wpdb, $nginxmNginx;
    2121           
    22             $nginxmNginx->log( "NGG image saved BEGIN ===" );
     22            $nginxmNginx->log( "NGG image saved BEGIN ===".$gallery_id );
    2323           
    2424            $thumb_path = home_url().substr(strstr($thumb_path, "/wp-content"), 0);
     
    2626           
    2727            $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);
    2838           
    2939        }
    3040       
    3141        /**
    32          * When a gallery is sorted in NGG, this function purge all related posts/pages
     42         * Purge posts/pages that cointain a specific gallery
    3343         *
    3444         * @param $gallery_id
Note: See TracChangeset for help on using the changeset viewer.