Skip to content

Commit 75ec33b

Browse files
committed
Allow shadowing from PC2
1 parent 9a1d0cd commit 75ec33b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

webapp/src/Service/ExternalContestSourceService.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,8 @@ protected function loadContest(): void
529529
case ExternalContestSource::TYPE_CCS_API:
530530
try {
531531
// The base URL is the URL of the CCS API root.
532-
if (preg_match('/^(.*\/)contests\/.*/',
532+
// Proper is '^(.*\/)contests\/.*/', but PC^2 doesn't expose this (yet).
533+
if (preg_match('/^(.*\/)contest(s\/.*)/',
533534
$this->source->getSource(), $matches) === 0) {
534535
$this->loadingError = 'Cannot determine base URL. Did you pass a CCS API contest URL?';
535536
$this->cachedContestData = null;

0 commit comments

Comments
 (0)