Commit 15d77f4a authored by yched's avatar yched

#153284 - followup : also check for 'old' noderef fields that have never been re-edited

 since the upgrade - thanks Karen
parent ee3b3fe5
......@@ -379,7 +379,7 @@ function nodereference_widget($op, &$node, $field, &$items) {
* Fetch an array of all candidate referenced nodes, for use in presenting the selection form to the user.
*/
function _nodereference_potential_references($field, $return_full_nodes = FALSE, $string = '', $exact_string = false) {
if (module_exist('views') && $field['advanced_view'] != '--' && ($view = views_get_view($field['advanced_view']))) {
if (module_exist('views') && isset($field['advanced_view']) && $field['advanced_view'] != '--' && ($view = views_get_view($field['advanced_view']))) {
// advanced field : referenceable nodes defined by a view
// let views.module build the query
......@@ -475,7 +475,7 @@ function nodereference_autocomplete($field_name, $string = '') {
}
function _nodereference_item($field, $item, $html = false) {
if (module_exist('views') && $field['advanced_view'] != '--' && ($view = views_get_view($field['advanced_view']))) {
if (module_exist('views') && isset($field['advanced_view']) && $field['advanced_view'] != '--' && ($view = views_get_view($field['advanced_view']))) {
$output = theme('nodereference_item_advanced', $item, $view);
if (!$html) {
// Views theming runs check_plain (htmlentities) on the values.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment