function _diff_get_previous_vid in Diff 6.2
Same name and namespace in other branches
- 5.2 diff.module \_diff_get_previous_vid()
- 5 diff.module \_diff_get_previous_vid()
- 6 diff.module \_diff_get_previous_vid()
- 7.3 diff.pages.inc \_diff_get_previous_vid()
- 7.2 diff.pages.inc \_diff_get_previous_vid()
Get the entry in the revision list before $vid. Returns FALSE if $vid is the first entry.
Parameters
$node_revisions: Array of node revision IDs in descending order.
$vid: Version ID to look for.
2 calls to _diff_get_previous_vid()
- diff_diffs_show in ./
diff.pages.inc - Create output string for a comparison of 'node' between versions 'old_vid' and 'new_vid'.
- diff_inline_show in ./
diff.pages.inc - Show the inline diff for a given node, vid. If vid = 0 or no previous vid exists for the given revision returns the normally rendered content of the specified revision.
File
- ./
diff.pages.inc, line 395 - Menu callbacks for hook_menu().
Code
function _diff_get_previous_vid($node_revisions, $vid) {
$previous = NULL;
foreach ($node_revisions as $revision) {
if ($previous && $previous->vid == $vid) {
return $revision->vid;
}
$previous = $revision;
}
return FALSE;
}