mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
fix cleanup do not run under secret login
This commit is contained in:
@@ -78,15 +78,10 @@ class Handler extends ExceptionHandler
|
|||||||
{
|
{
|
||||||
$data = $request->all();
|
$data = $request->all();
|
||||||
$httpStatusCode = $this->getHttpStatusCode($e);
|
$httpStatusCode = $this->getHttpStatusCode($e);
|
||||||
if ($httpStatusCode == 200) {
|
|
||||||
$msg = $e->getMessage() ?: get_class($e);
|
|
||||||
} else {
|
|
||||||
$msg = 'Server Error';
|
|
||||||
}
|
|
||||||
$msg = $e->getMessage();
|
$msg = $e->getMessage();
|
||||||
$trace = $e->getTraceAsString();
|
$trace = $e->getTraceAsString();
|
||||||
if (config('app.debug')) {
|
if (config('app.debug')) {
|
||||||
$data['trace'] = $e->getTraceAsString();
|
$data['trace'] = $trace;
|
||||||
}
|
}
|
||||||
return new JsonResponse(
|
return new JsonResponse(
|
||||||
fail($msg, $data),
|
fail($msg, $data),
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ class PollController extends Controller
|
|||||||
->selectRaw("selection, count(*) as count")->groupBy("selection")
|
->selectRaw("selection, count(*) as count")->groupBy("selection")
|
||||||
->get()->pluck('count', 'selection')->toArray();
|
->get()->pluck('count', 'selection')->toArray();
|
||||||
foreach ($answerStats as $index => &$value) {
|
foreach ($answerStats as $index => &$value) {
|
||||||
$value = number_format(($value / $poll->answers_count) * 100, 2) . '%';
|
$value = number_format(($value / $poll->answers_count) * 100, 1) . '%';
|
||||||
}
|
}
|
||||||
$resource = new PollResource($poll);
|
$resource = new PollResource($poll);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ return [
|
|||||||
'tap' => [\App\Logging\NexusFormatter::class],
|
'tap' => [\App\Logging\NexusFormatter::class],
|
||||||
'path' => env('LOG_FILE', '/tmp/nexus.log'),
|
'path' => env('LOG_FILE', '/tmp/nexus.log'),
|
||||||
'level' => env('LOG_LEVEL', 'debug'),
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'ignore_exceptions' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'daily' => [
|
'daily' => [
|
||||||
@@ -54,6 +55,7 @@ return [
|
|||||||
'level' => env('LOG_LEVEL', 'debug'),
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
'tap' => [\App\Logging\NexusFormatter::class],
|
'tap' => [\App\Logging\NexusFormatter::class],
|
||||||
'days' => 14,
|
'days' => 14,
|
||||||
|
'ignore_exceptions' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'slack' => [
|
'slack' => [
|
||||||
@@ -79,6 +81,8 @@ return [
|
|||||||
'level' => env('LOG_LEVEL', 'debug'),
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
'handler' => StreamHandler::class,
|
'handler' => StreamHandler::class,
|
||||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||||
|
'ignore_exceptions' => false,
|
||||||
|
'tap' => [\App\Logging\NexusFormatter::class],
|
||||||
'with' => [
|
'with' => [
|
||||||
'stream' => 'php://stderr',
|
'stream' => 'php://stderr',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.0');
|
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.0');
|
||||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-04-09');
|
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-04-10');
|
||||||
defined('IN_TRACKER') || define('IN_TRACKER', true);
|
defined('IN_TRACKER') || define('IN_TRACKER', true);
|
||||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ ini_set('display_errors', 0);
|
|||||||
$Cache = new class_cache_redis(); //Load the caching class
|
$Cache = new class_cache_redis(); //Load the caching class
|
||||||
$Cache->setLanguageFolderArray(get_langfolder_list());
|
$Cache->setLanguageFolderArray(get_langfolder_list());
|
||||||
require $rootpath . 'include/config.php';
|
require $rootpath . 'include/config.php';
|
||||||
if (!in_array(nexus()->getScript(), ['announce', 'scrape', 'torrentrss', 'download'])) {
|
if (!isRunningInConsole() && !in_array(nexus()->getScript(), ['announce', 'scrape', 'torrentrss', 'download'])) {
|
||||||
require $rootpath . get_langfile_path("functions.php");
|
require $rootpath . get_langfile_path("functions.php");
|
||||||
checkGuestVisit();
|
checkGuestVisit();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user