You are here

public function ISBNtest::set_gtin14 in Biblio Advanced Import 6

Same name and namespace in other branches
  1. 7 lib/isbntest.class.php \ISBNtest::set_gtin14()
2 calls to ISBNtest::set_gtin14()
ISBNtest::set_isbn in lib/isbntest.class.php
ISBNtest::valid_gtin14 in lib/isbntest.class.php

File

lib/isbntest.class.php, line 130

Class

ISBNtest

Code

public function set_gtin14($isbn) {
  $isbn = ereg_replace("[^0-9]", "", strtoupper($isbn));

  // strip to the basic ISBN
  if (strlen($isbn) == 14) {
    $this->gtin14 = $isbn;
  }
  else {
    $this->error = "GTIN given is not 14 digits ({$isbn})";
    return FALSE;
  }
}