1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 17:56:52 +02:00

[ticket/16574] Remove flash BBcode

PHPBB3-16574
This commit is contained in:
Jakub Senko
2020-10-01 10:01:47 +02:00
committed by Marc Alexander
parent d714c6db19
commit 28f98402f3
56 changed files with 115 additions and 647 deletions

View File

@@ -218,7 +218,7 @@ class parser implements \phpbb\textformatter\parser_interface
{
$errors[] = array($msg, $context['max_size']);
}
else if (preg_match('/^MAX_(?:FLASH|IMG)_(HEIGHT|WIDTH)_EXCEEDED$/D', $msg, $m))
else if (preg_match('/^MAX_IMG_(HEIGHT|WIDTH)_EXCEEDED$/D', $msg, $m))
{
$errors[] = array($msg, $context['max_' . strtolower($m[1])]);
}
@@ -301,50 +301,6 @@ class parser implements \phpbb\textformatter\parser_interface
}
}
/**
* Filter a flash object's height
*
* @see bbcode_firstpass::bbcode_flash()
*
* @param string $height
* @param integer $max_height
* @param Logger $logger
* @return mixed Original value if valid, FALSE otherwise
*/
public static function filter_flash_height($height, $max_height, Logger $logger)
{
if ($max_height && $height > $max_height)
{
$logger->err('MAX_FLASH_HEIGHT_EXCEEDED', array('max_height' => $max_height));
return false;
}
return $height;
}
/**
* Filter a flash object's width
*
* @see bbcode_firstpass::bbcode_flash()
*
* @param string $width
* @param integer $max_width
* @param Logger $logger
* @return mixed Original value if valid, FALSE otherwise
*/
public static function filter_flash_width($width, $max_width, Logger $logger)
{
if ($max_width && $width > $max_width)
{
$logger->err('MAX_FLASH_WIDTH_EXCEEDED', array('max_width' => $max_width));
return false;
}
return $width;
}
/**
* Filter the value used in a [size] BBCode
*