You are here

function brilliant_gallery_clean_table_image_arrays in Brilliant Gallery 7

Same name and namespace in other branches
  1. 6.4 cron.inc \brilliant_gallery_clean_table_image_arrays()

@todo Please document this function.

See also

http://drupal.org/node/1354

1 call to brilliant_gallery_clean_table_image_arrays()
brilliant_gallery_cron in ./brilliant_gallery_cron.inc
Delete all expired images from the file cache folder brilliant_gallery_pcache.

File

./brilliant_gallery_cron.inc, line 20

Code

function brilliant_gallery_clean_table_image_arrays() {
  $deletecreatedbeforethistime = REQUEST_TIME - brilliant_gallery_get_days_in_seconds(variable_get('brilliant_gallery_cache_duration', 90));

  // TODO Please convert this statement to the D7 database API syntax.
  $dbres = db_query("DELETE FROM {brilliant_gallery_image_arrays} WHERE datetime < :deletecreatedbeforethistime", array(
    ':deletecreatedbeforethistime' => $deletecreatedbeforethistime,
  ));
  foreach ($dbres as $node) {

    // Perform operations on $node->body, etc. here.
  }
}