Update website

This commit is contained in:
Guilhem Lavaux 2024-11-19 08:02:04 +01:00
parent 4413528994
commit 1d90fbf296
6865 changed files with 1091082 additions and 0 deletions

View file

@ -0,0 +1,36 @@
<?php
/**
* Application OctetStream Download Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\DownloadTransformationsPlugin;
/**
* Handles the download transformation for application octetstream
*/
class Application_Octetstream_Download extends DownloadTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Application';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'OctetStream';
}
}

View file

@ -0,0 +1,36 @@
<?php
/**
* Application OctetStream Hex Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\HexTransformationsPlugin;
/**
* Handles the hex transformation for application octetstream
*/
class Application_Octetstream_Hex extends HexTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Application';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'OctetStream';
}
}

View file

@ -0,0 +1,36 @@
<?php
/**
* Image JPEG Inline Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\InlineTransformationsPlugin;
/**
* Handles the inline transformation for image jpeg
*/
class Image_JPEG_Inline extends InlineTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Image';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'JPEG';
}
}

View file

@ -0,0 +1,36 @@
<?php
/**
* Image JPEG Link Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\ImageLinkTransformationsPlugin;
/**
* Handles the link transformation for image jpeg
*/
class Image_JPEG_Link extends ImageLinkTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Image';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'JPEG';
}
}

View file

@ -0,0 +1,36 @@
<?php
/**
* Image PNG Inline Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\InlineTransformationsPlugin;
/**
* Handles the inline transformation for image png
*/
class Image_PNG_Inline extends InlineTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Image';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'PNG';
}
}

View file

@ -0,0 +1,36 @@
<?php
/**
* Blob SQL Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\SQLTransformationsPlugin;
/**
* Handles the sql transformation for blob data
*/
class Text_Octetstream_Sql extends SQLTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Octetstream';
}
}

View file

@ -0,0 +1,83 @@
<?php
/**
* Handles the binary to IPv4/IPv6 transformation for text plain
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\FieldMetadata;
use PhpMyAdmin\Plugins\TransformationsPlugin;
use PhpMyAdmin\Utils\FormatConverter;
use function __;
/**
* Handles the binary to IPv4/IPv6 transformation for text plain
*/
class Text_Plain_Binarytoip extends TransformationsPlugin
{
/**
* Gets the transformation description of the plugin
*
* @return string
*/
public static function getInfo()
{
return __(
'Converts an Internet network address stored as a binary string'
. ' into a string in Internet standard (IPv4/IPv6) format.'
);
}
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed. a binary string containing
* an IP address, as returned from MySQL's INET6_ATON
* function
* @param array $options transformation options
* @param FieldMetadata|null $meta meta information
*
* @return string IP address
*/
public function applyTransformation($buffer, array $options = [], ?FieldMetadata $meta = null)
{
$isBinary = ($meta !== null && $meta->isBinary);
return FormatConverter::binaryToIp($buffer, $isBinary);
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the transformation name of the plugin
*
* @return string
*/
public static function getName()
{
return 'Binary To IPv4/IPv6';
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,38 @@
<?php
/**
* Text Plain Bool2Text Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\Bool2TextTransformationsPlugin;
/**
* Handles the Boolean to Text transformation for text plain.
* Has one option: the output format (default 'T/F')
* or 'Y/N'
*/
class Text_Plain_Bool2Text extends Bool2TextTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,36 @@
<?php
/**
* Text Plain Date Format Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\DateFormatTransformationsPlugin;
/**
* Handles the date format transformation for text plain
*/
class Text_Plain_Dateformat extends DateFormatTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,36 @@
<?php
/**
* Text Plain External Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\ExternalTransformationsPlugin;
/**
* Handles the external transformation for text plain
*/
class Text_Plain_External extends ExternalTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,36 @@
<?php
/**
* Text Plain Formatted Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\FormattedTransformationsPlugin;
/**
* Handles the formatted transformation for text plain
*/
class Text_Plain_Formatted extends FormattedTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,36 @@
<?php
/**
* Text Plain Image Link Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\TextImageLinkTransformationsPlugin;
/**
* Handles the image link transformation for text plain
*/
class Text_Plain_Imagelink extends TextImageLinkTransformationsPlugin
{
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,94 @@
<?php
/**
* Text Plain JSON Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\FieldMetadata;
use PhpMyAdmin\Plugins\TransformationsPlugin;
use PhpMyAdmin\ResponseRenderer;
use function __;
use function htmlspecialchars;
/**
* Handles the json transformation for text plain
*/
class Text_Plain_Json extends TransformationsPlugin
{
public function __construct()
{
if (empty($GLOBALS['cfg']['CodemirrorEnable'])) {
return;
}
$response = ResponseRenderer::getInstance();
$scripts = $response->getHeader()
->getScripts();
$scripts->addFile('vendor/codemirror/lib/codemirror.js');
$scripts->addFile('vendor/codemirror/mode/javascript/javascript.js');
$scripts->addFile('vendor/codemirror/addon/runmode/runmode.js');
$scripts->addFile('transformations/json.js');
}
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public static function getInfo()
{
return __('Formats text as JSON with syntax highlighting.');
}
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param FieldMetadata|null $meta meta information
*
* @return string
*/
public function applyTransformation($buffer, array $options = [], ?FieldMetadata $meta = null)
{
return '<code class="json"><pre>' . "\n"
. htmlspecialchars($buffer) . "\n"
. '</pre></code>';
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public static function getName()
{
return 'JSON';
}
}

View file

@ -0,0 +1,52 @@
<?php
/**
* Text Plain SQL Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\Plugins\Transformations\Abs\SQLTransformationsPlugin;
use PhpMyAdmin\ResponseRenderer;
/**
* Handles the sql transformation for text plain
*/
class Text_Plain_Sql extends SQLTransformationsPlugin
{
public function __construct()
{
if (empty($GLOBALS['cfg']['CodemirrorEnable'])) {
return;
}
$response = ResponseRenderer::getInstance();
$scripts = $response->getHeader()
->getScripts();
$scripts->addFile('vendor/codemirror/lib/codemirror.js');
$scripts->addFile('vendor/codemirror/mode/sql/sql.js');
$scripts->addFile('vendor/codemirror/addon/runmode/runmode.js');
$scripts->addFile('functions.js');
}
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
}

View file

@ -0,0 +1,94 @@
<?php
/**
* Text Plain XML Transformations plugin for phpMyAdmin
*/
declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Transformations\Output;
use PhpMyAdmin\FieldMetadata;
use PhpMyAdmin\Plugins\TransformationsPlugin;
use PhpMyAdmin\ResponseRenderer;
use function __;
use function htmlspecialchars;
/**
* Handles the XML transformation for text plain
*/
class Text_Plain_Xml extends TransformationsPlugin
{
public function __construct()
{
if (empty($GLOBALS['cfg']['CodemirrorEnable'])) {
return;
}
$response = ResponseRenderer::getInstance();
$scripts = $response->getHeader()
->getScripts();
$scripts->addFile('vendor/codemirror/lib/codemirror.js');
$scripts->addFile('vendor/codemirror/mode/xml/xml.js');
$scripts->addFile('vendor/codemirror/addon/runmode/runmode.js');
$scripts->addFile('transformations/xml.js');
}
/**
* Gets the transformation description of the specific plugin
*
* @return string
*/
public static function getInfo()
{
return __('Formats text as XML with syntax highlighting.');
}
/**
* Does the actual work of each specific transformations plugin.
*
* @param string $buffer text to be transformed
* @param array $options transformation options
* @param FieldMetadata|null $meta meta information
*
* @return string
*/
public function applyTransformation($buffer, array $options = [], ?FieldMetadata $meta = null)
{
return '<code class="xml"><pre>' . "\n"
. htmlspecialchars($buffer) . "\n"
. '</pre></code>';
}
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
/**
* Gets the plugin`s MIME type
*
* @return string
*/
public static function getMIMEType()
{
return 'Text';
}
/**
* Gets the plugin`s MIME subtype
*
* @return string
*/
public static function getMIMESubtype()
{
return 'Plain';
}
/**
* Gets the transformation name of the specific plugin
*
* @return string
*/
public static function getName()
{
return 'XML';
}
}