Skip to content

Commit

Permalink
CopyPatrolRepo: don't cast submission_id as int
Browse files Browse the repository at this point in the history
  • Loading branch information
MusikAnimal committed Aug 1, 2023
1 parent 63b34f4 commit 7cd6a0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Repository/CopyPatrolRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function getPlagiarismRecords( array $options = [], int $limit = 50 ): ar
if ( $options['id'] ) {
// if given an exact submission ID, don't allow any other filter options
$qb->where( 'd.submission_id = :id' );
$outerQuery->setParameter( 'id', $options['id'], ParameterType::INTEGER );
$outerQuery->setParameter( 'id', $options['id'] );
} elseif ( $options['revision'] ) {
// Same situation for diff IDs, except we still want the language.
$qb->where( 'rev_id = :rev_id' );
Expand Down Expand Up @@ -101,7 +101,7 @@ public function getPlagiarismRecords( array $options = [], int $limit = 50 ): ar
// see if this is a load more click
if ( $options['last_id'] ) {
$qb->andWhere( "d.submission_id > :lastId" );
$outerQuery->setParameter( 'lastId', $options['last_id'], ParameterType::INTEGER );
$outerQuery->setParameter( 'lastId', $options['last_id'] );
}
// filtering to draft namespace
if ( $options['drafts'] ) {
Expand Down

0 comments on commit 7cd6a0e

Please sign in to comment.