summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Corbin2013-04-09 15:04:05 (GMT)
committer Sebastien Corbin2013-04-09 15:04:05 (GMT)
commit9a4384a3fc4b969fb68d5198d3e1ee92717422d8 (patch)
tree2fdff63e61234c7e5a49f1311423cee812fbbe23
parent284961e79f8c532ebecd1fd66782938ef1b7da30 (diff)
Issue #1807572 by s.Daniel: Fixed Views Nodequeue Relationship with no queue selected.7.x-3.x
-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 a066747..db73757 100644
--- a/includes/views/nodequeue_handler_relationship_nodequeue.inc
+++ b/includes/views/nodequeue_handler_relationship_nodequeue.inc
@@ -53,6 +53,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['queues'])) {
+ form_set_error('queues', t('You must check at least one queue.'));
+ }
+ }
+
+ /**
* Called to implement a relationship in a query.
*/
function query() {