comparison noderef_view.module @ 13:a931d30cbfbc

Si pas de display dans la vue, on return
author Franck Deroche <franck@defr.org>
date Fri, 27 Feb 2009 18:29:06 +0100
parents 97954bccf93f
children e060ad73e358
comparison
equal deleted inserted replaced
12:97954bccf93f 13:a931d30cbfbc
132 $path = ''; 132 $path = '';
133 // Check if there's a view associated with this field 133 // Check if there's a view associated with this field
134 if (isset($field['advanced_view']) && $field['advanced_view'] !== '--') { 134 if (isset($field['advanced_view']) && $field['advanced_view'] !== '--') {
135 $view = views_get_view($field['advanced_view']); 135 $view = views_get_view($field['advanced_view']);
136 // Try to find a path for this view, looking at the displays 136 // Try to find a path for this view, looking at the displays
137 if (!is_array($view->display)) {
138 return '';
139 }
137 $path = ''; 140 $path = '';
138 foreach($view->display as $display) { 141 foreach($view->display as $display) {
139 if (is_array($display->display_options) 142 if (is_array($display->display_options)
140 && isset($display->display_options['path'])) { 143 && isset($display->display_options['path'])) {
141 $path = $display->display_options['path']; 144 $path = $display->display_options['path'];