|
|
|
|
@ -122,8 +122,10 @@ class User extends DbMapping
|
|
|
|
|
return $result ? $result->to_array() : array();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function _getLoans($table, $sort = "ItemNr ASC") {
|
|
|
|
|
public function getLoansData($table, $sort = "ItemNr ASC")
|
|
|
|
|
{
|
|
|
|
|
$sql = sprintf("SELECT
|
|
|
|
|
n.NoticeId,
|
|
|
|
|
n.NoticeNr,
|
|
|
|
|
CheckOutDate,
|
|
|
|
|
ItemNr
|
|
|
|
|
@ -134,9 +136,12 @@ class User extends DbMapping
|
|
|
|
|
c.UserAccountID = %s
|
|
|
|
|
ORDER BY %s", $table, $this->id, $sort);
|
|
|
|
|
|
|
|
|
|
$result = Connection::execute($sql);
|
|
|
|
|
return Connection::execute($sql)->to_array();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$circulations = $result->to_array();
|
|
|
|
|
private function _getLoans($table, $sort = "ItemNr ASC")
|
|
|
|
|
{
|
|
|
|
|
$circulations = $this->getLoansData($table, $sort);
|
|
|
|
|
// getting the intval of the NoticeNr will remove any 'V' or 'T' and thus we will have no issues with
|
|
|
|
|
// the virtual books that are used for Downloads and so.
|
|
|
|
|
$codes = array_unique(array_map(function($c) { return intval(trim($c['NoticeNr'])); }, $circulations));
|
|
|
|
|
|