function revisioning_scheduler_check in Revisioning 6.3
Check to see if there is already a scheduled publish for this revision, if so delete it.
@author Adam Bramley <adam@catalyst.net.nz>
Parameters
$vid the revision id:
$nid the node id:
1 call to revisioning_scheduler_check()
- revisioning_scheduler_revisionapi in revisioning_scheduler/
revisioning_scheduler.module - Implementation of hook_revisionapi Makes sure article is able to be published according to its timestamp.
File
- revisioning_scheduler/
revisioning_scheduler.module, line 141 - Allows for revisions to be published at a specified time and date.
Code
function revisioning_scheduler_check($vid, $nid) {
$query = db_query('SELECT * FROM {revisioning_scheduler} WHERE revision_vid=%d AND revision_nid=%d', $vid, $nid);
while ($revision = db_fetch_array($query)) {
db_query('DELETE FROM {revisioning_scheduler} WHERE revision_vid =%d AND revision_nid=%d', $revision['revision_vid'], $revision['revision_nid']);
}
}