public function ISBNtest::get_isbn13 in Biblio Advanced Import 6
Same name and namespace in other branches
- 7 lib/isbntest.class.php \ISBNtest::get_isbn13()
1 call to ISBNtest::get_isbn13()
File
- lib/
isbntest.class.php, line 308
Class
Code
public function get_isbn13() {
if ($this->isbn13 != FALSE) {
return $this->isbn13;
}
elseif ($this
->valid_isbn10() != FALSE) {
$this
->set_isbn13("978" . substr($this->isbn10, 0, 9) . "0");
// invalid ISBN used as a temp value for next step
$checkdigit = (string) $this
->get_isbn13_checkdigit();
$this
->set_isbn13("978" . substr($this->isbn10, 0, 9) . $checkdigit);
// true value (I hope)
return $this->isbn13;
}
else {
$this->error = "No ISBN-10 value set or calculable";
return FALSE;
}
}