phpmyadmin/libraries/classes/Controllers/LicenseController.php
Maurício Meneghini Fauth 50bc4ab37f Remove useless PHP docs for functions
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2020-01-20 13:20:01 -03:00

40 lines
972 B
PHP

<?php
/**
* Simple script to set correct charset for the license
*
* @package PhpMyAdmin\Controllers
*/
declare(strict_types=1);
namespace PhpMyAdmin\Controllers;
/**
* Simple script to set correct charset for the license
*
* @package PhpMyAdmin\Controllers
*/
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/'
);
}
}
}