function certificate_snapshot_save in Certificate 7.2
Same name and namespace in other branches
- 8.3 certificate.module \certificate_snapshot_save()
- 6.2 certificate.module \certificate_snapshot_save()
- 6 certificate.module \certificate_snapshot_save()
- 7.3 certificate.module \certificate_snapshot_save()
- 3.x certificate.module \certificate_snapshot_save()
Inserts a new snapshot, or updates an existing one.
Parameters
$certificate: A certificate to be saved. If $certificate['cid'] is set, the certificate will be updated. Otherwise, a new certificate will be inserted into the database.
Return value
The saved certificate, with its ID set.
See also
1 call to certificate_snapshot_save()
- certificate_single in ./
certificate.pages.inc - Generate a single certificate.
File
- ./
certificate.module, line 492 - Certificate module.
Code
function certificate_snapshot_save($snapshot) {
if (isset($snapshot['csid'])) {
drupal_write_record('certificate_snapshots', $snapshot, 'csid');
}
else {
drupal_write_record('certificate_snapshots', $snapshot);
}
return $snapshot;
}