초기 커밋: 5130 레거시 시스템
- URL 하드코딩 → .env APP_URL 기반 동적 URL로 변경 - DB 연결 하드코딩 → .env 기반으로 변경 - MySQL strict mode DATE 오류 수정
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* Simple script to set correct charset for the license
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\Controllers;
|
||||
|
||||
use function is_readable;
|
||||
use function printf;
|
||||
use function readfile;
|
||||
|
||||
/**
|
||||
* Simple script to set correct charset for the license
|
||||
*/
|
||||
class LicenseController extends AbstractController
|
||||
{
|
||||
public function index(): void
|
||||
{
|
||||
$this->response->disable();
|
||||
$this->response->header('Content-type: text/plain; charset=utf-8');
|
||||
|
||||
$filename = LICENSE_FILE;
|
||||
|
||||
// Check if the file is available, some distributions remove these.
|
||||
if (@is_readable($filename)) {
|
||||
readfile($filename);
|
||||
} else {
|
||||
printf(
|
||||
__(
|
||||
'The %s file is not available on this system, please visit ' .
|
||||
'%s for more information.'
|
||||
),
|
||||
$filename,
|
||||
'https://www.phpmyadmin.net/'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user