Skip to content

Instantly share code, notes, and snippets.

@lkacenja
Last active February 9, 2018 16:08
Show Gist options
  • Save lkacenja/9dde597a013d9029f24c6a6da3888908 to your computer and use it in GitHub Desktop.
Save lkacenja/9dde597a013d9029f24c6a6da3888908 to your computer and use it in GitHub Desktop.
$nodes = node_load_multiple(array(), array('type' => 'trail'));
$watermark = 0;
$limit = 1000;
$offset = 0;
foreach($nodes AS $node) {
if ($watermark + $offset < $limit + $offset ) {
$trail = omf_trails_get_trail($node);
omf_trails_save_trail($node, $trail);
}
$watermark ++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment