43 lines
942 B
PHP
43 lines
942 B
PHP
<?php
|
|
|
|
class workpaper extends _publication {
|
|
|
|
protected $type = 3;
|
|
|
|
|
|
|
|
|
|
|
|
// each type has its own master record
|
|
// THIS ONLY ADDS article (master of publication)
|
|
protected function _addMaster() {
|
|
|
|
if (!$this->_isPublisher()) {
|
|
$this->_addPublisher();
|
|
}
|
|
|
|
try {
|
|
// citation is not standardized, so we cannot get details.
|
|
// just insert it to get ID
|
|
$stmt = $this->PDO->prepare("INSERT INTO p_workPaper (id_inst) VALUES (:publisher)");
|
|
|
|
$stmt->execute(array('publisher'=>$this->publisher_id));
|
|
|
|
$master_id = $this->PDO->lastInsertId();
|
|
|
|
return $master_id;
|
|
}
|
|
catch (exception $ex) {
|
|
common::except ('Err: ' .$ex .' in ' .__DIR__ .'/' .__FILE__ .':' .__LINE__);
|
|
}
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|