|
|
|
@ -197,17 +197,12 @@ foreach ((array) scandir(__DIR__ . '/../host') as $host)
@@ -197,17 +197,12 @@ foreach ((array) scandir(__DIR__ . '/../host') as $host)
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Success, redirect to this room page |
|
|
|
|
if ($room->post($matches[1], null, $matches[2], $request->getQuery())) |
|
|
|
|
if ($txid = $room->post($matches[1], null, $matches[2], $request->getQuery())) |
|
|
|
|
{ |
|
|
|
|
$response->setCode( |
|
|
|
|
30 |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$response->setMeta( |
|
|
|
|
sprintf( |
|
|
|
|
'/room/%s', |
|
|
|
|
$matches[1] |
|
|
|
|
) |
|
|
|
|
if ($result = $room->sent($matches[1], $txid)) |
|
|
|
|
{ |
|
|
|
|
$response->setContent( |
|
|
|
|
$result |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
return $response; |
|
|
|
@ -215,6 +210,7 @@ foreach ((array) scandir(__DIR__ . '/../host') as $host)
@@ -215,6 +210,7 @@ foreach ((array) scandir(__DIR__ . '/../host') as $host)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// New post reply request |
|
|
|
|
else if (preg_match('/^\/room\/(N[A-z0-9]{33})\/([A-z0-9]{64})\/([\d]+)\/reply$/', $request->getPath(), $matches)) |
|
|
|
@ -246,17 +242,12 @@ foreach ((array) scandir(__DIR__ . '/../host') as $host)
@@ -246,17 +242,12 @@ foreach ((array) scandir(__DIR__ . '/../host') as $host)
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
// Success, redirect to this room page |
|
|
|
|
if ($room->post($matches[1], $matches[2], $matches[3], $request->getQuery())) |
|
|
|
|
if ($txid = $room->post($matches[1], $matches[2], $matches[3], $request->getQuery())) |
|
|
|
|
{ |
|
|
|
|
$response->setCode( |
|
|
|
|
30 |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$response->setMeta( |
|
|
|
|
sprintf( |
|
|
|
|
'/room/%s', |
|
|
|
|
$matches[1] |
|
|
|
|
) |
|
|
|
|
if ($result = $room->sent($matches[1], $txid)) |
|
|
|
|
{ |
|
|
|
|
$response->setContent( |
|
|
|
|
$result |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
return $response; |
|
|
|
@ -265,6 +256,7 @@ foreach ((array) scandir(__DIR__ . '/../host') as $host)
@@ -265,6 +256,7 @@ foreach ((array) scandir(__DIR__ . '/../host') as $host)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Set default response |
|
|
|
|
include_once __DIR__ . '/controller/error.php'; |
|
|
|
|