You are here

public function ISBNtest::set_isbn13 in Biblio Advanced Import 7

Same name and namespace in other branches
  1. 6 lib/isbntest.class.php \ISBNtest::set_isbn13()
3 calls to ISBNtest::set_isbn13()
ISBNtest::get_isbn13 in lib/isbntest.class.php
ISBNtest::set_isbn in lib/isbntest.class.php
ISBNtest::valid_isbn13 in lib/isbntest.class.php

File

lib/isbntest.class.php, line 115

Class

ISBNtest

Code

public function set_isbn13($isbn) {
  $isbn = preg_replace("@[^0-9]@", "", strtoupper($isbn));

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