Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kongtiaowang committed Nov 14, 2024
1 parent 3f7fdf8 commit f50fde9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions modules/api/php/endpoints/candidate/visit/visit.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ class Visit extends Endpoint implements \LORIS\Middleware\ETagCalculator
$centerid = array_search($visitinfo['Site'], \Utility::getSiteList());

if ($centerid === false
|| !in_array(\CenterID::singleton(intval($centerid)),
$user->getCenterIDs())
|| !in_array(
\CenterID::singleton(intval($centerid)),
$user->getCenterIDs()
)
) {
return new \LORIS\Http\Response\JSON\Forbidden(
"You can't create or modify candidates visit for the site " .
Expand Down
6 changes: 3 additions & 3 deletions modules/issue_tracker/php/edit.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,9 @@ class Edit extends \NDB_Page implements ETagCalculator
{
return $centerID == null
? 'All Sites'
: \Site::singleton(
\CenterID::singleton(intval($centerID))
)->getCenterName();
: \Site::singleton(
\CenterID::singleton(intval($centerID))
)->getCenterName();
}

/**
Expand Down
6 changes: 3 additions & 3 deletions php/libraries/Recording.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ class Recording
$this->_outputtype = $dbrow['outputtype'];
$this->_acquisitionmodality = $dbrow['acquisitionmodality'];
$this->_filetype = $dbrow['filetype'];
$this->_centerid = \CenterID::singleton(intval
($dbrow['centerid'])
);
$this->_centerid = \CenterID::singleton(
intval($dbrow['centerid'])
);
$this->_entitytype = $dbrow['entitytype'];
$this->_channel_file_path = $dbrow['channel_file_path'];
$this->_electrode_file_path = $dbrow['electrode_file_path'];
Expand Down

0 comments on commit f50fde9

Please sign in to comment.