Skip to content

Instantly share code, notes, and snippets.

@rsinger
Created January 15, 2010 16:12
Show Gist options
  • Save rsinger/278157 to your computer and use it in GitHub Desktop.
Save rsinger/278157 to your computer and use it in GitHub Desktop.
// Lines 67-89
if($avail->location) {
$location = "";
$callnumber = "";
list($msg1, $msg2) = split("; ", (string)$avail->location);
if($msg1) {
list($label,$msg) = split(": ", $msg1);
if($label == "Location") {
$location = $msg;
} else {
$callnumber = $msg;
}
}
if($msg2) {
list($label,$msg) = split(": ", $msg2);
if($label == "Location") {
$location = $msg;
} else {
$callnumber = $msg;
}
}
} else {
$location = "";
$callnumber = "";
}
// Lines 94-102
$holding[] = array('id'=>$id,
'availability'=>$available,
'status'=>$status,
'location'=>$location,
'reserve' => 'No',
'callnumber' => $callnumber,
'duedate' => $duedate,
'barcode' => $item['id'],
'number'=>$number++);
// Lines 139-161
if($avail->location) {
$location = "";
$callnumber = "";
list($msg1, $msg2) = split("; ", (string)$avail->location);
if($msg1) {
list($label,$msg) = split(": ", $msg1);
if($label == "Location") {
$location = $msg;
} else {
$callnumber = $msg;
}
}
if($msg2) {
list($label,$msg) = split(": ", $msg2);
if($label == "Location") {
$location = $msg;
} else {
$callnumber = $msg;
}
}
} else {
$location = "";
$callnumber = "";
}
// Lines 166-173
$holding[] = array('id'=>$target['target']->recordPrefix.'-'.$resource,
'availability'=>$available,
'status'=>$status,
'location'=>$location,
'reserve' => 'No',
'callnumber' => $callnumber,
'duedate' => $duedate,
'number'=>$number++);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment