You are here

static function ImageGateway::delete in Node Gallery 6

1 call to ImageGateway::delete()
_node_gallery_delete in ./node_gallery.module
Implementation of hook_nodeapi(op='delete').

File

./node_gallery.model.inc, line 242
Node gallery module.

Class

ImageGateway

Code

static function delete($image) {
  db_query("DELETE FROM {ng_images} WHERE nid = %d", $image->nid);
  db_query("DELETE FROM {files} WHERE fid = %d", $image->fid);
  file_delete($image->filepath);

  // Make sure to flush out the old imagecache images
  if (function_exists(imagecache_image_flush)) {
    imagecache_image_flush($image->filepath);
  }
}