summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2011-03-26 15:33:31 (GMT)
committer Earl Miles2011-03-26 15:33:31 (GMT)
commitc405f95bfa6f63579b66d12d4471ab5ff9034622 (patch)
treee578708ee739336c3bd55a24c4c0387856c839f6
parentf3d80ebd37d237664a4710f34b3827f56f1528ce (diff)
parent01c5faebfc9c00e80fa496696d0abc5d5eefda58 (diff)
Merge branch '7.x-3.x' of git.drupal.org:project/views into 7.x-3.x
-rw-r--r--handlers/views_handler_filter.inc4
-rw-r--r--includes/admin.inc2
-rw-r--r--includes/handlers.inc12
-rw-r--r--includes/view.inc10
-rw-r--r--modules/comment.views.inc4
-rw-r--r--views.module12
6 files changed, 28 insertions, 16 deletions
diff --git a/handlers/views_handler_filter.inc b/handlers/views_handler_filter.inc
index 6aa6476..1a1190d 100644
--- a/handlers/views_handler_filter.inc
+++ b/handlers/views_handler_filter.inc
@@ -218,8 +218,8 @@ class views_handler_filter extends views_handler {
$form['expose_button'] = array(
'#prefix' => '<div class="views-expose clearfix">',
'#suffix' => '</div>',
- // Should always come first
- '#weight' => -1000,
+ // Should always come after the description and the relationship.
+ '#weight' => -200,
);
// Add a checkbox for JS users, which will have behavior attached to it
diff --git a/includes/admin.inc b/includes/admin.inc
index 18c8f15..c70db76 100644
--- a/includes/admin.inc
+++ b/includes/admin.inc
@@ -4146,7 +4146,7 @@ function views_ui_config_item_form($form, &$form_state) {
'#title' => t('Relationship'),
'#options' => $relationship_options,
'#default_value' => $rel,
- '#fieldset' => 'more',
+ '#weight' => -500,
);
}
else {
diff --git a/includes/handlers.inc b/includes/handlers.inc
index 4348e80..66373eb 100644
--- a/includes/handlers.inc
+++ b/includes/handlers.inc
@@ -99,6 +99,8 @@ function views_get_table_join($table, $base_table) {
return $handler;
}
+
+ vsm_trace();
// DEBUG -- identify missing handlers
vpr("Missing join: $table $base_table");
}
@@ -158,6 +160,16 @@ class views_handler extends views_object {
// Check to see if this handler type is defaulted. Note that
// we have to do a lookup because the type is singular but the
// option is stored as the plural.
+
+ // If the 'moved to' keyword moved our handler, let's fix that now.
+ if (isset($this->actual_table)) {
+ $options['table'] = $this->actual_table;
+ }
+
+ if (isset($this->actual_field)) {
+ $options['field'] = $this->actual_field;
+ }
+
$types = views_object_types();
$plural = $this->handler_type;
if (isset($types[$this->handler_type]['plural'])) {
diff --git a/includes/view.inc b/includes/view.inc
index 82ca247..8018282 100644
--- a/includes/view.inc
+++ b/includes/view.inc
@@ -308,7 +308,7 @@ class view extends views_db_object {
if (empty($this->display[$display_id])) {
$display_id = 'default';
if (empty($this->display[$display_id])) {
- debug(t('set_display() called with invalid display id @display.', array('@display' => $display_id)));
+ vpr('set_display() called with invalid display id @display.', array('@display' => $display_id));
return FALSE;
}
}
@@ -597,14 +597,6 @@ class view extends views_db_object {
if (!empty($this->built)) {
return;
}
-
- // When views are converted automatically the base_table should be renamed
- // to have a working query.
- $data = views_fetch_data($this->base_table, FALSE);
- if (isset($data['moved to'])) {
- $this->base_table = $data['moved to'];
- }
-
if (empty($this->current_display) || $display_id) {
if (!$this->set_display($display_id)) {
diff --git a/modules/comment.views.inc b/modules/comment.views.inc
index 30b3491..82fa612 100644
--- a/modules/comment.views.inc
+++ b/modules/comment.views.inc
@@ -17,8 +17,8 @@
function comment_views_data() {
$data['comments']['moved to'] = 'comment';
- $data['comments']['body']['moved to'] = array('field_data_comment_body', 'comment_body_value');
- $data['comments']['body']['field']['moved to'] = array('field_data_comment_body', 'comment_body');
+ $data['comments']['comment']['moved to'] = array('field_data_comment_body', 'comment_body');
+ $data['comments']['comment']['field']['moved to'] = array('field_data_comment_body', 'comment_body');
// Define the base group of this table. Fields that don't
// have a group defined will go into this field by default.
$data['comment']['table']['group'] = t('Comment');
diff --git a/views.module b/views.module
index c7e1f31..5b61208 100644
--- a/views.module
+++ b/views.module
@@ -983,11 +983,11 @@ function views_include_handlers($reset = FALSE) {
function views_get_handler($table, $field, $key, $override = NULL) {
static $recursion_protection = array();
- $data = views_fetch_data($table);
+ $data = views_fetch_data($table, FALSE);
$handler = NULL;
// Support old views_data entries conversion.
-
+
// Support conversion on table level.
if (isset($data['moved to'])) {
$moved = array($data['moved to'], $field);
@@ -1000,6 +1000,7 @@ function views_get_handler($table, $field, $key, $override = NULL) {
if (isset($data[$field][$key]['moved to'])) {
$moved = $data[$field][$key]['moved to'];
}
+
if (isset($data[$field][$key]) || !empty($moved)) {
if (!empty($moved)) {
list($moved_table, $moved_field) = $moved;
@@ -1007,6 +1008,7 @@ function views_get_handler($table, $field, $key, $override = NULL) {
// recursion detected!
return NULL;
}
+
$recursion_protection[$moved_table][$moved_field] = TRUE;
$handler = views_get_handler($moved_table, $moved_field, $key, $override);
$recursion_protection = array();
@@ -1276,6 +1278,12 @@ function views_get_view($name, $reset = FALSE) {
ctools_include('export');
$view = ctools_export_crud_load('views_view', $name);
if ($view) {
+ // When views are converted automatically the base_table should be renamed
+ // to have a working query.
+ $data = views_fetch_data($view->base_table, FALSE);
+ if (isset($data['moved to'])) {
+ $view->base_table = $data['moved to'];
+ }
return $view->clone_view();
}
}