You are here

function gd_image_chart_cron in Charts 6

Implementation of hook_cron().

Delete the images created by this module after a certain time specified by the admin

File

gd_image_chart/gd_image_chart.module, line 56
@author Mads Peter Henderson http://drupal.org/user/421971

Code

function gd_image_chart_cron() {
  if (variable_get('gd_image_chart_keep_files', '86400') > 0) {
    $path = file_directory_path() . "/" . variable_get('gd_image_chart_path', 'gd_image_chart');
    file_scan_directory($path, '\\.png$', array(
      '.',
      '..',
      'CVS',
    ), '_gd_image_chart_delete_old_images', TRUE);
  }
}