public function ISBNtest::set_isbn10 in Biblio Advanced Import 7
Same name and namespace in other branches
- 6 lib/isbntest.class.php \ISBNtest::set_isbn10()
2 calls to ISBNtest::set_isbn10()
File
- lib/
isbntest.class.php, line 100
Class
Code
public function set_isbn10($isbn) {
$isbn = preg_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;
}
}