Skip to content

Commit

Permalink
Allow shadowing from PC2
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Feb 23, 2024
1 parent 2a947c1 commit a36c11b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webapp/src/Service/ExternalContestSourceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@ protected function loadContest(): void
case ExternalContestSource::TYPE_CCS_API:
try {
// The base URL is the URL of the CCS API root.
if (preg_match('/^(.*\/)contests\/.*/',
// Proper is '^(.*\/)contests\/.*/', but PC^2 doesn't expose this (yet).
if (preg_match('/^(.*\/)contest(s\/.*/)?',

Check failure on line 539 in webapp/src/Service/ExternalContestSourceService.php

View workflow job for this annotation

GitHub Actions / phpstan

Regex pattern is invalid: Unknown modifier ')' in pattern: /^(.*\/)contest(s\/.*/)?
$this->source->getSource(), $matches) === 0) {
$this->loadingError = 'Cannot determine base URL. Did you pass a CCS API contest URL?';
$this->cachedContestData = null;
Expand Down

0 comments on commit a36c11b

Please sign in to comment.