summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaydub2012-05-15 21:27:27 (GMT)
committer Andrei Mateescu2012-05-15 21:27:27 (GMT)
commit70c0602854643f3f488a20e8f9a88942b07d14fe (patch)
treec0a24dbdcb1e45f31cec1389cbd305cd66d12ab1
parente3cbfc7a0f3867ec1a22af7fd3d89c5247976bf4 (diff)
Issue #1580380 by jaydub: Fixed unable to add nodequeue with the Smartqueue submodule enabled.
-rw-r--r--smartqueue.module8
1 files changed, 5 insertions, 3 deletions
diff --git a/smartqueue.module b/smartqueue.module
index 01f1dc2..d26c67e 100644
--- a/smartqueue.module
+++ b/smartqueue.module
@@ -165,9 +165,11 @@ function smartqueue_nodequeue_alter(&$data, $type) {
switch ($type) {
case 'load_queues':
$queues = array_keys($data);
- $result = db_query("SELECT name, use_parents FROM {smartqueue} WHERE name IN (:queues)", array(':queues' => $queues));
- foreach ($result as $queue) {
- $data[$queue->name]->use_parents = $queue->use_parents;
+ if (count($queues)) {
+ $result = db_query("SELECT name, use_parents FROM {smartqueue} WHERE name IN (:queues)", array(':queues' => $queues));
+ foreach ($result as $queue) {
+ $data[$queue->name]->use_parents = $queue->use_parents;
+ }
}
break;
}