1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2025-01-31 20:11:38 +01:00

Add vendor files to dist

This commit is contained in:
FreeScout 2024-09-22 07:01:39 -07:00
parent f6e18818cd
commit 5c9ab337ea
4 changed files with 4 additions and 161 deletions

View File

@ -2539,11 +2539,10 @@ return array(
'Ramsey\\Uuid\\UuidFactory' => $vendorDir . '/ramsey/uuid/src/UuidFactory.php',
'Ramsey\\Uuid\\UuidFactoryInterface' => $vendorDir . '/ramsey/uuid/src/UuidFactoryInterface.php',
'Ramsey\\Uuid\\UuidInterface' => $vendorDir . '/ramsey/uuid/src/UuidInterface.php',
'Rap2hpoutre\\LaravelLogViewer\\BaseController' => $vendorDir . '/rap2hpoutre/laravel-log-viewer/src/controllers/LogViewerController.php',
'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewer' => $baseDir . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php',
'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider' => $vendorDir . '/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewerServiceProvider.php',
'Rap2hpoutre\\LaravelLogViewer\\Level' => $vendorDir . '/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/Level.php',
'Rap2hpoutre\\LaravelLogViewer\\LogViewerController' => $vendorDir . '/rap2hpoutre/laravel-log-viewer/src/controllers/LogViewerController.php',
'Rap2hpoutre\\LaravelLogViewer\\LogViewerController' => $baseDir . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LogViewerController.php',
'Rap2hpoutre\\LaravelLogViewer\\Pattern' => $vendorDir . '/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/Pattern.php',
'SessionUpdateTimestampHandlerInterface' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php',
'Spatie\\Activitylog\\ActivityLogger' => $vendorDir . '/spatie/laravel-activitylog/src/ActivityLogger.php',

View File

@ -3341,11 +3341,10 @@ class ComposerStaticInitbf8dc242a640d7c740f283f226d0bdb4
'Ramsey\\Uuid\\UuidFactory' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidFactory.php',
'Ramsey\\Uuid\\UuidFactoryInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidFactoryInterface.php',
'Ramsey\\Uuid\\UuidInterface' => __DIR__ . '/..' . '/ramsey/uuid/src/UuidInterface.php',
'Rap2hpoutre\\LaravelLogViewer\\BaseController' => __DIR__ . '/..' . '/rap2hpoutre/laravel-log-viewer/src/controllers/LogViewerController.php',
'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewer' => __DIR__ . '/../..' . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewer.php',
'Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider' => __DIR__ . '/..' . '/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LaravelLogViewerServiceProvider.php',
'Rap2hpoutre\\LaravelLogViewer\\Level' => __DIR__ . '/..' . '/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/Level.php',
'Rap2hpoutre\\LaravelLogViewer\\LogViewerController' => __DIR__ . '/..' . '/rap2hpoutre/laravel-log-viewer/src/controllers/LogViewerController.php',
'Rap2hpoutre\\LaravelLogViewer\\LogViewerController' => __DIR__ . '/../..' . '/overrides/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/LogViewerController.php',
'Rap2hpoutre\\LaravelLogViewer\\Pattern' => __DIR__ . '/..' . '/rap2hpoutre/laravel-log-viewer/src/Rap2hpoutre/LaravelLogViewer/Pattern.php',
'SessionUpdateTimestampHandlerInterface' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php',
'Spatie\\Activitylog\\ActivityLogger' => __DIR__ . '/..' . '/spatie/laravel-activitylog/src/ActivityLogger.php',

View File

@ -3,7 +3,7 @@
'name' => 'freescout-helpdesk/freescout',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'a2979a4406b5d5950537162e89f7af15d7fb68fa',
'reference' => 'f6e18818cd403b9536b22f6e35abc1defcd0e5ad',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -175,7 +175,7 @@
'freescout-helpdesk/freescout' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => 'a2979a4406b5d5950537162e89f7af15d7fb68fa',
'reference' => 'f6e18818cd403b9536b22f6e35abc1defcd0e5ad',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),

View File

@ -1,155 +0,0 @@
<?php
namespace Rap2hpoutre\LaravelLogViewer;
use Illuminate\Support\Facades\Crypt;
if (class_exists("\\Illuminate\\Routing\\Controller")) {
class BaseController extends \Illuminate\Routing\Controller {}
} elseif (class_exists("Laravel\\Lumen\\Routing\\Controller")) {
class BaseController extends \Laravel\Lumen\Routing\Controller {}
}
/**
* Class LogViewerController
* @package Rap2hpoutre\LaravelLogViewer
*/
class LogViewerController extends BaseController
{
/**
* @var \Illuminate\Http\Request
*/
protected $request;
/**
* @var LaravelLogViewer
*/
private $log_viewer;
/**
* @var string
*/
protected $view_log = 'laravel-log-viewer::log';
/**
* LogViewerController constructor.
*/
public function __construct()
{
$this->log_viewer = new LaravelLogViewer();
$this->request = app('request');
}
/**
* @return array|mixed
* @throws \Exception
*/
public function index()
{
$folderFiles = [];
if ($this->request->input('f')) {
$this->log_viewer->setFolder(Crypt::decrypt($this->request->input('f')));
$folderFiles = $this->log_viewer->getFolderFiles(true);
}
if ($this->request->input('l')) {
$this->log_viewer->setFile(Crypt::decrypt($this->request->input('l')));
}
if ($early_return = $this->earlyReturn()) {
return $early_return;
}
$data = [
'logs' => $this->log_viewer->all(),
'folders' => $this->log_viewer->getFolders(),
'current_folder' => $this->log_viewer->getFolderName(),
'folder_files' => $folderFiles,
'files' => $this->log_viewer->getFiles(true),
'current_file' => $this->log_viewer->getFileName(),
'standardFormat' => true,
'structure' => $this->log_viewer->foldersAndFiles(),
'storage_path' => $this->log_viewer->getStoragePath(),
];
if ($this->request->wantsJson()) {
return $data;
}
if (is_array($data['logs']) && count($data['logs']) > 0) {
$firstLog = reset($data['logs']);
if (!$firstLog['context'] && !$firstLog['level']) {
$data['standardFormat'] = false;
}
}
return app('view')->make($this->view_log, $data);
}
/**
* @return bool|mixed
* @throws \Exception
*/
private function earlyReturn()
{
if ($this->request->input('f')) {
$this->log_viewer->setFolder(Crypt::decrypt($this->request->input('f')));
}
if ($this->request->input('dl')) {
return $this->download($this->pathFromInput('dl'));
} elseif ($this->request->has('clean')) {
app('files')->put($this->pathFromInput('clean'), '');
return $this->redirect(url()->previous());
} elseif ($this->request->has('del')) {
app('files')->delete($this->pathFromInput('del'));
return $this->redirect($this->request->url());
} elseif ($this->request->has('delall')) {
$files = ($this->log_viewer->getFolderName())
? $this->log_viewer->getFolderFiles(true)
: $this->log_viewer->getFiles(true);
foreach ($files as $file) {
app('files')->delete($this->log_viewer->pathToLogFile($file));
}
return $this->redirect($this->request->url());
}
return false;
}
/**
* @param string $input_string
* @return string
* @throws \Exception
*/
private function pathFromInput($input_string)
{
return $this->log_viewer->pathToLogFile(Crypt::decrypt($this->request->input($input_string)));
}
/**
* @param $to
* @return mixed
*/
private function redirect($to)
{
if (function_exists('redirect')) {
return redirect($to);
}
return app('redirect')->to($to);
}
/**
* @param string $data
* @return mixed
*/
private function download($data)
{
if (function_exists('response')) {
return response()->download($data);
}
// For laravel 4.2
return app('\Illuminate\Support\Facades\Response')->download($data);
}
}