Skip to content
Snippets Groups Projects
Commit fd5ab78b authored by Brandon Bergren's avatar Brandon Bergren
Browse files

Add a forgotten ensure_table() call and fix the aliases used when adding the location fields.

As a side effect, this means that using a location_cck relationship will now do the right thing for a gmap view.
parent 1aa3a767
No related branches found
No related tags found
No related merge requests found
...@@ -34,8 +34,9 @@ class gmap_plugin_style_gmap extends views_plugin_style { ...@@ -34,8 +34,9 @@ class gmap_plugin_style_gmap extends views_plugin_style {
function query() { function query() {
if ($this->options['datasource'] == 'location') { if ($this->options['datasource'] == 'location') {
$this->view->query->add_field('location', 'latitude', 'gmap_lat'); $table = $this->view->query->ensure_table('location');
$this->view->query->add_field('location', 'longitude', 'gmap_lon'); $this->view->query->add_field($table, 'latitude', 'gmap_lat');
$this->view->query->add_field($table, 'longitude', 'gmap_lon');
} }
if ($this->options['markers'] == 'nodetype') { if ($this->options['markers'] == 'nodetype') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment