? .DS_Store
? 318207-6.patch
? 321866.patch
? 343905.patch
? 343905.patch.1
? nodequeue-toggle-class-2.patch
? nodequeue_fix_requirements.patch
Index: nodequeue.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodequeue/nodequeue.module,v
retrieving revision 1.66
diff -u -p -r1.66 nodequeue.module
--- nodequeue.module	26 Dec 2008 00:48:17 -0000	1.66
+++ nodequeue.module	26 Dec 2008 02:22:41 -0000
@@ -1571,12 +1571,12 @@ function nodequeue_queue_access($queue, 
  * Fetch a list of available queues for a given location. These queues
  * will be fully loaded and ready to go.
  */
-function nodequeue_load_queues_by_type($type, $location = NULL, $account = NULL) {
-  $qids = nodequeue_get_qids($type, $account);
+function nodequeue_load_queues_by_type($type, $location = NULL, $account = NULL, $bypass_cache = FALSE) {
+  $qids = nodequeue_get_qids($type, $account, $bypass_cache);
   if ($location) {
     nodequeue_filter_qids($qids, $location);
   }
-  return nodequeue_load_queues(array_keys($qids));
+  return nodequeue_load_queues(array_keys($qids), $bypass_cache);
 }
 
 /**
@@ -1661,15 +1661,18 @@ function nodequeue_filter_qids(&$qids, $
  * @return $qids
  *   An array in the format: @code { array($qid => array('qid' => $qid, 'show_in_tab' '
  *   => true/false, 'show_in_links' => true/false }
+ * 
+ * @param $bypass_cache
+ *  Boolean value indicating whether to bypass the cache or not.
  */
-function nodequeue_get_qids($type, $account = NULL) {
+function nodequeue_get_qids($type, $account = NULL, $bypass_cache = FALSE) {
   if (!isset($account)) {
     global $user;
     $account = $user;
   }
 
   static $cache = array();
-  if (!isset($cache[$type])) {
+  if ($bypass_cache || !isset($cache[$type])) {
     $roles_join = $roles_where = '';
     $roles = array();
 
@@ -1708,11 +1711,13 @@ function nodequeue_get_qids($type, $acco
  *
  * @return $qids
  *   An array in the format: @code { array($qid => array('qid' => $qid, 'show_in_tab' '
- *   => true/false, 'show_in_links' => true/false }
+ *    => true/false, 'show_in_links' => true/false }
+ * @param $bypass_cache
+ *   Boolean value indicating whether to bypass the cache or not.
  */
-function nodequeue_get_all_qids($page_size = 25, $pager_element = 0) {
+function nodequeue_get_all_qids($page_size = 25, $pager_element = 0, $bypass_cache = FALSE) {
   static $cache = NULL;
-  if (!isset($cache)) {
+  if ($bypass_cache || !isset($cache)) {
     $sql = 'SELECT nq.qid '.
            'FROM {nodequeue_queue} nq '.
            'WHERE nq.show_in_ui = 1 ';
@@ -1743,13 +1748,16 @@ function nodequeue_get_all_qids($page_si
  *
  * @param $qids
  *   An array of queue IDs to load.
+ * 
+ * @param $bypass_cache
+ *   Boolean value indicating whether to bypass the cache or not.
  */
-function nodequeue_load_queues($qids = array()) {
+function nodequeue_load_queues($qids = array(), $bypass_cache = FALSE) {
   static $cache = array();
   $to_load = $queues = array();
 
   foreach ($qids as $qid) {
-    if (!isset($cache[$qid])) {
+    if ($bypass_cache || !isset($cache[$qid])) {
       $to_load[] = $qid;
     }
   }
Index: includes/nodequeue.actions.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodequeue/includes/nodequeue.actions.inc,v
retrieving revision 1.3
diff -u -p -r1.3 nodequeue.actions.inc
--- includes/nodequeue.actions.inc	24 Dec 2008 21:21:01 -0000	1.3
+++ includes/nodequeue.actions.inc	26 Dec 2008 02:22:42 -0000
@@ -39,7 +39,7 @@ function nodequeue_add_action_form($cont
     $context['qids'] = '';
   }
 
-  $queues = nodequeue_load_queues(nodequeue_get_all_qids(500));
+  $queues = nodequeue_load_queues(nodequeue_get_all_qids(500, TRUE), TRUE);
   foreach ($queues as $qid => $queue) {
     $options[$qid] = $queue->title;
   }
@@ -75,7 +75,7 @@ function nodequeue_add_action_submit($fo
  * Action to add a node to a queue.
  */
 function nodequeue_add_action($node, $context) {
-  $queues = nodequeue_load_queues($context['qids']);
+  $queues = nodequeue_load_queues($context['qids'], TRUE);
   // Filter out queues by node type. We choose not to use nodequeue_get_qids() because it checks for access control which only matters if we administering a queue.
   $eligible_queues = array();
   foreach ($queues as $queue) {
@@ -113,7 +113,7 @@ function action_nodequeue_add($op, $edit
       break;
 
     case 'do':
-      $queues = nodequeue_load_queues($edit['qids']);
+      $queues = nodequeue_load_queues($edit['qids'], TRUE);
       // Filter out queues by node type. We choose not to use nodequeue_get_qids() because it checks for access control which only matters if we administering a queue.
       $eligible_queues = array();
       foreach ($queues as $queue) {
@@ -140,8 +140,7 @@ function action_nodequeue_add($op, $edit
     case 'form':
       // default values for form
       if (!isset($edit['qids'])) $edit['qids'] = '';
-
-      $queues = nodequeue_load_queues(nodequeue_get_all_qids(500));
+      $queues = nodequeue_load_queues(nodequeue_get_all_qids(500, TRUE), TRUE);
       foreach ($queues as $qid => $queue) {
         $options[$qid] = $queue->title;
       }
@@ -184,7 +183,7 @@ function nodequeue_remove_action_form($c
     $context['qids'] = array();
   }
 
-  $queues = nodequeue_load_queues(nodequeue_get_all_qids(500));
+  $queues = nodequeue_load_queues(nodequeue_get_all_qids(500, TRUE), TRUE);
   foreach ($queues as $qid => $queue) {
     $options[$qid] = $queue->title;
   }
@@ -258,7 +257,7 @@ function action_nodequeue_remove($op, $e
       // default values for form
       if (!isset($edit['qids'])) $edit['qids'] = array();
 
-      $queues = nodequeue_load_queues(nodequeue_get_all_qids(500));
+      $queues = nodequeue_load_queues(nodequeue_get_all_qids(500, TRUE), TRUE);
       foreach ($queues as $qid => $queue) {
         $options[$qid] = $queue->title;
       }
