You are here

public function ISBNtest::set_isbn10 in Biblio Advanced Import 6

Same name and namespace in other branches
  1. 7 lib/isbntest.class.php \ISBNtest::set_isbn10()
2 calls to ISBNtest::set_isbn10()
ISBNtest::get_isbn10 in lib/isbntest.class.php
ISBNtest::valid_isbn10 in lib/isbntest.class.php

File

lib/isbntest.class.php, line 100

Class

ISBNtest

Code

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

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