summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/nodequeue.admin.inc7
-rw-r--r--nodequeue.module2
2 files changed, 8 insertions, 1 deletions
diff --git a/includes/nodequeue.admin.inc b/includes/nodequeue.admin.inc
index f93f278..b2cd98a 100644
--- a/includes/nodequeue.admin.inc
+++ b/includes/nodequeue.admin.inc
@@ -21,6 +21,13 @@ function nodequeue_admin_settings($form, &$form_state) {
'#default_value' => variable_get('nodequeue_tab_name', t('Nodequeue')),
'#description' => t('If nodes will have a menu tab for manipulating related nodequeues, what should that tab be called?'),
);
+ $form['nodequeue_autocomplete_limit'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Nodequeue autocomplete limit'),
+ '#size'=> 2,
+ '#default_value' => variable_get('nodequeue_autocomplete_limit', 10),
+ '#description' => t('Number of node titles to show in the autocomplete search results.'),
+ );
$form['nodequeue_view_per_queue'] = array(
'#type' => 'checkbox',
'#title' => t('Automatically create one view per queue'),
diff --git a/nodequeue.module b/nodequeue.module
index 396e614..b8a1732 100644
--- a/nodequeue.module
+++ b/nodequeue.module
@@ -1756,7 +1756,7 @@ function nodequeue_api_autocomplete($queue, $subqueue, $string) {
->addTag('node_access')
->fields('n', array('nid', 'title'))
->condition('n.type', $queue->types, 'IN')
- ->range(0, 10);
+ ->range(0, variable_get('nodequeue_autocomplete_limit', 10));
$where_args = array();
global $user;