You are here

function _taxonomy_revision_diff_get_next_revision_id in Taxonomy revision 7

Get the entry in the revisions list after $revision_id.

Parameters

array $term_revisions: Array of term revision IDs in descending order.

int $revision_id: Version ID to look for.

Return value

boolean|integer Returns FALSE if $revision_id is the last entry.

1 call to _taxonomy_revision_diff_get_next_revision_id()
taxonomy_revision_diffs_show in ./taxonomy_revision.pages.inc
Create a comparison for the term between versions 'old_revision_id' and 'new_revision_id'.

File

./taxonomy_revision.pages.inc, line 228
UI pages for revisions, similar with pages from node.pages.inc.

Code

function _taxonomy_revision_diff_get_next_revision_id($term_revisions, $revision_id) {
  $previous = NULL;
  foreach ($term_revisions as $revision) {
    if ($revision->revision_id == $revision_id) {
      return $previous ? $previous->revision_id : FALSE;
    }
    $previous = $revision;
  }
  return FALSE;
}