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
APP_SECRET=EDIT_ME APP_SECRET=EDIT_ME
###< symfony/framework-bundle ### ###< symfony/framework-bundle ###
APP_VERSION=1.4.1 APP_VERSION=1.4.2
APP_NAME=KevaChat APP_NAME=KevaChat

20
src/Controller/RoomController.php

@ -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 // Connect memcached
$memcached = new \Memcached(); $memcached = new \Memcached();
$memcached->addServer( $memcached->addServer(
@ -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 // Trim extra spaces from room name
$name = trim( $name = trim(
$request->get('name') $request->get('name')
@ -614,7 +614,7 @@ class RoomController extends AbstractController
if (mb_strlen($name) < 1 || mb_strlen($name) > 520) if (mb_strlen($name) < 1 || mb_strlen($name) > 520)
{ {
return $this->redirectToRoute( return $this->redirectToRoute(
'room_namespace', 'room_list',
[ [
'name' => $name, 'name' => $name,
'error' => $translator->trans('Name length out of KevaCoin protocol limits') 'error' => $translator->trans('Name length out of KevaCoin protocol limits')

Loading…
Cancel
Save