/[drupal]/contributions/modules/cck/nodereference.module
ViewVC logotype

Diff of /contributions/modules/cck/nodereference.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.39.2.36, Mon Apr 28 23:50:29 2008 UTC revision 1.39.2.37, Fri Jul 11 13:12:57 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: nodereference.module,v 1.39.2.35 2008/03/24 01:58:34 yched Exp $  // $Id: nodereference.module,v 1.39.2.36 2008/04/28 23:50:29 karens Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 344  function nodereference_widget($op, &$nod Line 344  function nodereference_widget($op, &$nod
344                  form_set_error($error_field, t('%name : Title mismatch. Please check your selection.'), array('%name' => t($field['widget']['label'])));                  form_set_error($error_field, t('%name : Title mismatch. Please check your selection.'), array('%name' => t($field['widget']['label'])));
345                }                }
346              }              }
347                else {
348                  // no explicit nid
349                  $nids = _nodereference_potential_references($field, FALSE, $item['node_name'], TRUE);
350                  if (empty($nids)) {
351                    form_set_error($error_field, t('%name: Found no valid post with that title.', array('%name' => t($field['widget']['label']))));
352                  }
353                  else {
354                    // TODO:
355                    // the best thing would be to present the user with an additional form,
356                    // allowing the user to choose between valid candidates with the same title
357                    // ATM, we pick the first matching candidate...
358                    $nid = array_shift(array_keys($nids));
359                  }
360                }
361            }            }
362          }          }
363          return;          return;

Legend:
Removed from v.1.39.2.36  
changed lines
  Added in v.1.39.2.37

  ViewVC Help
Powered by ViewVC 1.1.2