finder_admin_import_custom_matching

  1. finder
    1. 7.x-1.x
Versions
7.x-1.x finder_admin_import_custom_matching(&$finder)

Handle custom matching in imports.

Code

includes/finder.admin.inc, line 1149

<?php
function finder_admin_import_custom_matching(&$finder) {
  // Handle custom matching.
  $custom_matching = variable_get('finder_custom_matching', array());
  foreach ($finder->elements as $feid => &$element) {
    $match = &$element->settings['advanced']['match'];
    if (is_array($match)) {
      $match_data = reset($match);
      $found_key = FALSE;
      foreach ($custom_matching as $custom_key => $custom_match) {
        if ($custom_match['operator'] == $match_data['operator'] && 
          $custom_match['value_prefix'] == $match_data['value_prefix'] && 
          $custom_match['value_suffix'] == $match_data['value_suffix']) {
          $found_key = $custom_key;
        }
      }
      if ($found_key) {
        $match = $found_key;
      }
      else {
        $new = NULL;
        $custom = 0;
        while (is_null($new)) {
          if (!isset($custom_matching['c' . $custom])) {
            $new = array('c' . $custom);
            break;
          }
          $custom++;
        }
        $custom_matching[$new] = $custom_match;
        $match = $new;
      }
    }
  }
  variable_set('finder_custom_matching', $custom_matching);
}
?>

Comments

iqyXreqaegQn

3maLub , [url=http://wyisjfsrirrk.com/]wyisjfsrirrk[/url], [link=http://kqewdgcprapt.com/]kqewdgcprapt[/link], http://oacdeduwnqkt.com/

AJFATpattnfOGXIlqwY

I'm really into it, tkahns for this great stuff!

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.