summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-11-23 12:32:21 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-11-23 12:32:21 +0000
commit7755003386de4c2492a59cd6b8032b789a52743c (patch)
treef5129bec8df1a038419fecfddd7addca590dcd3d /modules/taxonomy/taxonomy.module
parentb501ff69c6edf703f5f16e8c0ed2dffd781bb793 (diff)
downloadbrdo-7755003386de4c2492a59cd6b8032b789a52743c.tar.gz
brdo-7755003386de4c2492a59cd6b8032b789a52743c.tar.bz2
#194277 by catch: allow contribs to override taxonomy selector forms (with improved performance)
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 1b8e7e10d..dbb3c057e 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -428,9 +428,12 @@ function taxonomy_get_vocabularies($type = NULL) {
/**
* Implementation of hook_form_alter().
* Generate a form for selecting terms to associate with a node.
+ * We check for taxonomy_override_selector before loading the full
+ * vocabulary, so contrib modules can intercept before hook_form_alter
+ * and provide scalable alternatives.
*/
function taxonomy_form_alter(&$form, $form_state, $form_id) {
- if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] .'_node_form' == $form_id) {
+ if (isset($form['type']) && isset($form['#node']) && (!variable_get('taxonomy_override_selector', FALSE)) && $form['type']['#value'] .'_node_form' == $form_id) {
$node = $form['#node'];
if (!isset($node->taxonomy)) {