Skip to content

Commit

Permalink
Rename instance variable to DB
Browse files Browse the repository at this point in the history
  • Loading branch information
h-karim committed Jun 4, 2020
1 parent 8215419 commit 47f5b96
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ class ImagingBrowserRowProvisioner extends \LORIS\Data\Provisioners\DBRowProvisi
*/
function __construct()
{
$config = \NDB_Config::singleton();
$instance = null;
$config = \NDB_Config::singleton();
$DB = null;
try {
$instance = \NDB_Factory::singleton()->database();
$DB = \NDB_Factory::singleton()->database();
} catch (\ConfigurationException $e){
error_log($e->getMessage());
}
Expand Down Expand Up @@ -116,7 +116,7 @@ class ImagingBrowserRowProvisioner extends \LORIS\Data\Provisioners\DBRowProvisi
foreach ($scan_id_types as $id => $type) {
$pass[$id] = $type . 'pass';
$qc[$id] = $type . 'QC';
$coalesce_desc[$id] = $instance->quote($pass[$id] . '.' . $qc[$id]);
$coalesce_desc[$id] = $DB->quote($pass[$id] . '.' . $qc[$id]);
$case_desc[$id] = "
CASE
COALESCE($coalesce_desc[$id], '')
Expand Down Expand Up @@ -171,7 +171,8 @@ class ImagingBrowserRowProvisioner extends \LORIS\Data\Provisioners\DBRowProvisi
// $scan_types are set in the configuration module
$modalities_subquery = '';
foreach ($case_desc as $key => $value) {
$modalities_subquery = $value." as ".$instance->quote("$scan_id_types[$key]_QC_Status");
$modalities_subquery = $value." as " .
$DB->quote("$scan_id_types[$key]_QC_Status");
}

// =================================================
Expand Down

0 comments on commit 47f5b96

Please sign in to comment.