Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…overy into 24.07.00
  • Loading branch information
catsoup11789 committed Jun 12, 2024
2 parents 6d2d162 + f2f92b3 commit 4fba418
Show file tree
Hide file tree
Showing 18 changed files with 83 additions and 31 deletions.
3 changes: 2 additions & 1 deletion code/aspen_app/src/screens/Auth/LoginForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ export const GetLoginForm = (props) => {
await SecureStore.setItemAsync('userKey', valueUser);
await SecureStore.setItemAsync('secretKey', valueSecret);
await AsyncStorage.setItem('@lastStoredVersion', Constants.expoConfig.version);
const autoPickUserHomeLocation = LIBRARY.appSettings?.autoPickUserHomeLocation ?? 0;

if (PATRON.homeLocationId && !_.includes(GLOBALS.slug, 'aspen-lida')) {
if (PATRON.homeLocationId && !_.includes(GLOBALS.slug, 'aspen-lida') && autoPickUserHomeLocation === 1) {
console.log(PATRON.homeLocationId);
await getLocationInfo(GLOBALS.url, PATRON.homeLocationId).then(async (patronsLibrary) => {
if (!_.isUndefined(patronsLibrary.baseUrl)) {
Expand Down
3 changes: 2 additions & 1 deletion code/aspen_app/src/screens/BrowseCategory/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,15 @@ export const DiscoverHomeScreen = () => {
return loadingSpinner();
}

/*
// load notification onboarding prompt
if (isQueryFetching === 0 && preliminaryLoadingCheck) {
if (notificationOnboard !== '0' && notificationOnboard !== 0) {
if (isFocused && promptOpen === 'yes') {
return <NotificationsOnboard isFocused={isFocused} promptOpen={promptOpen} setPromptOpen={setPromptOpen} />;
}
}
}
}*/

const clearSearch = () => {
setSearchTerm('');
Expand Down
Binary file modified code/reindexer/reindexer.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,14 @@ public void setId(String id) {
}

private final static Pattern removeBracketsPattern = Pattern.compile("\\[.*?]");
private final static Pattern commonSubtitlePattern = Pattern.compile("(?i)([(]?(?:a )?graphic novel|audio cd|book club kit|large print[)]?)$");
private final static Pattern commonSubtitlePattern = Pattern.compile("(?i)([(]?(?:\\s?a\\s?|\\s?the\\s?)?graphic novel|audio cd|book club kit|large print[)]?)$");
private final static Pattern punctuationPattern = Pattern.compile("[.\\\\/()\\[\\]:;]");

void setTitle(String shortTitle, String subTitle, String displayTitle, String sortableTitle, String recordFormat, String formatCategory) {
this.setTitle(shortTitle, subTitle, displayTitle, sortableTitle, formatCategory, false);
}

void setTitle(String shortTitle, String subTitle, String displayTitle, String sortableTitle, String formatCategory, boolean forceUpdate) {
void setTitle(String shortTitle, String subTitle, String displayTitle, String sortableTitle, String formatCategory, boolean isDisplayInfo) {
if (shortTitle != null) {
shortTitle = AspenStringUtils.trimTrailingPunctuation(shortTitle);

Expand Down Expand Up @@ -456,17 +456,19 @@ void setTitle(String shortTitle, String subTitle, String displayTitle, String so
}
}

if (updateTitle || forceUpdate) {
if (updateTitle || isDisplayInfo) {
//Strip out anything in brackets unless that would cause us to show nothing
String tmpTitle = removeBracketsPattern.matcher(shortTitle).replaceAll("").trim();
if (!tmpTitle.isEmpty()) {
shortTitle = tmpTitle;
}
//Remove common formats
tmpTitle = commonSubtitlePattern.matcher(shortTitle).replaceAll("").trim();
if (!tmpTitle.isEmpty()) {
shortTitle = tmpTitle;
}
//Do not remove common subtitle from display info
//if (!isDisplayInfo) {
tmpTitle = commonSubtitlePattern.matcher(shortTitle).replaceAll("").trim();
if (!tmpTitle.isEmpty()) {
shortTitle = tmpTitle;
}
//}
this.title = shortTitle;
this.titleFormat = formatCategory;
//Strip out anything in brackets unless that would cause us to show nothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private float getKohaVersion(Connection kohaConn){

@Override
protected boolean isItemAvailable(ItemInfo itemInfo, String displayStatus, String groupedStatus) {
return !inTransitItems.contains(itemInfo.getItemIdentifier()) && displayStatus.equals("On Shelf") || (settings.getTreatLibraryUseOnlyGroupedStatusesAsAvailable() && groupedStatus.equals("Library Use Only"));
return !inTransitItems.contains(itemInfo.getItemIdentifier()) && groupedStatus.equals("On Shelf") || (settings.getTreatLibraryUseOnlyGroupedStatusesAsAvailable() && groupedStatus.equals("Library Use Only"));
}

private final HashSet<String> additionalStatuses = new HashSet<>();
Expand Down
2 changes: 1 addition & 1 deletion code/web/Drivers/HorizonAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require_once ROOT_DIR . '/Drivers/Horizon.php';

abstract class HorizonAPI extends Horizon {
abstract class HorizonAPI extends AbstractIlsDriver {

//TODO: Additional caching of sessionIds by patron
private static $sessionIdsForUsers = [];
Expand Down
2 changes: 1 addition & 1 deletion code/web/Drivers/PalaceProjectDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function loadCirculationInformation(User $patron) {
}

$headers = $this->getPalaceProjectHeaders($patron);
$checkoutsUrl = $settings->apiUrl . "/" . $settings->libraryId . "/loans";
$checkoutsUrl = $settings->apiUrl . "/" . $settings->libraryId . "/loans?refresh=false";

$this->initCurlWrapper();
$this->curlWrapper->addCustomHeaders($headers, true);
Expand Down
4 changes: 2 additions & 2 deletions code/web/Drivers/Sierra.php
Original file line number Diff line number Diff line change
Expand Up @@ -835,9 +835,9 @@ function freezeHold($patron, $recordId, $itemToFreezeId, $dateToReactivate): arr
];
} else {
$return = [
'success' => true,
'success' => false,
'message' => translate([
'text' => "Unable to freeze your hold.",
'text' => 'Unable to freeze your hold.',
'isPublicFacing' => true,
]),
'api' => [
Expand Down
8 changes: 8 additions & 0 deletions code/web/Drivers/SirsiDynixROA.php
Original file line number Diff line number Diff line change
Expand Up @@ -3449,6 +3449,10 @@ public function showDateWhenSuspending(): bool {
return true;
}

public function showOutDateInCheckouts(): bool {
return true;
}

public function reactivateDateNotRequired(): bool {
return true;
}
Expand All @@ -3457,6 +3461,10 @@ public function showTimesRenewed(): bool {
return true;
}

public function showWaitListInCheckouts(): bool {
return true;
}

public function showHoldPlacedDate(): bool {
return true;
}
Expand Down
17 changes: 9 additions & 8 deletions code/web/cron/importAspenBackup.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@
if (strpos($exportFile, ".sql") > 0 && strpos($exportFile, 'mysql') === false) {
// Trimming the first two lines of the file
$filePath = $sqlBackupDir . $exportFile;
$fileContents = file($filePath);
if ($fileContents !== false) {
if ($fileContents[0] == "/*!999999\- enable the sandbox mode */\n"){
$trimmedContents = array_slice($fileContents, 1);
file_put_contents($filePath, implode("", $trimmedContents));
}
}
$fhnd = fopen($filePath, 'r');
$line = fgets($fhnd);
fclose($fhnd);

echo("Importing $exportFile\n");
$importCommand = "mysql -u$dbUser -p$dbPassword -h$dbHost -P$dbPort $dbName < $sqlBackupDir$exportFile ";
if (strpos($line, "/*!999999\- enable the sandbox mode") === 0){
$importCommand = "mysql -u$dbUser -p$dbPassword -h$dbHost -P$dbPort -D $dbName --force < $sqlBackupDir$exportFile";
}else{
$importCommand = "mysql -u$dbUser -p$dbPassword -h$dbHost -P$dbPort $dbName < $sqlBackupDir$exportFile ";
}

$results = [];
exec($importCommand, $results);
echo(implode("\n", $results));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
<input type="hidden" name="termId" value="{$translationTerm->id}" id="termId">
<input type="hidden" name="translationId" value="{$translation->id}" id="translationId">
<input type="hidden" name="method" value="translateTerm">

<div class="form-group">
<label for="originalTerm" class="control-label">{translate text='Original Term' isAdminFacing=true}</label>
<textarea id="originalTerm" name="originalTerm" class="form-control" readonly>{$translationTerm->getTerm()}</textarea>
</div>

{if !empty($englishTranslation)}
<div class="form-group">
<label for="englishTranslation" class="control-label">{translate text='English Translation' isAdminFacing=true}</label>
Expand Down
8 changes: 4 additions & 4 deletions code/web/interface/themes/responsive/theme.css.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,13 @@ div.striped > div:nth-child(odd), div.striped > div:nth-child(odd){ldelim}
background-color: {$browseCategoryPanelColor};
{rdelim}
.browse-category,#browse-sub-category-menu button{ldelim}
.browse-category,#browse-sub-category-menu button, .manual [role="tab"]{ldelim}
background-color: {$deselectedBrowseCategoryBackgroundColor} !important;
border-color: {$deselectedBrowseCategoryBorderColor} !important;
color: {$deselectedBrowseCategoryForegroundColor} !important;
{rdelim}
.browse-category.selected,.browse-category.selected:hover,#browse-sub-category-menu button.selected,#browse-sub-category-menu button.selected:hover{ldelim}
.browse-category.selected,.browse-category.selected:hover,#browse-sub-category-menu button.selected,#browse-sub-category-menu button.selected:focus,#browse-sub-category-menu button.selected:hover,#browse-sub-category-menu button:focus,#browse-sub-category-menu button:hover, .manual [role="tab"]:focus, .manual [role="tab"]:hover, .manual [role="tab"][aria-selected="true"]{ldelim}
border-color: {$selectedBrowseCategoryBorderColor} !important;
background-color: {$selectedBrowseCategoryBackgroundColor} !important;
color: {$selectedBrowseCategoryForegroundColor} !important;
Expand Down Expand Up @@ -449,13 +449,13 @@ div.striped > div:nth-child(odd), div.striped > div:nth-child(odd){ldelim}
border-color: {$defaultButtonBorderColor};
{rdelim}
.btn-primary,.btn-primary:visited,a.btn-primary,a.btn-primary:visited, .manual [role="tab"]{ldelim}
.btn-primary,.btn-primary:visited,a.btn-primary,a.btn-primary:visited{ldelim}
background-color: {$primaryButtonBackgroundColor} !important;
color: {$primaryButtonForegroundColor} !important;
border-color: {$primaryButtonBorderColor};
{rdelim}
.btn-primary:hover, a.btn-primary:hover, .btn-primary:focus, a.btn-primary:focus, .btn-primary:active, a.btn-primary:active, .btn-primary.active, .open .dropdown-toggle.btn-primary, .manual [role="tab"]:focus, .manual [role="tab"]:hover, .manual [role="tab"][aria-selected="true"]{ldelim}
.btn-primary:hover, a.btn-primary:hover, .btn-primary:focus, a.btn-primary:focus, .btn-primary:active, a.btn-primary:active, .btn-primary.active, .open .dropdown-toggle.btn-primary{ldelim}
background-color: {$primaryButtonHoverBackgroundColor} !important;
color: {$primaryButtonHoverForegroundColor} !important;
border-color: {$primaryButtonHoverBorderColor};
Expand Down
5 changes: 4 additions & 1 deletion code/web/release_notes/24.05.02.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
- Correct indexing Polaris Items when new items are found that have not been indexed previously. (*MDN*)

### Symphony Updates
- Immediately delete MARC files after they have been processed. (Ticket 128804) (*MDN*)
- Immediately delete MARC files after they have been processed. (Ticket 128804) (*MDN*)

### Other Updates
- Update import script to ignore sandbox mode if not available. (*MDN*)

## This release includes code contributions from
- ByWater Solutions
Expand Down
3 changes: 3 additions & 0 deletions code/web/release_notes/24.05.10.MD
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
- Update phone numbers appropriately based on primary and work phone numbers in Contact Information. (Ticket 126596) (*MDN*)
- When using the "Pickup at" setting within the Format Map, properly load available locations when the location code is not the entire location code of the item. (Tickets 128864, 130706) (*MDN*)

### Symphony Updates
- Remove dependency on old Horizon driver. (*MDN*)

### User Account Updates
- Allow work phone to be updated independently of the main phone number.

Expand Down
7 changes: 7 additions & 0 deletions code/web/release_notes/24.06.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- On the Checkouts screen, the Access Online action for Libby items will now properly again open the content in the in-app browser. (*KK*)
- Added an alert to warn Android 11 or older users that they will no longer receive app updates. (*KK*)
- Updated the minimum iOS version to 16, users with older versions will no longer receive app updates or be able to download the app. (*KK*)
- Removed the Notification Onboarding prompt. (*KK*)

## Aspen Discovery Updates

Expand Down Expand Up @@ -90,6 +91,7 @@
- Translate error messages while performing self registration. (Ticket 133351) (*MDN*)
- If a patron has an extended attribute of SHOUTBOMB, show that attribute on the messaging preferences page in addition to showing it on the contact information page. (Ticket 128982) (*MDN*)
- Show a blank value for Koha extended attributes if they are not required, and they are linked to an authorised value. (Ticket 128982) (*MDN*)
- Show the correct availability for titles when the default available status is not set to On Shelf. (Ticket 132534) (*MDN*)

### Location Updates
- Fixed a bug where updating coordinates required two saves to properly store the values from the Google API. (*KK*)
Expand All @@ -98,6 +100,9 @@
- Removed Magazines from Lending Periods on the Options page due to OverDrive no longer supporting it. (Tickets 120811, 123307) (*KK*)
- Show when a record has been ungrouped from other works within staff view and allow them to be regrouped. (*MDN*)

### Palace Project Updates
- When checking for titles checked out within Palace Project add a parameter to not check external systems like OverDrive, Boundless, and cloudLibrary. (*MDN*)

### Polaris Updates
- When processing records to reload, force the record to be updated from Polaris during the indexing process. (*MDN*)
- Correct typo within indexing logs. (*MG*)
Expand Down Expand Up @@ -127,6 +132,8 @@
- When linking to ILS course reserves, use the Vendor Opac Url in the Account Profile rather than the URL in config.ini. (Ticket 131388) (*MDN*)
- When using the "Pickup at" setting within the Format Map, properly load available locations when the location code is not the entire location code of the item. (Tickets 128864, 130706) (*MDN*)
- Add additional handling for looking up titles for holds and checkouts if the item id cannot be found in Aspen. (Ticket 130159) (*MDN*)
- When freezing selected or all holds, do not show a prompt for reactivation date. (Tickets 133197, 131688) (*MDN*)
- When freezing holds, make sure that success and error messages show appropriately. (Ticket 127582) (*MDN*)
- Create a new Under Consideration status that can be used for order items that the library has not committed to purchase. (Ticket 128096) (*MDN*)
- Libraries can select which status code is used to generate the new status.
- Titles with a status of Under Consideration will be displayed after all titles that are On Order or that have been previously purchased when sorting by Date Purchased.
Expand Down
7 changes: 7 additions & 0 deletions code/web/release_notes/24.07.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

## Aspen Discovery Updates
// mark
### Indexing Updates
- When stripping subtitles from display titles, handle "the graphic novel" in addition to "a graphic novel" and "graphic novel". (Ticket 132354) (*MDN*)
- Do not remove common subtitles from Display Information that has been manually set. (Ticket 132354) (*MDN*)

### Other Updates
- Show the original translation term when translating text within Aspen. (*MDN*)


// kirstien
### Accessibility Updates
Expand Down
13 changes: 13 additions & 0 deletions code/web/services/MyAccount/AJAX.php
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,13 @@ function freezeHold(): array {
'text' => 'Success',
'isPublicFacing' => true,
]);
}else{
$message = '<div class="alert alert-danger">' . $result['message'] . '</div>';
$result['message'] = $message;
$result['title'] = translate([
'text' => 'Error',
'isPublicFacing' => true,
]);
}

if (!$result['success'] && is_array($result['message'])) {
Expand Down Expand Up @@ -1006,6 +1013,9 @@ function confirmFreezeHoldSelected(): array {
]);

$promptForReactivationDate = $_REQUEST['reactivationDate'] ?? false;
if ($promptForReactivationDate === "false") {
$promptForReactivationDate = false;
}

if($promptForReactivationDate) {
global $interface;
Expand Down Expand Up @@ -1168,6 +1178,9 @@ function confirmFreezeHoldAll(): array {
]);

$promptForReactivationDate = $_REQUEST['reactivationDate'] ?? false;
if ($promptForReactivationDate === "false") {
$promptForReactivationDate = false;
}

if($promptForReactivationDate) {
global $interface;
Expand Down
6 changes: 3 additions & 3 deletions code/web/sys/Email/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ private function sendViaAmazonSes(AmazonSesSetting $amazonSesSettings, string $t

if(!empty($attachments)) {
$i = 0;
foreach($attachments as $attachment) {
if($attachment['name'][$i]) {
$message->addAttachmentFromFile($attachment['name'][$i], $attachment['tmp_name'][$i], $attachment['type'][$i]);
if(isset($attachments['name'])) {
foreach ($attachments['name'] as $attachment) {
$message->addAttachmentFromFile($attachments['name'][$i], $attachments['tmp_name'][$i], $attachments['type'][$i]);
$i++;
}
}
Expand Down

0 comments on commit 4fba418

Please sign in to comment.