Commit ba0f4648 authored by git's avatar git Committed by Dave Reid
Browse files

Issue #1303844: Cache node tokens by revision ID rather than node ID to...

Issue #1303844: Cache node tokens by revision ID rather than node ID to different node revisions can get proper tokens in the same request.
parent d6a90238
Loading
Loading
Loading
Loading
+1 −1
Changes for token.module: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -455,7 +455,7 @@ function _token_get_id($type = 'global', $object = NULL) {
  }
  switch ($type) {
    case 'node':
      return isset($object->nid) ? $object->nid : 0;
      return isset($object->vid) ? $object->vid : (isset($object->nid) ? $object->nid : 0);
    case 'comment':
      return isset($object->cid) ? $object->cid : 0;
    case 'user':