Skip to content

Commit

Permalink
Merge branch '24.05.10' into 24.06.00
Browse files Browse the repository at this point in the history
  • Loading branch information
mdnoble73 committed Jun 11, 2024
2 parents 26d1b75 + f7c5465 commit c128a7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
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
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

0 comments on commit c128a7f

Please sign in to comment.