Browse Source

fix server error

main 1.4.2
ghost 12 months ago
parent
commit
be1db028f0
  1. 2
      .env
  2. 20
      src/Controller/RoomController.php

2
.env

@ -19,7 +19,7 @@ APP_ENV=dev @@ -19,7 +19,7 @@ APP_ENV=dev
APP_SECRET=EDIT_ME
###< symfony/framework-bundle ###
APP_VERSION=1.4.1
APP_VERSION=1.4.2
APP_NAME=KevaChat

20
src/Controller/RoomController.php

@ -581,6 +581,15 @@ class RoomController extends AbstractController @@ -581,6 +581,15 @@ class RoomController extends AbstractController
);
}
// Connect kevacoin
$client = new \Kevachat\Kevacoin\Client(
$this->getParameter('app.kevacoin.protocol'),
$this->getParameter('app.kevacoin.host'),
$this->getParameter('app.kevacoin.port'),
$this->getParameter('app.kevacoin.username'),
$this->getParameter('app.kevacoin.password')
);
// Connect memcached
$memcached = new \Memcached();
$memcached->addServer(
@ -596,15 +605,6 @@ class RoomController extends AbstractController @@ -596,15 +605,6 @@ class RoomController extends AbstractController
),
);
// Connect kevacoin
$client = new \Kevachat\Kevacoin\Client(
$this->getParameter('app.kevacoin.protocol'),
$this->getParameter('app.kevacoin.host'),
$this->getParameter('app.kevacoin.port'),
$this->getParameter('app.kevacoin.username'),
$this->getParameter('app.kevacoin.password')
);
// Trim extra spaces from room name
$name = trim(
$request->get('name')
@ -614,7 +614,7 @@ class RoomController extends AbstractController @@ -614,7 +614,7 @@ class RoomController extends AbstractController
if (mb_strlen($name) < 1 || mb_strlen($name) > 520)
{
return $this->redirectToRoute(
'room_namespace',
'room_list',
[
'name' => $name,
'error' => $translator->trans('Name length out of KevaCoin protocol limits')

Loading…
Cancel
Save