Insert data in the advagg_aggregates_versions table.

Paramètres

string $aggregate_filenames_hash: Hash of the groupings of files.

string $aggregate_contents_hash: Hash of the files contents.

int $root: Is this a root aggregate.

Return value

bool Return TRUE if anything was written to the database.

1 call to advagg_insert_aggregate_version()
advagg_insert_update_db dans ./advagg.inc
Insert/Update data in advagg tables.

Fichier

./advagg.inc, line 63

Code

function advagg_insert_aggregate_version($aggregate_filenames_hash, $aggregate_contents_hash, $root) {
    // Info for the DB.
    $record = array(
        'aggregate_filenames_hash' => $aggregate_filenames_hash,
        'aggregate_contents_hash' => $aggregate_contents_hash,
        'atime' => 0,
        'root' => $root,
    );
    // Save new aggregate into the database if it does not exist.
    $return = db_merge('advagg_aggregates_versions')->key(array(
        'aggregate_filenames_hash' => $record['aggregate_filenames_hash'],
        'aggregate_contents_hash' => $record['aggregate_contents_hash'],
    ))
        ->insertFields($record)
        ->execute();
    return $return;
}