Update website
This commit is contained in:
parent
0a686aeb9a
commit
c4ffa0f6ee
4360 changed files with 1727 additions and 718385 deletions
|
@ -1,36 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
<?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';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue