You are here

function nodequeue_get_query_string in Nodequeue 6.2

Same name and namespace in other branches
  1. 5.2 nodequeue.module \nodequeue_get_query_string()
  2. 7.3 nodequeue.module \nodequeue_get_query_string()
  3. 7.2 nodequeue.module \nodequeue_get_query_string()

Generate a query string to use on nodequeue's private links.

Parameters

$seed: The seed to use when generating a token. If NULL no token will be generated.

$destination: The destination to use. If FALSE one won't be used; if TRUE one will be generated from drupal_get_destination().

$query: An array of additional items to add to the query.

Return value

The query string suitable for use in the l() function.

3 calls to nodequeue_get_query_string()
nodequeue_admin_add_node in includes/nodequeue.admin.inc
Page callback to add a node to a queue.
nodequeue_admin_remove_node in includes/nodequeue.admin.inc
Page callback to remove a node from a queue.
nodequeue_link in ./nodequeue.module
Implementation of hook_link().

File

./nodequeue.module, line 1712
Maintains queues of nodes in arbitrary order.

Code

function nodequeue_get_query_string($seed, $destination = FALSE, $query = array()) {
  if ($dest = drupal_get_destination()) {
    $query[] = $dest;
  }
  if (isset($seed)) {
    $query[] = nodequeue_get_token($seed);
  }
  return implode('&', $query);
}