From b2588bd2b85303941b2f588ee64916092f4698ec Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Wed, 3 Jul 2024 12:04:48 -0600 Subject: [PATCH 01/27] Create default 24.08 files --- code/web/release_notes/24.08.00.MD | 41 +++++++++++++++++++ .../version_updates/24.08.00.php | 30 ++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 code/web/release_notes/24.08.00.MD create mode 100644 code/web/sys/DBMaintenance/version_updates/24.08.00.php diff --git a/code/web/release_notes/24.08.00.MD b/code/web/release_notes/24.08.00.MD new file mode 100644 index 0000000000..950cbd63cb --- /dev/null +++ b/code/web/release_notes/24.08.00.MD @@ -0,0 +1,41 @@ +## Aspen LiDA Updates +- + +## Aspen Discovery Updates +// mark + +// kirstien + +// kodi + +// katherine + +// alexander + +// jacob + +// pedro + +// lucas + +// James Staub + +// other + +## This release includes code contributions from +- ByWater Solutions + - Mark Noble (MDN) + - Kirstien Kroeger (KK) + - Kodi Lein (KL) + - Katherine Perdue (KP) + +- Nashville Public Library + - James Staub (JStaub) + +- PTFS-Europe + - Pedro Amorim (PA) + - Alexander Blanchard (AB) + - Jacob O'Mara (JOM) + +- Theke Solutions + - Lucas Montoya (LM) \ No newline at end of file diff --git a/code/web/sys/DBMaintenance/version_updates/24.08.00.php b/code/web/sys/DBMaintenance/version_updates/24.08.00.php new file mode 100644 index 0000000000..09fd104e32 --- /dev/null +++ b/code/web/sys/DBMaintenance/version_updates/24.08.00.php @@ -0,0 +1,30 @@ + [ + 'title' => '', + 'description' => '', + 'continueOnError' => false, + 'sql' => [ + '' + ] + ], //name*/ + + //mark - ByWater + + //kirstien - ByWater + + //kodi - ByWater + + //katherine - ByWater + + //alexander - PTFS-Europe + + //pedro - PTFS-Europe + + //other + + ]; +} \ No newline at end of file From 6c040abf83fb367e4443fcd69919a65bd188848f Mon Sep 17 00:00:00 2001 From: James Staub Date: Thu, 11 Jul 2024 16:04:50 -0500 Subject: [PATCH 02/27] Nashville: Adds item-level holds to Holds Report --- code/web/Drivers/Nashville.php | 68 ++++++++++++++++++++++++------ code/web/release_notes/24.08.00.MD | 2 + 2 files changed, 57 insertions(+), 13 deletions(-) diff --git a/code/web/Drivers/Nashville.php b/code/web/Drivers/Nashville.php index e990cb6181..5f4c790377 100644 --- a/code/web/Drivers/Nashville.php +++ b/code/web/Drivers/Nashville.php @@ -466,6 +466,7 @@ public function getCollectionReportData($location, $date): array { public function getHoldsReportData($location): array { $this->initDatabaseConnection(); $sql = <<dbConnection, $sql); // consider using oci_set_prefetch to improve performance diff --git a/code/web/release_notes/24.08.00.MD b/code/web/release_notes/24.08.00.MD index 950cbd63cb..0d3b4d43f9 100644 --- a/code/web/release_notes/24.08.00.MD +++ b/code/web/release_notes/24.08.00.MD @@ -19,6 +19,8 @@ // lucas // James Staub +### Reports +- Nashville-specific: Circulation Holds Report now includes item-level holds (*JStaub*) // other From f7e6b4a6aa724e7ce2099ad880a57aec1e9419b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Zermatten?= Date: Thu, 11 Jul 2024 16:36:18 +0100 Subject: [PATCH 03/27] feat: user prompted to enter supporting company --- install/createSite.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install/createSite.php b/install/createSite.php index 40a765db69..3aed43ec46 100644 --- a/install/createSite.php +++ b/install/createSite.php @@ -92,6 +92,11 @@ $variables['library'] = readline("Enter the library or consortium name, e.g., Aspen Public Library > "); } + $variables['supportingCompany'] = readline("Enter the name of the supporting company (default: ByWater Solutions) > "); + if (empty($variables['supportingCompany'])) { + $variables['supportingCompany'] = "ByWater Solutions"; + } + $variables['title'] = ''; while (empty($variables['title'])) { $variables['title'] = readline("Enter the title of the site, e.g., Aspen Demo (may be same as library name) > "); From ec3a1c10038655963d49509e14b773d9f8d8d07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Zermatten?= Date: Thu, 11 Jul 2024 16:48:58 +0100 Subject: [PATCH 04/27] feat: save supportingCompany into db Uses a pre-established connection to the database to update the supportingCompany variable in the db. --- install/createSite.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install/createSite.php b/install/createSite.php index 3aed43ec46..d58327c293 100644 --- a/install/createSite.php +++ b/install/createSite.php @@ -320,6 +320,10 @@ $updateUserStmt = $aspen_db->prepare("UPDATE user set cat_password=" . $aspen_db->quote($variables['aspenAdminPwd']) . ", password=" . $aspen_db->quote($variables['aspenAdminPwd']) . " where username = 'aspen_admin'"); $updateUserStmt->execute(); +//Assign supportingCompany in the db +$postSupportingCompanyStmt = $aspen_db->prepare("UPDATE system_variables set supportingCompany=" . $aspen_db->quote($variables['supportingCompany'])); +$postSupportingCompanyStmt->execute(); + if ($variables['ils'] == 'Koha'){ // Attempt to get the system's temp directory $tmp_dir = rtrim(sys_get_temp_dir(), "/"); From 1ab33e67a2cae5a4b71a301570080b745c7fddfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Zermatten?= Date: Thu, 11 Jul 2024 16:56:17 +0100 Subject: [PATCH 05/27] feat: add supportingCompany to createSiteTemplate Add the supportingCompany variable to createSiteTemplate.ini --- install/createSite.php | 1 + install/createSiteTemplate.ini | 2 ++ 2 files changed, 3 insertions(+) diff --git a/install/createSite.php b/install/createSite.php index d58327c293..93bb667ef7 100644 --- a/install/createSite.php +++ b/install/createSite.php @@ -34,6 +34,7 @@ $variables = [ 'sitename' => $sitename, 'cleanSitename' => $cleanSitename, + 'supportingCompany' => $configArray['Site']['supportingCompany'], 'library' => $configArray['Site']['sitename'], 'title' => $configArray['Site']['title'], 'url' => $configArray['Site']['url'], diff --git a/install/createSiteTemplate.ini b/install/createSiteTemplate.ini index 8c9cb3b6ba..a738a0a36b 100644 --- a/install/createSiteTemplate.ini +++ b/install/createSiteTemplate.ini @@ -19,6 +19,8 @@ solrPort = 8080 ils = ; timezone of the library (e.g. America/Los_Angeles, check http://www.php.net/manual/en/timezones.php) timezone = +; name of the supporting company (is set to ByWater Solutions by default) +supportingCompany = [Aspen] ; Database host for Aspen From 3ef3480a421517cb3c1a6e8338e782c24f5b0f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chlo=C3=A9=20Zermatten?= Date: Fri, 12 Jul 2024 10:04:48 +0000 Subject: [PATCH 06/27] docs: update changelog --- code/web/release_notes/24.07.00.MD | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/web/release_notes/24.07.00.MD b/code/web/release_notes/24.07.00.MD index 226d3af979..7f5baddd7e 100644 --- a/code/web/release_notes/24.07.00.MD +++ b/code/web/release_notes/24.07.00.MD @@ -93,6 +93,10 @@ - Add a utility to generate a site template to aid in migrating servers. (*MDN*) - Update updateSitePermissions scripts to include all directories. (*MDN*) +// Chloe PTFS-Europe +### Other Updates +- Add the ability to change the supporting company name on site creation. (*CZ*) + ## This release includes code contributions from - ByWater Solutions - Mark Noble (MDN) @@ -106,6 +110,7 @@ - PTFS-Europe - Pedro Amorim (PA) - Alexander Blanchard (AB) + - Chloe Zermatten (CZ) - Theke Solutions - Lucas Montoya (LM) \ No newline at end of file From aae309c784946731e1295030c430958d88fbf7dd Mon Sep 17 00:00:00 2001 From: Katherine Perdue Date: Fri, 12 Jul 2024 11:01:32 -0400 Subject: [PATCH 07/27] Fix searches that contain slashes --- code/web/sys/SolrConnector/Solr.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/web/sys/SolrConnector/Solr.php b/code/web/sys/SolrConnector/Solr.php index ac33efce64..6dd5487dc6 100644 --- a/code/web/sys/SolrConnector/Solr.php +++ b/code/web/sys/SolrConnector/Solr.php @@ -660,6 +660,7 @@ private function _buildMungeValues($lookfor, $custom = null, $basic = true) { $cleanedQuery = str_replace('–', '\-\-', $cleanedQuery); $cleanedQuery = str_replace('+', '\+', $cleanedQuery); $cleanedQuery = str_replace('?', '\?', $cleanedQuery); + $cleanedQuery = str_replace('/', '\/', $cleanedQuery); require_once ROOT_DIR . '/sys/Utils/StringUtils.php'; $noTrailingPunctuation = StringUtils::removeTrailingPunctuation($cleanedQuery); @@ -732,6 +733,7 @@ private function _buildMungeValues($lookfor, $custom = null, $basic = true) { $cleanedQuery = str_replace('”', '"', $cleanedQuery); $cleanedQuery = str_replace('+', '\+', $cleanedQuery); $cleanedQuery = str_replace('?', '\?', $cleanedQuery); + $cleanedQuery = str_replace('/', '\/', $cleanedQuery); // Fix for ordinal numbers $cleanedQuery = preg_replace("/([0-9])([a-zA-Z])/", "$1 $2", $cleanedQuery); if (strlen($cleanedQuery) > 0 && $cleanedQuery[0] == '(') { @@ -1894,9 +1896,11 @@ public function validateInput($input) { //Remove any semi-colons that Solr will handle incorrectly. $input = str_replace(';', ' ', $input); - //Remove any slashes that Solr will handle incorrectly. - $input = str_replace('\\', ' ', $input); - $input = str_replace('/', ' ', $input); + //Remove slashes occur in the middle of a word that Solr will handle incorrectly. + $input = preg_replace("/([0-9a-zA-Z])([\/])([0-9a-zA-Z])/", "$1 $3", $input); + $input = preg_replace("/([0-9a-zA-Z])([\\\\])([0-9a-zA-Z])/", "$1 $3", $input); + $input = str_replace('\\', '\\\\', $input); + //$input = preg_replace('/\\\\(?![&:])/', ' ', $input); //Look for any colons that are not identifying fields From 48913ca842f00732f3606a4f3edf6aa3ee90c5ce Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Fri, 12 Jul 2024 10:44:29 -0600 Subject: [PATCH 08/27] Fix typo --- install/updateSitePermissions.sh | 2 +- install/updateSitePermissions_debian.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/updateSitePermissions.sh b/install/updateSitePermissions.sh index 7c5578faf9..1db2fb57c5 100755 --- a/install/updateSitePermissions.sh +++ b/install/updateSitePermissions.sh @@ -37,7 +37,7 @@ chmod -R g+w /data/aspen-discovery/$1/uploads chown -R solr:aspen /data/aspen-discovery/$1/solr7 chown -R root:root /data/aspen-discovery/$1/sql_backup chown apache:aspen_apache /var/log/aspen-discovery/$1/* -chown -R apsen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps +chown -R aspen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-7.6.0 chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-8.11.2 diff --git a/install/updateSitePermissions_debian.sh b/install/updateSitePermissions_debian.sh index 71a3d65436..21b99e5c96 100755 --- a/install/updateSitePermissions_debian.sh +++ b/install/updateSitePermissions_debian.sh @@ -37,7 +37,7 @@ chmod -R g+w /data/aspen-discovery/$1/uploads chown -R solr:aspen /data/aspen-discovery/$1/solr7 chown -R root:root /data/aspen-discovery/$1/sql_backup chown www-data:aspen_apache /var/log/aspen-discovery/$1/* -chown -R apsen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps +chown -R aspen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-7.6.0 chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-8.11.2 From b01745008b8e2588c7f09463fc2e2312e0a1f954 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Fri, 12 Jul 2024 13:04:03 -0600 Subject: [PATCH 09/27] Update Aspen so emailing PIN reset information works properly with Koha version 24.05 --- code/web/Drivers/Koha.php | 34 ++++++++++++++++++++++++------ code/web/release_notes/24.06.01.MD | 1 + 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/code/web/Drivers/Koha.php b/code/web/Drivers/Koha.php index 3ef264793d..0938e13487 100644 --- a/code/web/Drivers/Koha.php +++ b/code/web/Drivers/Koha.php @@ -3596,14 +3596,36 @@ function processEmailResetPinForm() { ]; $catalogUrl = $this->accountProfile->vendorOpacUrl; + + $kohaVersion = $this->getKohaVersion(); + $csrfToken = ''; + if ($kohaVersion >= 24.05) { + //First get the page to get the csrf token + $getResults = $this->getKohaPage($catalogUrl . '/cgi-bin/koha/opac-password-recovery.pl'); + if (preg_match('//', $getResults, $matches)) { + $csrfToken = $matches[1]; + } + } + + $username = isset($_REQUEST['username']) ? strip_tags($_REQUEST['username']) : ''; $email = isset($_REQUEST['email']) ? strip_tags($_REQUEST['email']) : ''; - $postVariables = [ - 'koha_login_context' => 'opac', - 'username' => $username, - 'email' => $email, - 'sendEmail' => 'Submit', - ]; + if ($kohaVersion >= 24.05) { + $postVariables = [ + 'koha_login_context' => 'opac', + 'username' => $username, + 'email' => $email, + 'op' => 'cud-sendEmail', + 'csrf_token' => $csrfToken + ]; + }else{ + $postVariables = [ + 'koha_login_context' => 'opac', + 'username' => $username, + 'email' => $email, + 'sendEmail' => 'Submit', + ]; + } if (isset($_REQUEST['resendEmail'])) { $postVariables['resendEmail'] = strip_tags($_REQUEST['resendEmail']); } diff --git a/code/web/release_notes/24.06.01.MD b/code/web/release_notes/24.06.01.MD index b52e81b27c..fa3a41cff3 100644 --- a/code/web/release_notes/24.06.01.MD +++ b/code/web/release_notes/24.06.01.MD @@ -1,6 +1,7 @@ ## Aspen Discovery Updates ### Koha Updates - Fix issues related to loading ILL requests and holds for Koha version 24.05. (*MDN*) +- Update Aspen so emailing PIN reset information works properly with Koha version 24.05. (*MDN*) ### OverDrive Updates - Error message when returning Kindle books is now translatable. (Tickets 133671, 133815, 133663, 133982) (*KP*) From 613d6e1f9108372233720e65a26506f7fdf24393 Mon Sep 17 00:00:00 2001 From: Katherine Perdue Date: Fri, 12 Jul 2024 16:05:20 -0400 Subject: [PATCH 10/27] Don't return 404 when the page exists --- code/web/index.php | 8 ++++++++ code/web/release_notes/24.08.00.MD | 2 ++ 2 files changed, 10 insertions(+) diff --git a/code/web/index.php b/code/web/index.php index 8937943dde..9ea939436d 100644 --- a/code/web/index.php +++ b/code/web/index.php @@ -1173,6 +1173,7 @@ function loadModuleActionId() { $basicPageLibrary = new LibraryBasicPage(); $basicPageLibrary->libraryId = $library->libraryId; $basicPage->joinAdd($basicPageLibrary, 'INNER', 'libraryFilter', 'id', 'basicPageId'); + $pageExists = false; if ($basicPage->find(true)) { $_GET['module'] = 'WebBuilder'; $_GET['action'] = 'BasicPage'; @@ -1180,6 +1181,7 @@ function loadModuleActionId() { $_REQUEST['module'] = 'WebBuilder'; $_REQUEST['action'] = 'BasicPage'; $_REQUEST['id'] = $basicPage->id; + $pageExists = true; } else { require_once ROOT_DIR . '/sys/WebBuilder/PortalPage.php'; $portalPage = new PortalPage(); @@ -1194,6 +1196,7 @@ function loadModuleActionId() { $_REQUEST['module'] = 'WebBuilder'; $_REQUEST['action'] = 'PortalPage'; $_REQUEST['id'] = $portalPage->id; + $pageExists = true; } else { require_once ROOT_DIR . '/sys/WebBuilder/CustomForm.php'; $form = new CustomForm(); @@ -1208,6 +1211,7 @@ function loadModuleActionId() { $_REQUEST['module'] = 'WebBuilder'; $_REQUEST['action'] = 'Form'; $_REQUEST['id'] = $form->id; + $pageExists = true; } else { require_once ROOT_DIR . '/sys/WebBuilder/QuickPoll.php'; $quickPoll = new QuickPoll(); @@ -1222,10 +1226,14 @@ function loadModuleActionId() { $_REQUEST['module'] = 'WebBuilder'; $_REQUEST['action'] = 'QuickPoll'; $_REQUEST['id'] = $quickPoll->id; + $pageExists = true; } } } } + if ($pageExists && $_SERVER['REDIRECT_STATUS'] == '404') { + http_response_code('200'); + } } } catch (Exception $e) { //This happens if web builder is not fully installed, ignore the error. diff --git a/code/web/release_notes/24.08.00.MD b/code/web/release_notes/24.08.00.MD index 950cbd63cb..92c127e6b9 100644 --- a/code/web/release_notes/24.08.00.MD +++ b/code/web/release_notes/24.08.00.MD @@ -9,6 +9,8 @@ // kodi // katherine +### Other Updates +- Fixed bug with unexpected 404 errors on Web Builder pages. (Ticket 123122) (*KP*) // alexander From f20bde58bbb5b92d5c9e76f67608d3ed8964650f Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Mon, 15 Jul 2024 07:44:27 -0600 Subject: [PATCH 11/27] Correct the number of requests made on the success screen after submitting a request --- code/web/release_notes/24.07.00.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/code/web/release_notes/24.07.00.MD b/code/web/release_notes/24.07.00.MD index 226d3af979..64de293c80 100644 --- a/code/web/release_notes/24.07.00.MD +++ b/code/web/release_notes/24.07.00.MD @@ -92,6 +92,7 @@ - Delete old tables in the database while initializing the database for unit test. (*MDN*) - Add a utility to generate a site template to aid in migrating servers. (*MDN*) - Update updateSitePermissions scripts to include all directories. (*MDN*) +- Correct the number of requests made on the success screen after submitting a request. (Ticket 128760) (*MDN*) ## This release includes code contributions from - ByWater Solutions From 9c07848bdd7cf6813ee004a00305f5ca48b2df00 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Mon, 15 Jul 2024 12:12:01 -0600 Subject: [PATCH 12/27] When updating site permissions also update sideload permissions. --- install/updateAllSideloadPermissions.php | 33 ++++++++++++++++++++++++ install/updateSitePermissions.sh | 2 ++ install/updateSitePermissions_debian.sh | 2 ++ 3 files changed, 37 insertions(+) create mode 100644 install/updateAllSideloadPermissions.php diff --git a/install/updateAllSideloadPermissions.php b/install/updateAllSideloadPermissions.php new file mode 100644 index 0000000000..bb010245af --- /dev/null +++ b/install/updateAllSideloadPermissions.php @@ -0,0 +1,33 @@ + 2) { + $serverName = $_SERVER['argv'][1]; + $operatingSystem = $_SERVER['argv'][2]; +}else{ + echo("Please provide 2 parameters, the first should be the name of the server to update and the second should be the operating system centos/debian\n"); + die(); +} + +require_once ROOT_DIR . '/sys/Indexing/SideLoad.php'; +$sideLoad = new SideLoad(); +$sideLoads = $sideLoad->fetchAll('name', 'marcPath'); +foreach ($sideLoads as $name => $marcPath) { + echo("Updating permissions for $name\n"); + if ($operatingSystem == 'centos') { + exec("chown aspen:aspen_apache ' . $marcPath/..)"); + exec("chmod 775 ' . $marcPath/..)"); + + exec("chown -R apache:aspen_apache ' . $marcPath)"); + exec("chmod 775 ' . $marcPath)"); + }else{ + exec("chown aspen:aspen_apache ' . $marcPath/..)"); + exec("chmod 775 ' . $marcPath/..)"); + + exec("chown -R www-data:aspen_apache ' . $marcPath)"); + exec("chmod 775 ' . $marcPath)"); + } +} \ No newline at end of file diff --git a/install/updateSitePermissions.sh b/install/updateSitePermissions.sh index 1db2fb57c5..3c173f7a8c 100755 --- a/install/updateSitePermissions.sh +++ b/install/updateSitePermissions.sh @@ -42,3 +42,5 @@ chown -R aspen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-7.6.0 chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-8.11.2 chown -R solr:solr /data/aspen-discovery/$1/solr7 + +php updateAllSideloadPermissions.php $1 centos \ No newline at end of file diff --git a/install/updateSitePermissions_debian.sh b/install/updateSitePermissions_debian.sh index 21b99e5c96..c672d19727 100755 --- a/install/updateSitePermissions_debian.sh +++ b/install/updateSitePermissions_debian.sh @@ -42,3 +42,5 @@ chown -R aspen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-7.6.0 chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-8.11.2 chown -R solr:solr /data/aspen-discovery/$1/solr7 + +php updateAllSideloadPermissions.php $1 debian \ No newline at end of file From 2daa3bf9216c5acad020592101b295f956152856 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Mon, 15 Jul 2024 12:36:02 -0600 Subject: [PATCH 13/27] Update site permissions --- install/updateSitePermissions.sh | 3 +++ install/updateSitePermissions_debian.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/install/updateSitePermissions.sh b/install/updateSitePermissions.sh index 3c173f7a8c..18bb25436b 100755 --- a/install/updateSitePermissions.sh +++ b/install/updateSitePermissions.sh @@ -5,6 +5,9 @@ if [ -z "$1" ] echo "Please provide the server name to update as the first argument." exit 1 fi +chown root:root /data +chown -R aspen:aspen_apache /data/aspen-discovery + chown -R aspen:aspen_apache /data/aspen-discovery/$1 chmod -R 775 /data/aspen-discovery/$1 chgrp -R aspen_apache /data/aspen-discovery/accelerated_reader diff --git a/install/updateSitePermissions_debian.sh b/install/updateSitePermissions_debian.sh index c672d19727..3f3290103a 100755 --- a/install/updateSitePermissions_debian.sh +++ b/install/updateSitePermissions_debian.sh @@ -5,6 +5,9 @@ if [ -z "$1" ] echo "Please provide the server name to update as the first argument." exit 1 fi +chown root:root /data +chown -R aspen:aspen_apache /data/aspen-discovery + chown -R aspen:aspen_apache /data/aspen-discovery/$1 chmod -R 775 /data/aspen-discovery/$1 chgrp -R aspen_apache /data/aspen-discovery/accelerated_reader From 55adaacd775484a5468d98a4657464e7e9de8db0 Mon Sep 17 00:00:00 2001 From: Kodi Date: Mon, 15 Jul 2024 12:20:42 -0700 Subject: [PATCH 14/27] Small Bug Fixes Add logic for assigning the format 'Physical Object' if position 6 of the Leader is 'R' and the record has no 008 field Increase column length for format in user_hold table to accommodate concatenated OverDrive/Libby formats Updated release notes Tested on my local --- .../format_classification/MarcRecordFormatClassifier.java | 4 ++++ code/web/release_notes/24.07.00.MD | 2 ++ code/web/sys/DBMaintenance/version_updates/24.07.00.php | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/code/reindexer/src/org/aspen_discovery/format_classification/MarcRecordFormatClassifier.java b/code/reindexer/src/org/aspen_discovery/format_classification/MarcRecordFormatClassifier.java index 475b624e89..f49d1c6a55 100644 --- a/code/reindexer/src/org/aspen_discovery/format_classification/MarcRecordFormatClassifier.java +++ b/code/reindexer/src/org/aspen_discovery/format_classification/MarcRecordFormatClassifier.java @@ -948,6 +948,10 @@ public void getFormatFromLeader(AbstractGroupedWorkSolr groupedWork, Set result.add("PhysicalObject"); break; } + } else { + if (groupedWork != null && groupedWork.isDebugEnabled()) {groupedWork.addDebugMessage("Adding bib level format PhysicalObject based on Leader and no 008 field", 2);} + result.add("PhysicalObject"); + break; } break; case 'T': diff --git a/code/web/release_notes/24.07.00.MD b/code/web/release_notes/24.07.00.MD index 226d3af979..ac2501bbc6 100644 --- a/code/web/release_notes/24.07.00.MD +++ b/code/web/release_notes/24.07.00.MD @@ -46,6 +46,7 @@ - Correct loading Days Since Added Facet for item items at libraries where the display status is not "On Order". (Tickets 134372, 134501, 134543, 134618) (*MDN*) - Check the fallback format if the only format detected with earlier rules is "Book" as well as checking fallback format if no formats are found. (Ticket 134503) (*MDN*) - Check for null formats when determining inclusion of records. (*MDN*) +- Add logic for assigning the format 'Physical Object' if position 6 of the Leader is 'R' and the record has no 008 field (Ticket 134996) (*KL*) ### Koha Updates - Add control over whether holidays and hours are automatically loaded from Koha for each library and location. (Tickets 130879, 132358) (*MDN*) @@ -92,6 +93,7 @@ - Delete old tables in the database while initializing the database for unit test. (*MDN*) - Add a utility to generate a site template to aid in migrating servers. (*MDN*) - Update updateSitePermissions scripts to include all directories. (*MDN*) +- Increase column length for format in user_hold table to accommodate concatenated OverDrive/Libby formats (Ticket 134832) (*KL*) ## This release includes code contributions from - ByWater Solutions diff --git a/code/web/sys/DBMaintenance/version_updates/24.07.00.php b/code/web/sys/DBMaintenance/version_updates/24.07.00.php index eb239b0516..19ee0bae13 100644 --- a/code/web/sys/DBMaintenance/version_updates/24.07.00.php +++ b/code/web/sys/DBMaintenance/version_updates/24.07.00.php @@ -56,6 +56,14 @@ function getUpdates24_07_00(): array { ) ENGINE INNODB', ], ], // self_registration_form_carlx + 'overdrive_format_length' => [ + 'title' => 'Format Length', + 'description' => 'Increase column length for format in user_hold table to accomodate concatenated OverDrive/Libby formats', + 'sql' => [ + 'ALTER TABLE user_hold CHANGE COLUMN format format VARCHAR(150)', + ], + ],//overdrive_format_length + //katherine - ByWater //greenhouseMonitoring 'greenhouseSlackIntegration2' => [ From 4ea6b684e3319775cbb4b255613e4807e37acbde Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Mon, 15 Jul 2024 15:19:24 -0600 Subject: [PATCH 15/27] Update httpd-aspencat.production-le-ssl.conf --- .../httpd-aspencat.production-le-ssl.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sites/aspencat.production/httpd-aspencat.production-le-ssl.conf b/sites/aspencat.production/httpd-aspencat.production-le-ssl.conf index 3f6dc1cfb3..7c0a4abd94 100644 --- a/sites/aspencat.production/httpd-aspencat.production-le-ssl.conf +++ b/sites/aspencat.production/httpd-aspencat.production-le-ssl.conf @@ -117,6 +117,11 @@ # Friendly URLs RewriteEngine On + + # Bot Blocking + Include /usr/local/aspen-discovery/sites/aspencat.production/conf/badBotsLocal.conf + Include /usr/local/aspen-discovery/sites/default/conf/badBotsDefault.conf + RewriteRule ^robots\.txt$ /robots.php [NC,L] RewriteRule ^sitemapindex\.xml$ /sitemapindex.php [NC,L] RewriteRule ^grouped_work_site_map(.+)$ /sitemaps/grouped_work_site_map$1 [NC,L] From 73d3af018d02c7ff68e0c257fac154628d81dc70 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Mon, 15 Jul 2024 15:57:51 -0600 Subject: [PATCH 16/27] Update httpd-aspencat.production-le-ssl.conf --- sites/aspencat.production/httpd-aspencat.production-le-ssl.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/aspencat.production/httpd-aspencat.production-le-ssl.conf b/sites/aspencat.production/httpd-aspencat.production-le-ssl.conf index 7c0a4abd94..0b55339fef 100644 --- a/sites/aspencat.production/httpd-aspencat.production-le-ssl.conf +++ b/sites/aspencat.production/httpd-aspencat.production-le-ssl.conf @@ -117,7 +117,7 @@ # Friendly URLs RewriteEngine On - + # Bot Blocking Include /usr/local/aspen-discovery/sites/aspencat.production/conf/badBotsLocal.conf Include /usr/local/aspen-discovery/sites/default/conf/badBotsDefault.conf From 6f96fd6c8b63f85c036f3de5f3eeb648a9e54c46 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Mon, 15 Jul 2024 15:58:07 -0600 Subject: [PATCH 17/27] Update script to update site permissions --- install/updateSitePermissions.sh | 57 ++++++++++++++----------- install/updateSitePermissions_debian.sh | 57 ++++++++++++++----------- 2 files changed, 66 insertions(+), 48 deletions(-) diff --git a/install/updateSitePermissions.sh b/install/updateSitePermissions.sh index 18bb25436b..dc53f6dac4 100755 --- a/install/updateSitePermissions.sh +++ b/install/updateSitePermissions.sh @@ -5,27 +5,41 @@ if [ -z "$1" ] echo "Please provide the server name to update as the first argument." exit 1 fi + +# /data directory chown root:root /data chown -R aspen:aspen_apache /data/aspen-discovery - +chown -R root:aspen_apache /data/aspen-discovery/accelerated_reader +chmod -R 775 /data/aspen-discovery/accelerated_reader chown -R aspen:aspen_apache /data/aspen-discovery/$1 chmod -R 775 /data/aspen-discovery/$1 -chgrp -R aspen_apache /data/aspen-discovery/accelerated_reader -chmod -R 775 /data/aspen-discovery/accelerated_reader -chmod -R 755 /usr/local/aspen-discovery/code/web/files -chown -R apache:aspen_apache /usr/local/aspen-discovery/code/web/fonts -chown aspen:aspen_apache /usr/local/aspen-discovery/sites/$1/conf +chown -R aspen:aspen_apache /data/aspen-discovery/$1/covers +chmod -R g+w /data/aspen-discovery/$1/covers chown -R aspen:aspen_apache /data/aspen-discovery/$1/ils -chmod -R 755 /var/log/aspen-discovery/$1 -chmod -R 755 /var/log/aspen-discovery/$1/logs -chown -R aspen:aspen /var/log/aspen-discovery/$1/logs +chown -R aspen:aspen_apache /data/aspen-discovery/$1/uploads +chmod -R g+w /data/aspen-discovery/$1/uploads +chown -R solr:aspen /data/aspen-discovery/$1/solr7 +chown -R root:root /data/aspen-discovery/$1/sql_backup -chown root:root /usr/local/aspen-discovery/sites/$1/httpd-$1.conf -chown root:root /usr/local/aspen-discovery/sites/$1/conf/crontab_settings.txt -chmod 0644 /usr/local/aspen-discovery/sites/$1/conf/crontab_settings.txt +# /usr/local directory +chown -R root:root /usr/local/aspen-discovery +chown -R aspen:aspen /usr/local/aspen-discovery/code +chown -R apache:aspen_apache /usr/local/aspen-discovery/code/web +chmod -R 755 /usr/local/aspen-discovery/code/web/files +chmod -R 755 /usr/local/aspen-discovery/code/web/fonts +chown -R aspen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps +chown -R root:root /usr/local/aspen-discovery/docker +chown -R apache:aspen_apache /usr/local/aspen-discovery/sites +chown -R aspen:aspen_apache /usr/local/aspen-discovery/default +chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-7.6.0 +chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-8.11.2 +chown root:root /usr/local/aspen-discovery/sites/$1 +chown root:root /usr/local/aspen-discovery/sites/$1/httpd-*.conf chown aspen:aspen /usr/local/aspen-discovery/sites/$1/$1.sh chmod +x /usr/local/aspen-discovery/sites/$1/$1.sh - +chown aspen:aspen_apache /usr/local/aspen-discovery/sites/$1/conf +chown root:root /usr/local/aspen-discovery/sites/$1/conf/crontab_settings.txt +chmod 0644 /usr/local/aspen-discovery/sites/$1/conf/crontab_settings.txt if [ -f "/usr/local/aspen-discovery/sites/$1/conf/log4j" ]; then chown aspen:aspen /usr/local/aspen-discovery/sites/$1/conf/log4j* fi @@ -33,17 +47,12 @@ if [ -f "/usr/local/aspen-discovery/sites/$1/conf/passkey" ]; then chown aspen:aspen_apache /usr/local/aspen-discovery/sites/$1/conf/passkey fi chown aspen:aspen_apache /usr/local/aspen-discovery/sites/$1/conf/config* -chown -R aspen:aspen_apache /data/aspen-discovery/$1/covers -chmod -R g+w /data/aspen-discovery/$1/covers -chown -R aspen:aspen_apache /data/aspen-discovery/$1/uploads -chmod -R g+w /data/aspen-discovery/$1/uploads -chown -R solr:aspen /data/aspen-discovery/$1/solr7 -chown -R root:root /data/aspen-discovery/$1/sql_backup -chown apache:aspen_apache /var/log/aspen-discovery/$1/* -chown -R aspen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps +chown -R apache:aspen_apache /usr/local/aspen-discovery/tmp -chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-7.6.0 -chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-8.11.2 -chown -R solr:solr /data/aspen-discovery/$1/solr7 +## /var/log directory +chmod -R 755 /var/log/aspen-discovery/$1 +chmod -R 755 /var/log/aspen-discovery/$1/logs +chown -R aspen:aspen /var/log/aspen-discovery/$1/logs +chown apache:aspen_apache /var/log/aspen-discovery/$1/* php updateAllSideloadPermissions.php $1 centos \ No newline at end of file diff --git a/install/updateSitePermissions_debian.sh b/install/updateSitePermissions_debian.sh index 3f3290103a..f99534f9ce 100755 --- a/install/updateSitePermissions_debian.sh +++ b/install/updateSitePermissions_debian.sh @@ -5,27 +5,41 @@ if [ -z "$1" ] echo "Please provide the server name to update as the first argument." exit 1 fi + +# /data directory chown root:root /data chown -R aspen:aspen_apache /data/aspen-discovery - +chown -R root:aspen_apache /data/aspen-discovery/accelerated_reader +chmod -R 775 /data/aspen-discovery/accelerated_reader chown -R aspen:aspen_apache /data/aspen-discovery/$1 chmod -R 775 /data/aspen-discovery/$1 -chgrp -R aspen_apache /data/aspen-discovery/accelerated_reader -chmod -R 775 /data/aspen-discovery/accelerated_reader -chmod -R 755 /usr/local/aspen-discovery/code/web/files -chown -R www-data:aspen_apache /usr/local/aspen-discovery/code/web/fonts -chown aspen:aspen_apache /usr/local/aspen-discovery/sites/$1/conf +chown -R aspen:aspen_apache /data/aspen-discovery/$1/covers +chmod -R g+w /data/aspen-discovery/$1/covers chown -R aspen:aspen_apache /data/aspen-discovery/$1/ils -chmod -R 755 /var/log/aspen-discovery/$1 -chmod -R 755 /var/log/aspen-discovery/$1/logs -chown -R aspen:aspen /var/log/aspen-discovery/$1/logs +chown -R aspen:aspen_apache /data/aspen-discovery/$1/uploads +chmod -R g+w /data/aspen-discovery/$1/uploads +chown -R solr:aspen /data/aspen-discovery/$1/solr7 +chown -R root:root /data/aspen-discovery/$1/sql_backup -chown root:root /usr/local/aspen-discovery/sites/$1/httpd-$1.conf -chown root:root /usr/local/aspen-discovery/sites/$1/conf/crontab_settings.txt -chmod 0644 /usr/local/aspen-discovery/sites/$1/conf/crontab_settings.txt +# /usr/local directory +chown -R root:root /usr/local/aspen-discovery +chown -R aspen:aspen /usr/local/aspen-discovery/code +chown -R www-data:aspen_apache /usr/local/aspen-discovery/code/web +chmod -R 755 /usr/local/aspen-discovery/code/web/files +chmod -R 755 /usr/local/aspen-discovery/code/web/fonts +chown -R aspen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps +chown -R root:root /usr/local/aspen-discovery/docker +chown -R www-data:aspen_apache /usr/local/aspen-discovery/sites +chown -R aspen:aspen_apache /usr/local/aspen-discovery/default +chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-7.6.0 +chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-8.11.2 +chown root:root /usr/local/aspen-discovery/sites/$1 +chown root:root /usr/local/aspen-discovery/sites/$1/httpd-*.conf chown aspen:aspen /usr/local/aspen-discovery/sites/$1/$1.sh chmod +x /usr/local/aspen-discovery/sites/$1/$1.sh - +chown aspen:aspen_apache /usr/local/aspen-discovery/sites/$1/conf +chown root:root /usr/local/aspen-discovery/sites/$1/conf/crontab_settings.txt +chmod 0644 /usr/local/aspen-discovery/sites/$1/conf/crontab_settings.txt if [ -f "/usr/local/aspen-discovery/sites/$1/conf/log4j" ]; then chown aspen:aspen /usr/local/aspen-discovery/sites/$1/conf/log4j* fi @@ -33,17 +47,12 @@ if [ -f "/usr/local/aspen-discovery/sites/$1/conf/passkey" ]; then chown aspen:aspen_apache /usr/local/aspen-discovery/sites/$1/conf/passkey fi chown aspen:aspen_apache /usr/local/aspen-discovery/sites/$1/conf/config* -chown -R aspen:aspen_apache /data/aspen-discovery/$1/covers -chmod -R g+w /data/aspen-discovery/$1/covers -chown -R aspen:aspen_apache /data/aspen-discovery/$1/uploads -chmod -R g+w /data/aspen-discovery/$1/uploads -chown -R solr:aspen /data/aspen-discovery/$1/solr7 -chown -R root:root /data/aspen-discovery/$1/sql_backup -chown www-data:aspen_apache /var/log/aspen-discovery/$1/* -chown -R aspen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps +chown -R www-data:aspen_apache /usr/local/aspen-discovery/tmp -chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-7.6.0 -chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-8.11.2 -chown -R solr:solr /data/aspen-discovery/$1/solr7 +## /var/log directory +chmod -R 755 /var/log/aspen-discovery/$1 +chmod -R 755 /var/log/aspen-discovery/$1/logs +chown -R aspen:aspen /var/log/aspen-discovery/$1/logs +chown www-data:aspen_apache /var/log/aspen-discovery/$1/* php updateAllSideloadPermissions.php $1 debian \ No newline at end of file From 6e453c138466544924629ee5af648a522a9b76d3 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Mon, 15 Jul 2024 16:07:25 -0600 Subject: [PATCH 18/27] Update permissions script --- install/updateSitePermissions.sh | 5 ++--- install/updateSitePermissions_debian.sh | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/install/updateSitePermissions.sh b/install/updateSitePermissions.sh index dc53f6dac4..86ee0f38c7 100755 --- a/install/updateSitePermissions.sh +++ b/install/updateSitePermissions.sh @@ -30,8 +30,7 @@ chmod -R 755 /usr/local/aspen-discovery/code/web/fonts chown -R aspen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps chown -R root:root /usr/local/aspen-discovery/docker chown -R apache:aspen_apache /usr/local/aspen-discovery/sites -chown -R aspen:aspen_apache /usr/local/aspen-discovery/default -chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-7.6.0 +chown -R aspen:aspen_apache /usr/local/aspen-discovery/sites/default chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-8.11.2 chown root:root /usr/local/aspen-discovery/sites/$1 chown root:root /usr/local/aspen-discovery/sites/$1/httpd-*.conf @@ -55,4 +54,4 @@ chmod -R 755 /var/log/aspen-discovery/$1/logs chown -R aspen:aspen /var/log/aspen-discovery/$1/logs chown apache:aspen_apache /var/log/aspen-discovery/$1/* -php updateAllSideloadPermissions.php $1 centos \ No newline at end of file +php /usr/local/aspen-discovery/install/updateAllSideloadPermissions.php $1 centos \ No newline at end of file diff --git a/install/updateSitePermissions_debian.sh b/install/updateSitePermissions_debian.sh index f99534f9ce..65f28941d3 100755 --- a/install/updateSitePermissions_debian.sh +++ b/install/updateSitePermissions_debian.sh @@ -30,8 +30,7 @@ chmod -R 755 /usr/local/aspen-discovery/code/web/fonts chown -R aspen:aspen_apache /usr/local/aspen-discovery/code/web/sitemaps chown -R root:root /usr/local/aspen-discovery/docker chown -R www-data:aspen_apache /usr/local/aspen-discovery/sites -chown -R aspen:aspen_apache /usr/local/aspen-discovery/default -chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-7.6.0 +chown -R aspen:aspen_apache /usr/local/aspen-discovery/sites/default chown -R solr:solr /usr/local/aspen-discovery/sites/default/solr-8.11.2 chown root:root /usr/local/aspen-discovery/sites/$1 chown root:root /usr/local/aspen-discovery/sites/$1/httpd-*.conf @@ -55,4 +54,4 @@ chmod -R 755 /var/log/aspen-discovery/$1/logs chown -R aspen:aspen /var/log/aspen-discovery/$1/logs chown www-data:aspen_apache /var/log/aspen-discovery/$1/* -php updateAllSideloadPermissions.php $1 debian \ No newline at end of file +php /usr/local/aspen-discovery/install/updateAllSideloadPermissions.php $1 debian \ No newline at end of file From 651a6068323e8b252bd7c8287ab23acffeb69632 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Mon, 15 Jul 2024 16:15:34 -0600 Subject: [PATCH 19/27] Fix typos --- install/updateAllSideloadPermissions.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install/updateAllSideloadPermissions.php b/install/updateAllSideloadPermissions.php index bb010245af..dfef6a6558 100644 --- a/install/updateAllSideloadPermissions.php +++ b/install/updateAllSideloadPermissions.php @@ -18,16 +18,16 @@ foreach ($sideLoads as $name => $marcPath) { echo("Updating permissions for $name\n"); if ($operatingSystem == 'centos') { - exec("chown aspen:aspen_apache ' . $marcPath/..)"); - exec("chmod 775 ' . $marcPath/..)"); + exec("chown aspen:aspen_apache ' . $marcPath/.."); + exec("chmod 775 ' . $marcPath/.."); exec("chown -R apache:aspen_apache ' . $marcPath)"); - exec("chmod 775 ' . $marcPath)"); + exec("chmod 775 ' . $marcPath"); }else{ - exec("chown aspen:aspen_apache ' . $marcPath/..)"); - exec("chmod 775 ' . $marcPath/..)"); + exec("chown aspen:aspen_apache ' . $marcPath/.."); + exec("chmod 775 ' . $marcPath/.."); - exec("chown -R www-data:aspen_apache ' . $marcPath)"); - exec("chmod 775 ' . $marcPath)"); + exec("chown -R www-data:aspen_apache ' . $marcPath"); + exec("chmod 775 ' . $marcPath"); } } \ No newline at end of file From 65a77205da6fd2f0c2fbf4708ea6e055dbc7f472 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Mon, 15 Jul 2024 16:21:10 -0600 Subject: [PATCH 20/27] Update updateSitePermissions_debian.sh --- install/updateSitePermissions_debian.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install/updateSitePermissions_debian.sh b/install/updateSitePermissions_debian.sh index 65f28941d3..0ec8a5c143 100755 --- a/install/updateSitePermissions_debian.sh +++ b/install/updateSitePermissions_debian.sh @@ -7,6 +7,7 @@ if [ -z "$1" ] fi # /data directory +echo "Updating /data directory" chown root:root /data chown -R aspen:aspen_apache /data/aspen-discovery chown -R root:aspen_apache /data/aspen-discovery/accelerated_reader @@ -22,6 +23,7 @@ chown -R solr:aspen /data/aspen-discovery/$1/solr7 chown -R root:root /data/aspen-discovery/$1/sql_backup # /usr/local directory +echo "Updating /usr/local directory" chown -R root:root /usr/local/aspen-discovery chown -R aspen:aspen /usr/local/aspen-discovery/code chown -R www-data:aspen_apache /usr/local/aspen-discovery/code/web @@ -49,9 +51,11 @@ chown aspen:aspen_apache /usr/local/aspen-discovery/sites/$1/conf/config* chown -R www-data:aspen_apache /usr/local/aspen-discovery/tmp ## /var/log directory +echo "Updating /var/log directory" chmod -R 755 /var/log/aspen-discovery/$1 chmod -R 755 /var/log/aspen-discovery/$1/logs chown -R aspen:aspen /var/log/aspen-discovery/$1/logs chown www-data:aspen_apache /var/log/aspen-discovery/$1/* +echo "Updating sideload permissions" php /usr/local/aspen-discovery/install/updateAllSideloadPermissions.php $1 debian \ No newline at end of file From b8a974e989d2445ff9afab475e77fbee2f49308d Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Mon, 15 Jul 2024 16:22:25 -0600 Subject: [PATCH 21/27] Update updateAllSideloadPermissions.php --- install/updateAllSideloadPermissions.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install/updateAllSideloadPermissions.php b/install/updateAllSideloadPermissions.php index dfef6a6558..214b641787 100644 --- a/install/updateAllSideloadPermissions.php +++ b/install/updateAllSideloadPermissions.php @@ -18,16 +18,16 @@ foreach ($sideLoads as $name => $marcPath) { echo("Updating permissions for $name\n"); if ($operatingSystem == 'centos') { - exec("chown aspen:aspen_apache ' . $marcPath/.."); - exec("chmod 775 ' . $marcPath/.."); + exec("chown aspen:aspen_apache $marcPath/.."); + exec("chmod 775 $marcPath/.."); - exec("chown -R apache:aspen_apache ' . $marcPath)"); - exec("chmod 775 ' . $marcPath"); + exec("chown -R apache:aspen_apache $marcPath"); + exec("chmod 775 $marcPath"); }else{ - exec("chown aspen:aspen_apache ' . $marcPath/.."); - exec("chmod 775 ' . $marcPath/.."); + exec("chown aspen:aspen_apache $marcPath/.."); + exec("chmod 775 $marcPath/.."); - exec("chown -R www-data:aspen_apache ' . $marcPath"); - exec("chmod 775 ' . $marcPath"); + exec("chown -R www-data:aspen_apache $marcPath"); + exec("chmod 775 $marcPath"); } } \ No newline at end of file From 4a3a60e9fb19af10d1c16df8179cfacbd600d55c Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Tue, 16 Jul 2024 07:33:18 -0600 Subject: [PATCH 22/27] Update createSiteTemplate.php --- code/web/cron/createSiteTemplate.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/web/cron/createSiteTemplate.php b/code/web/cron/createSiteTemplate.php index a1baf04664..05ffe55710 100644 --- a/code/web/cron/createSiteTemplate.php +++ b/code/web/cron/createSiteTemplate.php @@ -7,6 +7,9 @@ //Create a template for $serverName $templateName = "$serverName.ini"; +if (!file_exists($configArray['Site']['local'] . "/../../install/templates/")){ + mkdir($configArray['Site']['local'] . "/../../install/templates/"); +} $fhnd = fopen($configArray['Site']['local'] . "/../../install/templates/$templateName", 'w'); $dbHost = empty($configArray['Database']['database_aspen_host']) ? 'localhost' : $configArray['Database']['database_aspen_host']; $dbPort = empty($configArray['Database']['database_aspen_dbport']) ? '3306' : $configArray['Database']['database_aspen_dbport']; From a985115e0e073fafd38dafd2a871ba2437685b54 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Tue, 16 Jul 2024 07:34:45 -0600 Subject: [PATCH 23/27] Update createSiteTemplate.php --- code/web/cron/createSiteTemplate.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/web/cron/createSiteTemplate.php b/code/web/cron/createSiteTemplate.php index 05ffe55710..84061ef67f 100644 --- a/code/web/cron/createSiteTemplate.php +++ b/code/web/cron/createSiteTemplate.php @@ -30,9 +30,13 @@ fwrite($fhnd, ";Which host should Solr run on (typically localhost)\n"); fwrite($fhnd, "solrHost = {$configArray['Index']['solrHost']}\n"); fwrite($fhnd, "; Which port should Solr run on (typically 8080)\n"); -fwrite($fhnd, "solrPort = {$configArray['Index']['solrPort']}\n"); +if (array_key_exists('solrPort', $configArray['Index'])) { + fwrite($fhnd, "solrPort = {$configArray['Index']['solrPort']}\n"); +}else{ + fwrite($fhnd, "solrPort = 8080\n"); +} fwrite($fhnd, "; Which ILS does the library use?\n"); -fwrite($fhnd, "ils = {$configArray['Index']['solrHost']}\n"); +fwrite($fhnd, "ils = {$configArray['Index']['driver']}\n"); fwrite($fhnd, "; timezone of the library (e.g. America/Los_Angeles, check http://www.php.net/manual/en/timezones.php)\n"); fwrite($fhnd, "timezone = {$configArray['Site']['timezone']}\n"); fwrite($fhnd, "\n"); From 0b1034cd9edaae583ca09dbec7e48595f05ee07f Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Tue, 16 Jul 2024 07:35:41 -0600 Subject: [PATCH 24/27] Update createSiteTemplate.php --- code/web/cron/createSiteTemplate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/web/cron/createSiteTemplate.php b/code/web/cron/createSiteTemplate.php index 84061ef67f..4fe8d1daad 100644 --- a/code/web/cron/createSiteTemplate.php +++ b/code/web/cron/createSiteTemplate.php @@ -36,7 +36,7 @@ fwrite($fhnd, "solrPort = 8080\n"); } fwrite($fhnd, "; Which ILS does the library use?\n"); -fwrite($fhnd, "ils = {$configArray['Index']['driver']}\n"); +fwrite($fhnd, "ils = {$configArray['Catalog']['driver']}\n"); fwrite($fhnd, "; timezone of the library (e.g. America/Los_Angeles, check http://www.php.net/manual/en/timezones.php)\n"); fwrite($fhnd, "timezone = {$configArray['Site']['timezone']}\n"); fwrite($fhnd, "\n"); From ec76783c9f1c05f38ee706cdd6904853ede20065 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Tue, 16 Jul 2024 08:15:55 -0600 Subject: [PATCH 25/27] Set limits for Aspen user within Debian --- code/web/release_notes/24.07.00.MD | 4 +--- install/aspen_limits.conf | 5 +++++ install/installer_debian.sh | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 install/aspen_limits.conf diff --git a/code/web/release_notes/24.07.00.MD b/code/web/release_notes/24.07.00.MD index 2c8550dfba..ee846ccf9e 100644 --- a/code/web/release_notes/24.07.00.MD +++ b/code/web/release_notes/24.07.00.MD @@ -95,9 +95,7 @@ - Update updateSitePermissions scripts to include all directories. (*MDN*) - Increase column length for format in user_hold table to accommodate concatenated OverDrive/Libby formats (Ticket 134832) (*KL*) - Correct the number of requests made on the success screen after submitting a request. (Ticket 128760) (*MDN*) - -// Chloe PTFS-Europe -### Other Updates +- Set limits for Aspen user within Debian. (*MDN*) - Add the ability to change the supporting company name on site creation. (*CZ*) ## This release includes code contributions from diff --git a/install/aspen_limits.conf b/install/aspen_limits.conf new file mode 100644 index 0000000000..5cc3c1430a --- /dev/null +++ b/install/aspen_limits.conf @@ -0,0 +1,5 @@ +# Increase process and file limits for aspen user +aspen soft nproc 65000 +aspen soft nofile 65000 +aspen hard nproc 65000 +aspen hard nofile 65000 diff --git a/install/installer_debian.sh b/install/installer_debian.sh index 51d6428929..7df83000cc 100755 --- a/install/installer_debian.sh +++ b/install/installer_debian.sh @@ -44,8 +44,9 @@ mkdir -p /usr/local/aspen-discovery/tmp chown -R www-data:www-data /usr/local/aspen-discovery/tmp chmod -R 755 /usr/local/aspen-discovery/tmp -# Raise process and open file limits for the solr user +# Raise process and open file limits for the aspen and solr users cp solr_limits.conf /etc/security/limits.d/solr.conf +cp aspen_limits.conf /etc/security/limits.d/aspen.conf # Create aspen MySQL superuser printf "Please enter the username for the Aspen MySQL superuser (cannot be root) : " >&2 From 21c20ff09938d5f510a41772708edcd983413618 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Tue, 16 Jul 2024 11:06:27 -0600 Subject: [PATCH 26/27] Show account renewal links on the Library Card page when applicable --- .../responsive/MyAccount/libraryCard.tpl | 5 +++++ code/web/release_notes/24.08.00.MD | 2 ++ code/web/services/MyAccount/LibraryCard.php | 21 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/code/web/interface/themes/responsive/MyAccount/libraryCard.tpl b/code/web/interface/themes/responsive/MyAccount/libraryCard.tpl index 9d64dcfb30..18d41449d4 100644 --- a/code/web/interface/themes/responsive/MyAccount/libraryCard.tpl +++ b/code/web/interface/themes/responsive/MyAccount/libraryCard.tpl @@ -28,6 +28,11 @@ {if !empty($showCardExpirationDate) && !empty($expirationDate)} {translate text="Expires %1%" 1=$expirationDate|date_format:"%b %d, %Y" isPublicFacing=true} {/if} + {if $showRenewalLink} + + {/if} diff --git a/code/web/release_notes/24.08.00.MD b/code/web/release_notes/24.08.00.MD index fb21f7706e..23835099a0 100644 --- a/code/web/release_notes/24.08.00.MD +++ b/code/web/release_notes/24.08.00.MD @@ -3,6 +3,8 @@ ## Aspen Discovery Updates // mark +### Account Updates +- Show account renewal links on the Library Card page when applicable. (Ticket 134192) (*MDN*) // kirstien diff --git a/code/web/services/MyAccount/LibraryCard.php b/code/web/services/MyAccount/LibraryCard.php index 709b6a2078..43fb2ad899 100644 --- a/code/web/services/MyAccount/LibraryCard.php +++ b/code/web/services/MyAccount/LibraryCard.php @@ -19,6 +19,27 @@ function launch() { $interface->assign('showCardExpirationDate', $library->showCardExpirationDate); $interface->assign('expirationDate', $user->getAccountSummary()->expirationDate); + $interface->assign('showRenewalLink', false); + if ($user->hasIlsConnection()) { + $ilsSummary = $user->getCatalogDriver()->getAccountSummary($user); + $showRenewalLink = $user->showRenewalLink($ilsSummary); + $interface->assign('showRenewalLink', $showRenewalLink); + if ($showRenewalLink) { + $userLibrary = $user->getHomeLibrary(); + if ($userLibrary->enableCardRenewal == 2) { + if (!empty($userLibrary->cardRenewalUrl)) { + $interface->assign('cardRenewalLink', $userLibrary->cardRenewalUrl); + } + } elseif ($userLibrary->enableCardRenewal == 3) { + require_once ROOT_DIR . '/sys/Enrichment/QuipuECardSetting.php'; + $quipuECardSettings = new QuipuECardSetting(); + if ($quipuECardSettings->find(true) && $quipuECardSettings->hasERenew) { + $interface->assign('cardRenewalLink', "/MyAccount/eRENEW"); + } + } + } + } + $linkedUsers = $user->getLinkedUsers(); $linkedCards = []; foreach ($linkedUsers as $tmpUser) { From 70362dc5f0832026c6e179bdf54120d97cc30572 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Tue, 16 Jul 2024 11:09:58 -0600 Subject: [PATCH 27/27] Add a new option within Show Hold and Copy Counts to always show hold and copy count --- .../themes/responsive/Search/explore-more-bar.tpl | 2 +- code/web/release_notes/24.08.00.MD | 3 +++ code/web/sys/Grouping/StatusInformation.php | 10 +++++++++- code/web/sys/LibraryLocation/Library.php | 7 ++++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/code/web/interface/themes/responsive/Search/explore-more-bar.tpl b/code/web/interface/themes/responsive/Search/explore-more-bar.tpl index 96ec4a1f11..eae13b7fd2 100644 --- a/code/web/interface/themes/responsive/Search/explore-more-bar.tpl +++ b/code/web/interface/themes/responsive/Search/explore-more-bar.tpl @@ -35,7 +35,7 @@ {translate text=
- + {$exploreMoreCategory.label|truncate:30}
diff --git a/code/web/release_notes/24.08.00.MD b/code/web/release_notes/24.08.00.MD index 23835099a0..ebe9e23da9 100644 --- a/code/web/release_notes/24.08.00.MD +++ b/code/web/release_notes/24.08.00.MD @@ -6,6 +6,9 @@ ### Account Updates - Show account renewal links on the Library Card page when applicable. (Ticket 134192) (*MDN*) +### Search Updates +- Add a new option within Show Hold and Copy Counts to always show hold and copy counts. (Ticket 128625) (*MDN*) + // kirstien // kodi diff --git a/code/web/sys/Grouping/StatusInformation.php b/code/web/sys/Grouping/StatusInformation.php index 9385314007..b08739bc07 100644 --- a/code/web/sys/Grouping/StatusInformation.php +++ b/code/web/sys/Grouping/StatusInformation.php @@ -277,7 +277,15 @@ function getNumberOfCopiesMessage() { $numberOfCopiesMessage .= '%1% copies available'; } } - if (($this->getNumHolds() > 0 && $this->getHoldableCopies() > 0) && ($this->getAvailableCopies() == 0 && !$this->isAvailableOnline())) { + + if ($library->showGroupedHoldCopiesCount == 2) { + $showWaitList = true; + }else if ($library->showGroupedHoldCopiesCount == 1) { + $showWaitList = $this->getAvailableCopies() == 0 && !$this->isAvailableOnline(); + }else{ + $showWaitList = false; + } + if (($this->getNumHolds() > 0 && $this->getHoldableCopies() > 0) && ($showWaitList)) { if ($this->getCopies() == 1) { $numberOfCopiesMessage .= '1 copy'; } elseif ($this->getCopies() > 1) { diff --git a/code/web/sys/LibraryLocation/Library.php b/code/web/sys/LibraryLocation/Library.php index d3ab1b455a..06b5fcbe81 100644 --- a/code/web/sys/LibraryLocation/Library.php +++ b/code/web/sys/LibraryLocation/Library.php @@ -3139,7 +3139,12 @@ static function getObjectStructure($context = ''): array { ], 'showGroupedHoldCopiesCount' => [ 'property' => 'showGroupedHoldCopiesCount', - 'type' => 'checkbox', + 'type' => 'enum', + 'values' => [ + 0 => 'Never', + 1 => 'Only for unavailable titles', + 2 => 'Always' + ], 'label' => 'Show Hold and Copy Counts', 'description' => 'Whether or not the hold count and copies counts should be visible for grouped works when summarizing formats.', 'hideInLists' => true,