Browse Source

change var name

main
ghost 12 months ago
parent
commit
e1ff34e508
  1. 6
      src/Controller/ModuleController.php

6
src/Controller/ModuleController.php

@ -109,14 +109,14 @@ class ModuleController extends AbstractController
$readonly = explode('|', $this->getParameter('app.kevacoin.room.namespaces.readonly')); $readonly = explode('|', $this->getParameter('app.kevacoin.room.namespaces.readonly'));
// Get wallet namespaces (to enable post module there) // Get wallet namespaces (to enable post module there)
$public = []; $namespaces = [];
foreach ((array) $client->kevaListNamespaces() as $value) foreach ((array) $client->kevaListNamespaces() as $value)
{ {
// Check namespace enabled as room in .env // Check namespace enabled as room in .env
if (in_array($value['namespaceId'], $rooms) && !in_array($value['namespaceId'], $readonly)) if (in_array($value['namespaceId'], $rooms) && !in_array($value['namespaceId'], $readonly))
{ {
$public[] = $value['namespaceId']; $namespaces[] = $value['namespaceId'];
} }
} }
@ -154,7 +154,7 @@ class ModuleController extends AbstractController
return $this->render( return $this->render(
'default/module/post.html.twig', 'default/module/post.html.twig',
[ [
'enabled' => in_array($request->get('namespace'), $public), 'enabled' => in_array($request->get('namespace'), $namespaces),
'namespace' => $request->get('namespace'), 'namespace' => $request->get('namespace'),
'sign' => $request->get('sign'), 'sign' => $request->get('sign'),
'error' => $request->get('error'), 'error' => $request->get('error'),

Loading…
Cancel
Save