summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Corbin2013-04-09 15:04:05 (GMT)
committer Sebastien Corbin2013-04-09 15:05:37 (GMT)
commitb26c69d5cd8761bc98f2f95c16f38b8bd452bba4 (patch)
tree7017aad611cc8d80eb1e385724b3da7f94d92c0b
parentc07e9681452569a010d39a53dcbc2a15d144e1b4 (diff)
Issue #1807572 by s.Daniel: Fixed Views Nodequeue Relationship with no queue selected.
-rw-r--r--includes/views/nodequeue_handler_relationship_nodequeue.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/views/nodequeue_handler_relationship_nodequeue.inc b/includes/views/nodequeue_handler_relationship_nodequeue.inc
index c6981d9..50f4a39 100644
--- a/includes/views/nodequeue_handler_relationship_nodequeue.inc
+++ b/includes/views/nodequeue_handler_relationship_nodequeue.inc
@@ -64,6 +64,19 @@ class nodequeue_handler_relationship_nodequeue extends views_handler_relationshi
}
/**
+ * Validate the options form.
+ */
+ function options_validate(&$form, &$form_state) {
+ parent::options_validate($form, $form_state);
+
+ // Check that at least on queue has been selected.
+ $options = $form_state['values']['options'];
+ if($options['limit'] && empty($options['names'])) {
+ form_set_error('names', t('You must check at least one queue.'));
+ }
+ }
+
+ /**
* Called to implement a relationship in a query.
*/
function query() {