You are here

function biblio_ipni_clean in Biblio Autocomplete 7

Same name and namespace in other branches
  1. 6 plugins/biblio_ipni/biblio_ipni.module \biblio_ipni_clean()

Function called by array_walk() in biblio_ipni_process_file() to remove artefacts from the IPNI data

Parameters

$value:

1 string reference to 'biblio_ipni_clean'
biblio_ipni_process_file in plugins/biblio_ipni/biblio_ipni.module
IPNI data is delimited by newlines and the % character, this function parses this format into an array

File

plugins/biblio_ipni/biblio_ipni.module, line 200
Provides autocompletion of Biblio fields from IPNI.

Code

function biblio_ipni_clean(&$value) {
  if (is_array($value)) {
    array_walk($value, 'biblio_ipni_clean');
  }
  else {
    if (drupal_substr($value, 0, 1) == '>') {
      $value = drupal_substr($value, 1);
    }
  }
}