Update the advagg_files table; use_strict column might have been incorrect.

File

./advagg.install, line 802

Code

function advagg_update_7220() {
    // Get all files that have use_strict marked.
    $filenames = array();
    $query = db_select('advagg_files', 'af')->fields('af', array(
        'filename',
        'use_strict',
    ))
        ->condition('use_strict', 1)
        ->execute();
    foreach ($query as $row) {
        $filenames[] = $row->filename;
    }
    if (empty($filenames)) {
        return t('Nothing needed to happen. Good to go!');
    }
    drupal_load('module', 'advagg');
    module_load_include('inc', 'advagg', 'advagg');
    // Force change.
    $info = advagg_get_info_on_files($filenames);
    foreach ($info as &$value) {
        $value['mtime']++;
    }
    advagg_insert_update_files($info, 'js');
    // Fix changed record.
    advagg_get_info_on_files($filenames);
    advagg_insert_update_files($info, 'js');
    // Detect changes.
    $filenames_new = array();
    $query = db_select('advagg_files', 'af')->fields('af', array(
        'filename',
        'use_strict',
    ))
        ->condition('use_strict', 1)
        ->execute();
    foreach ($query as $row) {
        $filenames_new[] = $row->filename;
    }
    // Output results.
    if (count($filenames_new) == count($filenames_new)) {
        return t('Nothing needed to happen. Good to go!');
    }
    else {
        return t('The advagg_files table has been updated; use_strict column has been updated.');
    }
}