Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DIS-242: simple fix for Open Archives dates #2207

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion code/web/RecordDrivers/OpenArchivesRecordDriver.php
Original file line number Diff line number Diff line change
@@ -54,7 +54,16 @@ public function getSearchResult($view = 'list', $showListsAppearingOn = true) {
$interface->assign('date', $this->fields['date_text']);
} else {
if (array_key_exists('date', $this->fields)) {
$interface->assign('date', $this->fields['date']);
// check to see whether $this->fields['date'] is an array then loop through each member
if (is_array($this->fields['date'])) {
$date = '';
foreach ($this->fields['date'] as $datePart) {
$date .= date('Y-m-d', strtotime($datePart)) . ' ';
}
$interface->assign('date', $date);
} else {
$interface->assign('date', date('Y-m-d', $this->fields['date']));
}
} else {
$interface->assign('date', null);
}
Original file line number Diff line number Diff line change
@@ -112,4 +112,4 @@
</div>
</div>
</div>
{/strip}
{/strip}
2 changes: 2 additions & 0 deletions code/web/release_notes/25.02.00.MD
Original file line number Diff line number Diff line change
@@ -84,6 +84,8 @@
//kirstien

//james
### Open Archives Updates
- Eliminate the time portion of display dates from Aspen Open Archives search results (DIS-242) (*JStaub*)

//alexander