Skip to content

Commit a5cf337

Browse files
committed
Allow shadowing from PC2
1 parent 60793b4 commit a5cf337

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
@@ -522,7 +522,8 @@ protected function loadContest(): void
522522
case ExternalContestSource::TYPE_CCS_API:
523523
try {
524524
// The base URL is the URL of the CCS API root.
525-
if (preg_match('/^(.*\/)contests\/.*/',
525+
// Proper is '^(.*\/)contests\/.*/', but PC^2 doesn't expose this (yet).
526+
if (preg_match('/^(.*\/)contest(s\/.*)?/',
526527
$this->source->getSource(), $matches) === 0) {
527528
$this->loadingError = 'Cannot determine base URL. Did you pass a CCS API contest URL?';
528529
$this->cachedContestData = null;

0 commit comments

Comments
 (0)