function _cdn_cron_update_files_wrapper in CDN 5
Wrapper of cdn_update_file() for use only within cron mode. This function simply calls cdn_update_file(), but also sets the $files_synced parameter.
Parameters
$files: The list of files to be synchronized.
$update_setting: The update setting for each file. The key is the file path.
Return value
The updated $files array, as updated by cdn_update_file().
See also
1 call to _cdn_cron_update_files_wrapper()
- cdn_cron_run in ./
cdn_cron.inc - Executes a CDN synchronization cron run when called
File
- ./
cdn_cron.inc, line 293 - Basic functions for CDN synchronization cron.
Code
function _cdn_cron_update_files_wrapper($files, $update_setting) {
static $files_syncing = array();
if (empty($files_syncing)) {
$files_syncing = variable_get('cdn_cron_files_syncing', array());
}
$files_updated = array();
foreach ($files as $file) {
if ($update_setting[$file]) {
$files_updated[] = cdn_update_file($file, $files_syncing);
}
else {
$files_updated[] = $file;
}
}
return $files_updated;
}