Skip to content

Commit

Permalink
DIS-238 - Indexing Profile Updates
Browse files Browse the repository at this point in the history
- hardcode record drivers
  • Loading branch information
mdnoble73 committed Jan 17, 2025
1 parent 0e73a12 commit d7a92bc
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions code/web/RecordDrivers/RecordDriverFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,12 @@ static function initRecordDriverById($id, $groupedWork = null) {

if (array_key_exists($recordType, $indexingProfiles)) {
$indexingProfile = $indexingProfiles[$recordType];
$driverName = $indexingProfile->recordDriver;
$driverPath = ROOT_DIR . "/RecordDrivers/{$driverName}.php";
require_once $driverPath;
$recordDriver = new $driverName($id, $groupedWork);
require_once ROOT_DIR . "/RecordDrivers/MarcRecordDriver.php";
$recordDriver = new MarcRecordDriver($id, $groupedWork);
} elseif (array_key_exists(strtolower($recordType), $sideLoadSettings)) {
$indexingProfile = $sideLoadSettings[strtolower($recordType)];
$driverName = $indexingProfile->recordDriver;
$driverPath = ROOT_DIR . "/RecordDrivers/{$driverName}.php";
require_once $driverPath;
$recordDriver = new $driverName($id, $groupedWork);
require_once ROOT_DIR . "/RecordDrivers/SideLoadedRecord.php";
$recordDriver = new SideLoadedRecord($id, $groupedWork);
} else {
//Check to see if this is an object from the archive
$driverNameParts = explode('_', $recordType);
Expand Down

0 comments on commit d7a92bc

Please sign in to comment.