Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/ssh/DiffusionSSHWorkflow.php
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | try { | ||||
$this->writeError(get_class($ex).': '.$ex->getMessage()); | $this->writeError(get_class($ex).': '.$ex->getMessage()); | ||||
return 1; | return 1; | ||||
} | } | ||||
} | } | ||||
protected function loadRepository($path) { | protected function loadRepository($path) { | ||||
$viewer = $this->getUser(); | $viewer = $this->getUser(); | ||||
$regex = '@^/?diffusion/(?P<callsign>[A-Z]+)(?:/|$)@'; | $regex = '@^/?diffusion/(?P<callsign>[A-Z]+)(?:/|\z)@'; | ||||
$matches = null; | $matches = null; | ||||
if (!preg_match($regex, $path, $matches)) { | if (!preg_match($regex, $path, $matches)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Unrecognized repository path "%s". Expected a path like '. | 'Unrecognized repository path "%s". Expected a path like '. | ||||
'"%s".', | '"%s".', | ||||
$path, | $path, | ||||
"/diffusion/X/")); | "/diffusion/X/")); | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |