mirror of
https://github.com/kevachat/npsapp.git
synced 2025-01-28 07:44:16 +00:00
save connection url in session
This commit is contained in:
parent
ba90183547
commit
5c17fab5e0
@ -46,10 +46,24 @@ $server->setWelcome(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Build connection URL #72811
|
||||||
|
$url = sprintf(
|
||||||
|
'nex://%s',
|
||||||
|
$connect
|
||||||
|
);
|
||||||
|
|
||||||
// Init new session
|
// Init new session
|
||||||
$session[$connect] =
|
$session[$connect] =
|
||||||
[
|
[
|
||||||
'time' => time(),
|
'time' => time(),
|
||||||
|
'host' => parse_url(
|
||||||
|
$url,
|
||||||
|
PHP_URL_HOST
|
||||||
|
),
|
||||||
|
'port' => parse_url(
|
||||||
|
$url,
|
||||||
|
PHP_URL_PORT
|
||||||
|
),
|
||||||
'code' => null
|
'code' => null
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -85,12 +99,6 @@ $server->setWelcome(
|
|||||||
// Debug request on enabled
|
// Debug request on enabled
|
||||||
if ($config->nps->action->welcome->debug->enabled)
|
if ($config->nps->action->welcome->debug->enabled)
|
||||||
{
|
{
|
||||||
// Build connection URL #72811
|
|
||||||
$url = sprintf(
|
|
||||||
'nex://%s',
|
|
||||||
$connect
|
|
||||||
);
|
|
||||||
|
|
||||||
// Print debug from template
|
// Print debug from template
|
||||||
printf(
|
printf(
|
||||||
str_ireplace(
|
str_ireplace(
|
||||||
@ -102,8 +110,8 @@ $server->setWelcome(
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
(string) date('c'),
|
(string) date('c'),
|
||||||
(string) parse_url($url, PHP_URL_HOST),
|
(string) $session[$connect]['host'],
|
||||||
(string) parse_url($url, PHP_URL_PORT),
|
(string) $session[$connect]['port'],
|
||||||
(string) $session[$connect]['captcha']
|
(string) $session[$connect]['captcha']
|
||||||
],
|
],
|
||||||
$config->nps->action->welcome->debug->template
|
$config->nps->action->welcome->debug->template
|
||||||
@ -138,12 +146,6 @@ $server->setPending(
|
|||||||
// Debug request on enabled
|
// Debug request on enabled
|
||||||
if ($config->nps->action->pending->debug->enabled)
|
if ($config->nps->action->pending->debug->enabled)
|
||||||
{
|
{
|
||||||
// Build connection URL #72811
|
|
||||||
$url = sprintf(
|
|
||||||
'nex://%s',
|
|
||||||
$connect
|
|
||||||
);
|
|
||||||
|
|
||||||
// Print debug from template
|
// Print debug from template
|
||||||
printf(
|
printf(
|
||||||
str_ireplace(
|
str_ireplace(
|
||||||
@ -156,8 +158,8 @@ $server->setPending(
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
(string) date('c'),
|
(string) date('c'),
|
||||||
(string) parse_url($url, PHP_URL_HOST),
|
(string) $session[$connect]['host'],
|
||||||
(string) parse_url($url, PHP_URL_PORT),
|
(string) $session[$connect]['port'],
|
||||||
(string) $request,
|
(string) $request,
|
||||||
(string) $session[$connect]['captcha']
|
(string) $session[$connect]['captcha']
|
||||||
],
|
],
|
||||||
@ -198,12 +200,6 @@ $server->setHandler(
|
|||||||
// Debug request on enabled
|
// Debug request on enabled
|
||||||
if ($config->nps->action->handler->debug->enabled)
|
if ($config->nps->action->handler->debug->enabled)
|
||||||
{
|
{
|
||||||
// Build connection URL #72811
|
|
||||||
$url = sprintf(
|
|
||||||
'nex://%s',
|
|
||||||
$connect
|
|
||||||
);
|
|
||||||
|
|
||||||
// Print debug from template
|
// Print debug from template
|
||||||
printf(
|
printf(
|
||||||
str_ireplace(
|
str_ireplace(
|
||||||
@ -218,8 +214,8 @@ $server->setHandler(
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
(string) date('c'),
|
(string) date('c'),
|
||||||
(string) parse_url($url, PHP_URL_HOST),
|
(string) $session[$connect]['host'],
|
||||||
(string) parse_url($url, PHP_URL_PORT),
|
(string) $session[$connect]['port'],
|
||||||
(string) str_replace('%', '%%', $request),
|
(string) str_replace('%', '%%', $request),
|
||||||
(string) $session[$connect]['captcha'],
|
(string) $session[$connect]['captcha'],
|
||||||
(string) mb_strlen($content),
|
(string) mb_strlen($content),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user