Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/method/ConduitConnectConduitAPIMethod.php
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | protected function execute(ConduitAPIRequest $request) { | ||||
| $connection->setUsername($username); | $connection->setUsername($username); | ||||
| $connection->save(); | $connection->save(); | ||||
| switch ($client) { | switch ($client) { | ||||
| case 'arc': | case 'arc': | ||||
| $server_version = 6; | $server_version = 6; | ||||
| $supported_versions = array( | $supported_versions = array( | ||||
| $server_version => true, | $server_version => true, | ||||
| // Client version 5 introduced "user.query" call | |||||
| 4 => true, | |||||
| // Client version 6 introduced "diffusion.getlintmessages" call | |||||
| 5 => true, | |||||
| ); | ); | ||||
| if (empty($supported_versions[$client_version])) { | if (empty($supported_versions[$client_version])) { | ||||
| if ($server_version < $client_version) { | if ($server_version < $client_version) { | ||||
| $ex = new ConduitException('ERR-BAD-VERSION'); | $ex = new ConduitException('ERR-BAD-VERSION'); | ||||
| $ex->setErrorDescription( | $ex->setErrorDescription( | ||||
| "Your 'arc' client version is '{$client_version}', which ". | "Your 'arc' client version is '{$client_version}', which ". | ||||
| "is newer than the server version, '{$server_version}'. ". | "is newer than the server version, '{$server_version}'. ". | ||||
| ▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines | |||||