You are here

function views_content_cache_nodequeue_sort_alter in Views content cache 6.2

Implementation of hook_nodequeue_sort_alter().

File

./views_content_cache.module, line 81
Views content cache cache.

Code

function views_content_cache_nodequeue_sort_alter($nodes, $sqid) {

  /**
   * In Nodequeue 6.2.11 this changed from a module hook invoked
   * via module_invoke_all() to a drupal alter hook invoked
   * via drupal_alter(). In this change the parameter order was
   * swapped so the logic below attempts to handle both the old
   * and new versions of Nodequeue.
   */

  // Pre 6.2.11
  if (!is_array($nodes) && is_numeric($nodes)) {
    $tmp = $sqid;
    $sqid = $nodes;
    $nodes = $tmp;
  }
  $subqueue = nodequeue_load_subqueue($sqid);
  views_content_cache_update_set($subqueue, 'nodequeue');
}