diff --git a/includes/admin.inc b/includes/admin.inc
index 4d1d32f83e7248446be62be76c7253f0d5ef0a62..c4a262c55c2a0d92b33f78b0eb9ba28aac392be3 100644
--- a/includes/admin.inc
+++ b/includes/admin.inc
@@ -811,7 +811,7 @@ function views_ui_edit_view_form_cancel($form, &$form_state) {
}
function views_ui_edit_view_form_delete($form, &$form_state) {
- // Remove this view from cache so edits will be lost.
+ // Redirect to the delete confirm page
$form_state['redirect'] = array('admin/build/views/delete/' . $form_state['view']->name, 'cancel=admin/build/views/edit/' . $form_state['view']->name);
}
diff --git a/includes/handlers.inc b/includes/handlers.inc
index 9721a7ce17ba7de6401fc624bab420b4158aa169..268b9afb7eb15d92eb09acc940cddf7825bb0c7d 100644
--- a/includes/handlers.inc
+++ b/includes/handlers.inc
@@ -323,6 +323,19 @@ class views_handler extends views_object {
* Take input from exposed filters and assign to this handler, if necessary.
*/
function accept_exposed_input($input) { return TRUE; }
+
+ /**
+ * Get the join object that should be used for this handler.
+ *
+ * This method isn't used a great deal, but it's very handy for easily
+ * getting the join if it is necessary to make some changes to it, such
+ * as adding an 'extra'.
+ */
+ function get_join() {
+ // get the join from this table that links back to the base table.
+ return drupal_clone(views_get_table_join($this->table, $this->query->base_table));
+ }
+
}
/**
@@ -417,7 +430,7 @@ class views_many_to_one_helper {
}
function get_join() {
- return drupal_clone(views_get_table_join($this->handler->table, $this->handler->query->base_table));
+ return $this->handler->get_join();
}
/**
diff --git a/includes/plugins.inc b/includes/plugins.inc
index e370cab9d20bc6d0ace043f23d000750388e108c..6a232c29153b8f6dab9ac95ddc5b21d590fc5d07 100644
--- a/includes/plugins.inc
+++ b/includes/plugins.inc
@@ -888,13 +888,13 @@ class views_plugin_display extends views_plugin {
'#suffix' => '',
'#title' => t('Type'),
'#type' => 'radios',
- '#options' => array('none' => t('Unrestricted'), 'role' => t('By role'), 'perm' => t('By perm')),
+ '#options' => array('none' => t('Unrestricted'), 'role' => t('By role'), 'perm' => t('By permission')),
'#default_value' => $access['type'],
);
$form['access']['role'] = array(
// Add an id to the surrounding div because checkboxes don't get ids
// as a whole group. =(
- '#prefix' => '
',
+ '#prefix' => '
',
'#type' => 'checkboxes',
'#title' => t('If by role'),
@@ -917,7 +917,7 @@ class views_plugin_display extends views_plugin {
'#suffix' => '
',
'#type' => 'select',
'#options' => $perms,
- '#title' => t('If by perm'),
+ '#title' => t('If by permission'),
'#default_value' => $access['perm'],
'#description' => t('Only users with the selected permission flag will be able to access this display.'),
'#process' => array('views_process_dependency'),
@@ -1670,6 +1670,7 @@ class views_plugin_display_page extends views_plugin_display {
$bit = array_pop($bits);
// we can't do this if they tried to make the last path bit variable.
+ // @todo: We can validate this.
if ($bit != '%views_arg' && !empty($bits)) {
$default_path = implode('/', $bits);
$items[$default_path] = array(
@@ -1692,9 +1693,9 @@ class views_plugin_display_page extends views_plugin_display {
$items[$default_path]['type'] = MENU_LOCAL_TASK;
break;
}
- }
- if (isset($tab_options['weight'])) {
- $items[$default_path]['weight'] = intval($tab_options['weight']);
+ if (isset($tab_options['weight'])) {
+ $items[$default_path]['weight'] = intval($tab_options['weight']);
+ }
}
}
diff --git a/modules/taxonomy.views.inc b/modules/taxonomy.views.inc
index e18ebea1f8fb6d820c0684ba67b06aedd828f507..a6814bc2bc78c28b5a7ca49c470cbd5525b60524 100644
--- a/modules/taxonomy.views.inc
+++ b/modules/taxonomy.views.inc
@@ -709,7 +709,7 @@ class views_handler_filter_term_node_tid extends views_handler_filter_many_to_on
'#type' => 'radios',
'#title' => t('Vocabulary'),
'#options' => $options,
- '#description' => t('Select which vocabulary to show terms for in the regular options'),
+ '#description' => t('Select which vocabulary to show terms for in the regular options.'),
'#default_value' => $this->options['vid'],
);
@@ -950,7 +950,12 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
return empty($test);
case 'name':
case 'convert':
- $result = db_fetch_object(db_query("SELECT td.* FROM {term_data} td LEFT JOIN {term_synonym} ts ON ts.tid = td.tid WHERE td.name = '%s' OR ts.name = '%s'", $argument, $argument));
+ $and = '';
+ if (!empty($vids)) {
+ $and = " AND td.vid IN(" . implode(', ', $vids) . ')';
+ }
+
+ $result = db_fetch_object(db_query("SELECT td.* FROM {term_data} td LEFT JOIN {term_synonym} ts ON ts.tid = td.tid WHERE (td.name = '%s' OR ts.name = '%s')$and", $argument, $argument));
if (!$result) {
return FALSE;
}
@@ -959,7 +964,7 @@ class views_plugin_argument_validate_taxonomy_term extends views_plugin_argument
$this->argument->argument = $result->tid;
}
- return empty($vids) || !empty($vids[$result->vid]);
+ return TRUE;
}
}
}