You are here

function forena_sync_reports in Forena Reports 7.2

Same name and namespace in other branches
  1. 8 forena.module \forena_sync_reports()
  2. 6.2 forena.admin.inc \forena_sync_reports()
  3. 7.5 forena.module \forena_sync_reports()
  4. 7.3 forena.module \forena_sync_reports()
  5. 7.4 forena.module \forena_sync_reports()
2 calls to forena_sync_reports()
forena_settings_submit in ./forena.admin.inc
Added submit handler to create directories and clear menu cache
forena_settings_sync_submit in ./forena.admin.inc

File

./forena.admin.inc, line 482

Code

function forena_sync_reports($copy_reports = FALSE) {
  if ($copy_reports) {
    $directories = module_invoke_all('forena_report_directory');
    $i = 0;
    if ($directories) {
      foreach ($directories as $src_dir) {
        $i += _forena_copy_reports($src_dir, TRUE);
      }
      if ($i > 0) {
        drupal_set_message($i . ' reports copied');
      }
    }
  }
  forena_db_sync();
}