mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/16574] Remove flash BBcode
PHPBB3-16574
This commit is contained in:
parent
d714c6db19
commit
28f98402f3
56 changed files with 115 additions and 647 deletions
|
@ -62,7 +62,7 @@
|
||||||
<label><input type="checkbox" class="radio" name="disable_magic_url"<!-- IF S_MAGIC_URL_DISABLE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DISABLE_MAGIC_URL}</label>
|
<label><input type="checkbox" class="radio" name="disable_magic_url"<!-- IF S_MAGIC_URL_DISABLE_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_DISABLE_MAGIC_URL}</label>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</dd>
|
</dd>
|
||||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
|
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
// Define the bbCode tags
|
// Define the bbCode tags
|
||||||
var bbcode = new Array();
|
var bbcode = new Array();
|
||||||
var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
|
var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
|
||||||
|
|
||||||
// ]]>
|
// ]]>
|
||||||
</script>
|
</script>
|
||||||
|
@ -32,9 +32,6 @@
|
||||||
<!-- IF S_LINKS_ALLOWED -->
|
<!-- IF S_LINKS_ALLOWED -->
|
||||||
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
|
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF S_BBCODE_FLASH -->
|
|
||||||
<input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" />
|
|
||||||
<!-- ENDIF -->
|
|
||||||
<select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
|
<select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
|
||||||
<option value="50">{L_FONT_TINY}</option>
|
<option value="50">{L_FONT_TINY}</option>
|
||||||
<option value="85">{L_FONT_SMALL}</option>
|
<option value="85">{L_FONT_SMALL}</option>
|
||||||
|
|
|
@ -91,11 +91,6 @@
|
||||||
<dd><label><input type="radio" class="radio" name="view_images" value="1"<!-- IF VIEW_IMAGES --> id="view_images" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
<dd><label><input type="radio" class="radio" name="view_images" value="1"<!-- IF VIEW_IMAGES --> id="view_images" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||||
<label><input type="radio" class="radio" name="view_images" value="0"<!-- IF not VIEW_IMAGES --> id="view_images" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
<label><input type="radio" class="radio" name="view_images" value="0"<!-- IF not VIEW_IMAGES --> id="view_images" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
|
||||||
<dt><label for="view_flash">{L_VIEW_FLASH}{L_COLON}</label></dt>
|
|
||||||
<dd><label><input type="radio" class="radio" name="view_flash" value="1"<!-- IF VIEW_FLASH --> id="view_flash" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
|
||||||
<label><input type="radio" class="radio" name="view_flash" value="0"<!-- IF not VIEW_FLASH --> id="view_flash" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
|
||||||
</dl>
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="view_smilies">{L_VIEW_SMILIES}{L_COLON}</label></dt>
|
<dt><label for="view_smilies">{L_VIEW_SMILIES}{L_COLON}</label></dt>
|
||||||
<dd><label><input type="radio" class="radio" name="view_smilies" value="1"<!-- IF VIEW_SMILIES --> id="view_smilies" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
<dd><label><input type="radio" class="radio" name="view_smilies" value="1"<!-- IF VIEW_SMILIES --> id="view_smilies" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<label><input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}</label>
|
<label><input type="checkbox" class="radio" name="disable_magic_url"{S_MAGIC_URL_CHECKED} /> {L_DISABLE_MAGIC_URL}</label>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</dd>
|
</dd>
|
||||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
|
<dd style="margin-{S_CONTENT_FLOW_BEGIN}: 90px; margin-top: 10px;"><strong>{L_OPTIONS}{L_COLON} </strong>{BBCODE_STATUS} :: {IMG_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,6 @@ $f_permissions = array(
|
||||||
'f_bbcode' => array(1, 0),
|
'f_bbcode' => array(1, 0),
|
||||||
'f_smilies' => array(1, 0),
|
'f_smilies' => array(1, 0),
|
||||||
'f_img' => array(1, 0),
|
'f_img' => array(1, 0),
|
||||||
'f_flash' => array(1, 0),
|
|
||||||
'f_sigs' => array(1, 0),
|
'f_sigs' => array(1, 0),
|
||||||
'f_search' => array(1, 0),
|
'f_search' => array(1, 0),
|
||||||
'f_email' => array(1, 0),
|
'f_email' => array(1, 0),
|
||||||
|
@ -167,7 +166,6 @@ $u_permissions = array(
|
||||||
'u_pm_forward' => array(0, 1),
|
'u_pm_forward' => array(0, 1),
|
||||||
'u_pm_delete' => array(0, 1),
|
'u_pm_delete' => array(0, 1),
|
||||||
'u_pm_img' => array(0, 1),
|
'u_pm_img' => array(0, 1),
|
||||||
'u_pm_flash' => array(0, 1),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
echo "<p><b>Determining existing permissions</b></p>\n";
|
echo "<p><b>Determining existing permissions</b></p>\n";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Only adjust bitfields, do not rewrite text...
|
* Only adjust bitfields, do not rewrite text...
|
||||||
* All new parsings have the img, flash and quote modes set to true
|
* All new parsings have the img and quote modes set to true
|
||||||
*
|
*
|
||||||
* You should make a backup from your users, posts and privmsgs table in case something goes wrong
|
* You should make a backup from your users, posts and privmsgs table in case something goes wrong
|
||||||
* Forum descriptions and rules need to be re-submitted manually.
|
* Forum descriptions and rules need to be re-submitted manually.
|
||||||
|
|
|
@ -1,170 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* This file is part of the phpBB Forum Software package.
|
|
||||||
*
|
|
||||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
|
||||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
|
||||||
*
|
|
||||||
* For full copyright and license information, please see
|
|
||||||
* the docs/CREDITS.txt file.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This script will check your database for potentially dangerous flash BBCode tags
|
|
||||||
*/
|
|
||||||
|
|
||||||
//
|
|
||||||
// Security message:
|
|
||||||
//
|
|
||||||
// This script is potentially dangerous.
|
|
||||||
// Remove or comment the next line (die(".... ) to enable this script.
|
|
||||||
// Do NOT FORGET to either remove this script or disable it after you have used it.
|
|
||||||
//
|
|
||||||
die("Please read the first lines of this script for instructions on how to enable it\n");
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
define('IN_PHPBB', true);
|
|
||||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
|
||||||
include($phpbb_root_path . 'common.' . $phpEx);
|
|
||||||
|
|
||||||
if (php_sapi_name() != 'cli')
|
|
||||||
{
|
|
||||||
header('Content-Type: text/plain');
|
|
||||||
}
|
|
||||||
|
|
||||||
check_table_flash_bbcodes(POSTS_TABLE, 'post_id', 'post_text', 'bbcode_uid', 'bbcode_bitfield');
|
|
||||||
check_table_flash_bbcodes(PRIVMSGS_TABLE, 'msg_id', 'message_text', 'bbcode_uid', 'bbcode_bitfield');
|
|
||||||
check_table_flash_bbcodes(USERS_TABLE, 'user_id', 'user_sig', 'user_sig_bbcode_uid', 'user_sig_bbcode_bitfield');
|
|
||||||
check_table_flash_bbcodes(FORUMS_TABLE, 'forum_id', 'forum_desc', 'forum_desc_uid', 'forum_desc_bitfield');
|
|
||||||
check_table_flash_bbcodes(FORUMS_TABLE, 'forum_id', 'forum_rules', 'forum_rules_uid', 'forum_rules_bitfield');
|
|
||||||
check_table_flash_bbcodes(GROUPS_TABLE, 'group_id', 'group_desc', 'group_desc_uid', 'group_desc_bitfield');
|
|
||||||
|
|
||||||
echo "If potentially dangerous flash bbcodes were found, please reparse the posts using the Support Toolkit (http://www.phpbb.com/support/stk/) and/or file a ticket in the Incident Tracker (http://www.phpbb.com/incidents/).\n";
|
|
||||||
|
|
||||||
function check_table_flash_bbcodes($table_name, $id_field, $content_field, $uid_field, $bitfield_field)
|
|
||||||
{
|
|
||||||
echo "Checking $content_field on $table_name\n";
|
|
||||||
|
|
||||||
$ids = get_table_flash_bbcode_pkids($table_name, $id_field, $content_field, $uid_field, $bitfield_field);
|
|
||||||
|
|
||||||
$size = count($ids);
|
|
||||||
if ($size)
|
|
||||||
{
|
|
||||||
echo "Found $size potentially dangerous flash bbcodes.\n";
|
|
||||||
echo "$id_field: " . implode(', ', $ids) . "\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "No potentially dangerous flash bbcodes found.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_table_flash_bbcode_pkids($table_name, $id_field, $content_field, $uid_field, $bitfield_field)
|
|
||||||
{
|
|
||||||
global $db;
|
|
||||||
|
|
||||||
$ids = array();
|
|
||||||
|
|
||||||
$sql = "SELECT $id_field, $content_field, $uid_field, $bitfield_field
|
|
||||||
FROM $table_name
|
|
||||||
WHERE $content_field LIKE '%[/flash:%'
|
|
||||||
AND $bitfield_field <> ''";
|
|
||||||
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
|
||||||
{
|
|
||||||
$uid = $row[$uid_field];
|
|
||||||
|
|
||||||
// thanks support toolkit
|
|
||||||
$content = html_entity_decode_utf8($row[$content_field]);
|
|
||||||
set_var($content, $content, 'string', true);
|
|
||||||
$content = utf8_normalize_nfc($content);
|
|
||||||
|
|
||||||
$bitfield_data = $row[$bitfield_field];
|
|
||||||
|
|
||||||
if (!is_valid_flash_bbcode($content, $uid) && has_flash_enabled($bitfield_data))
|
|
||||||
{
|
|
||||||
$ids[] = (int) $row[$id_field];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
return $ids;
|
|
||||||
}
|
|
||||||
|
|
||||||
function get_flash_regex($uid)
|
|
||||||
{
|
|
||||||
return "#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#";
|
|
||||||
}
|
|
||||||
|
|
||||||
// extract all valid flash bbcodes
|
|
||||||
// check if the bbcode content is a valid URL for each match
|
|
||||||
function is_valid_flash_bbcode($cleaned_content, $uid)
|
|
||||||
{
|
|
||||||
$regex = get_flash_regex($uid);
|
|
||||||
|
|
||||||
$url_regex = get_preg_expression('url');
|
|
||||||
$www_url_regex = get_preg_expression('www_url');
|
|
||||||
|
|
||||||
if (preg_match_all($regex, $cleaned_content, $matches))
|
|
||||||
{
|
|
||||||
foreach ($matches[3] as $flash_url)
|
|
||||||
{
|
|
||||||
if (!preg_match("#^($url_regex|$www_url_regex)$#i", $flash_url))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if a bitfield includes flash
|
|
||||||
// 11 = flash bit
|
|
||||||
function has_flash_enabled($bitfield_data)
|
|
||||||
{
|
|
||||||
$bitfield = new bitfield($bitfield_data);
|
|
||||||
return $bitfield->get(11);
|
|
||||||
}
|
|
||||||
|
|
||||||
// taken from support toolkit
|
|
||||||
function html_entity_decode_utf8($string)
|
|
||||||
{
|
|
||||||
static $trans_tbl;
|
|
||||||
|
|
||||||
// replace numeric entities
|
|
||||||
$string = preg_replace_callback('~&#x([0-9a-f]+);~i', function ($match) {
|
|
||||||
return code2utf8(hexdec($match[1]));
|
|
||||||
}, $string);
|
|
||||||
$string = preg_replace_callback('~&#([0-9]+);~', function ($match) {
|
|
||||||
return code2utf8($match[1]);
|
|
||||||
}, $string);
|
|
||||||
|
|
||||||
// replace literal entities
|
|
||||||
if (!isset($trans_tbl))
|
|
||||||
{
|
|
||||||
$trans_tbl = array();
|
|
||||||
|
|
||||||
foreach (get_html_translation_table(HTML_ENTITIES) as $val=>$key)
|
|
||||||
$trans_tbl[$key] = utf8_encode($val);
|
|
||||||
}
|
|
||||||
return strtr($string, $trans_tbl);
|
|
||||||
}
|
|
||||||
|
|
||||||
// taken from support toolkit
|
|
||||||
// Returns the utf string corresponding to the unicode value (from php.net, courtesy - romans@void.lv)
|
|
||||||
function code2utf8($num)
|
|
||||||
{
|
|
||||||
if ($num < 128) return chr($num);
|
|
||||||
if ($num < 2048) return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
|
|
||||||
if ($num < 65536) return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
|
|
||||||
if ($num < 2097152) return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
|
|
||||||
return '';
|
|
||||||
}
|
|
|
@ -195,7 +195,7 @@ class acp_bbcodes
|
||||||
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);
|
$data = $this->build_regexp($bbcode_match, $bbcode_tpl);
|
||||||
|
|
||||||
// Make sure the user didn't pick a "bad" name for the BBCode tag.
|
// Make sure the user didn't pick a "bad" name for the BBCode tag.
|
||||||
$hard_coded = array('code', 'quote', 'quote=', 'attachment', 'attachment=', 'b', 'i', 'url', 'url=', 'img', 'size', 'size=', 'color', 'color=', 'u', 'list', 'list=', 'email', 'email=', 'flash', 'flash=', 'mention');
|
$hard_coded = array('code', 'quote', 'quote=', 'attachment', 'attachment=', 'b', 'i', 'url', 'url=', 'img', 'size', 'size=', 'color', 'color=', 'u', 'list', 'list=', 'email', 'email=', 'mention');
|
||||||
|
|
||||||
if (($action == 'modify' && strtolower($data['bbcode_tag']) !== strtolower($row['bbcode_tag'])) || ($action == 'create'))
|
if (($action == 'modify' && strtolower($data['bbcode_tag']) !== strtolower($row['bbcode_tag'])) || ($action == 'create'))
|
||||||
{
|
{
|
||||||
|
|
|
@ -174,7 +174,6 @@ class acp_board
|
||||||
'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'forward_pm' => array('lang' => 'ALLOW_FORWARD_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'auth_img_pm' => array('lang' => 'ALLOW_IMG_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'auth_flash_pm' => array('lang' => 'ALLOW_FLASH_PM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
||||||
'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'enable_pm_icons' => array('lang' => 'ENABLE_PM_ICONS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
|
|
||||||
'legend3' => 'ACP_SUBMIT_CHANGES',
|
'legend3' => 'ACP_SUBMIT_CHANGES',
|
||||||
|
@ -190,7 +189,6 @@ class acp_board
|
||||||
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_topic_notify' => array('lang' => 'ALLOW_TOPIC_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_forum_notify' => array('lang' => 'ALLOW_FORUM_NOTIFY', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_bbcode' => array('lang' => 'ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_post_flash' => array('lang' => 'ALLOW_POST_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
|
||||||
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_smilies' => array('lang' => 'ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
'allow_post_links' => array('lang' => 'ALLOW_POST_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
'allowed_schemes_links' => array('lang' => 'ALLOWED_SCHEMES_LINKS', 'validate' => 'csv', 'type' => 'text:0:255', 'explain' => true),
|
'allowed_schemes_links' => array('lang' => 'ALLOWED_SCHEMES_LINKS', 'validate' => 'csv', 'type' => 'text:0:255', 'explain' => true),
|
||||||
|
@ -238,7 +236,6 @@ class acp_board
|
||||||
'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_sig' => array('lang' => 'ALLOW_SIG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_sig_bbcode' => array('lang' => 'ALLOW_SIG_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_sig_img' => array('lang' => 'ALLOW_SIG_IMG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_sig_flash' => array('lang' => 'ALLOW_SIG_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
|
||||||
'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
'allow_sig_smilies' => array('lang' => 'ALLOW_SIG_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
|
||||||
'allow_sig_links' => array('lang' => 'ALLOW_SIG_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
'allow_sig_links' => array('lang' => 'ALLOW_SIG_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||||
|
|
||||||
|
|
|
@ -122,13 +122,11 @@ class acp_contact
|
||||||
'BBCODE_STATUS' => $user->lang('BBCODE_IS_ON', '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
|
'BBCODE_STATUS' => $user->lang('BBCODE_IS_ON', '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
|
||||||
'SMILIES_STATUS' => $user->lang['SMILIES_ARE_ON'],
|
'SMILIES_STATUS' => $user->lang['SMILIES_ARE_ON'],
|
||||||
'IMG_STATUS' => $user->lang['IMAGES_ARE_ON'],
|
'IMG_STATUS' => $user->lang['IMAGES_ARE_ON'],
|
||||||
'FLASH_STATUS' => $user->lang['FLASH_IS_ON'],
|
|
||||||
'URL_STATUS' => $user->lang['URL_IS_ON'],
|
'URL_STATUS' => $user->lang['URL_IS_ON'],
|
||||||
|
|
||||||
'S_BBCODE_ALLOWED' => true,
|
'S_BBCODE_ALLOWED' => true,
|
||||||
'S_SMILIES_ALLOWED' => true,
|
'S_SMILIES_ALLOWED' => true,
|
||||||
'S_BBCODE_IMG' => true,
|
'S_BBCODE_IMG' => true,
|
||||||
'S_BBCODE_FLASH' => true,
|
|
||||||
'S_LINKS_ALLOWED' => true,
|
'S_LINKS_ALLOWED' => true,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -1609,7 +1609,6 @@ class acp_users
|
||||||
'post_st' => $request->variable('post_st', ($user_row['user_post_show_days']) ? $user_row['user_post_show_days'] : 0),
|
'post_st' => $request->variable('post_st', ($user_row['user_post_show_days']) ? $user_row['user_post_show_days'] : 0),
|
||||||
|
|
||||||
'view_images' => $request->variable('view_images', $this->optionget($user_row, 'viewimg')),
|
'view_images' => $request->variable('view_images', $this->optionget($user_row, 'viewimg')),
|
||||||
'view_flash' => $request->variable('view_flash', $this->optionget($user_row, 'viewflash')),
|
|
||||||
'view_smilies' => $request->variable('view_smilies', $this->optionget($user_row, 'viewsmilies')),
|
'view_smilies' => $request->variable('view_smilies', $this->optionget($user_row, 'viewsmilies')),
|
||||||
'view_sigs' => $request->variable('view_sigs', $this->optionget($user_row, 'viewsigs')),
|
'view_sigs' => $request->variable('view_sigs', $this->optionget($user_row, 'viewsigs')),
|
||||||
'view_avatars' => $request->variable('view_avatars', $this->optionget($user_row, 'viewavatars')),
|
'view_avatars' => $request->variable('view_avatars', $this->optionget($user_row, 'viewavatars')),
|
||||||
|
@ -1653,7 +1652,6 @@ class acp_users
|
||||||
if (!count($error))
|
if (!count($error))
|
||||||
{
|
{
|
||||||
$this->optionset($user_row, 'viewimg', $data['view_images']);
|
$this->optionset($user_row, 'viewimg', $data['view_images']);
|
||||||
$this->optionset($user_row, 'viewflash', $data['view_flash']);
|
|
||||||
$this->optionset($user_row, 'viewsmilies', $data['view_smilies']);
|
$this->optionset($user_row, 'viewsmilies', $data['view_smilies']);
|
||||||
$this->optionset($user_row, 'viewsigs', $data['view_sigs']);
|
$this->optionset($user_row, 'viewsigs', $data['view_sigs']);
|
||||||
$this->optionset($user_row, 'viewavatars', $data['view_avatars']);
|
$this->optionset($user_row, 'viewavatars', $data['view_avatars']);
|
||||||
|
@ -1815,7 +1813,6 @@ class acp_users
|
||||||
'ATTACH_SIG' => $data['sig'],
|
'ATTACH_SIG' => $data['sig'],
|
||||||
'NOTIFY' => $data['notify'],
|
'NOTIFY' => $data['notify'],
|
||||||
'VIEW_IMAGES' => $data['view_images'],
|
'VIEW_IMAGES' => $data['view_images'],
|
||||||
'VIEW_FLASH' => $data['view_flash'],
|
|
||||||
'VIEW_SMILIES' => $data['view_smilies'],
|
'VIEW_SMILIES' => $data['view_smilies'],
|
||||||
'VIEW_SIGS' => $data['view_sigs'],
|
'VIEW_SIGS' => $data['view_sigs'],
|
||||||
'VIEW_AVATARS' => $data['view_avatars'],
|
'VIEW_AVATARS' => $data['view_avatars'],
|
||||||
|
@ -2073,7 +2070,6 @@ class acp_users
|
||||||
$enable_urls,
|
$enable_urls,
|
||||||
$enable_smilies,
|
$enable_smilies,
|
||||||
$config['allow_sig_img'],
|
$config['allow_sig_img'],
|
||||||
$config['allow_sig_flash'],
|
|
||||||
true,
|
true,
|
||||||
$config['allow_sig_links'],
|
$config['allow_sig_links'],
|
||||||
'sig'
|
'sig'
|
||||||
|
@ -2145,7 +2141,6 @@ class acp_users
|
||||||
'BBCODE_STATUS' => $user->lang(($config['allow_sig_bbcode'] ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
|
'BBCODE_STATUS' => $user->lang(($config['allow_sig_bbcode'] ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
|
||||||
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
||||||
'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
||||||
'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
|
|
||||||
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
|
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
|
||||||
|
|
||||||
'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']),
|
'L_SIGNATURE_EXPLAIN' => $user->lang('SIGNATURE_EXPLAIN', (int) $config['max_sig_chars']),
|
||||||
|
@ -2153,7 +2148,6 @@ class acp_users
|
||||||
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
|
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
|
||||||
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
|
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
|
||||||
'S_BBCODE_IMG' => ($config['allow_sig_img']) ? true : false,
|
'S_BBCODE_IMG' => ($config['allow_sig_img']) ? true : false,
|
||||||
'S_BBCODE_FLASH' => ($config['allow_sig_flash']) ? true : false,
|
|
||||||
'S_LINKS_ALLOWED' => ($config['allow_sig_links']) ? true : false)
|
'S_LINKS_ALLOWED' => ($config['allow_sig_links']) ? true : false)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -353,25 +353,6 @@ class bbcode
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BBCODE_ID_FLASH:
|
|
||||||
if ($user->optionget('viewflash'))
|
|
||||||
{
|
|
||||||
$this->bbcode_cache[$bbcode_id] = array(
|
|
||||||
'preg' => array(
|
|
||||||
'#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#' => $this->bbcode_tpl('flash', $bbcode_id),
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$this->bbcode_cache[$bbcode_id] = array(
|
|
||||||
'preg' => array(
|
|
||||||
'#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#' => str_replace('$1', '$3', str_replace('$2', '[ flash ]', $this->bbcode_tpl('url', $bbcode_id, true)))
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case BBCODE_ID_ATTACH:
|
case BBCODE_ID_ATTACH:
|
||||||
$this->bbcode_cache[$bbcode_id] = array(
|
$this->bbcode_cache[$bbcode_id] = array(
|
||||||
'str' => array(
|
'str' => array(
|
||||||
|
@ -539,7 +520,6 @@ class bbcode
|
||||||
'color' => array('{COLOR}' => '$1', '{TEXT}' => '$2'),
|
'color' => array('{COLOR}' => '$1', '{TEXT}' => '$2'),
|
||||||
'size' => array('{SIZE}' => '$1', '{TEXT}' => '$2'),
|
'size' => array('{SIZE}' => '$1', '{TEXT}' => '$2'),
|
||||||
'img' => array('{URL}' => '$1'),
|
'img' => array('{URL}' => '$1'),
|
||||||
'flash' => array('{WIDTH}' => '$1', '{HEIGHT}' => '$2', '{URL}' => '$3'),
|
|
||||||
'url' => array('{URL}' => '$1', '{DESCRIPTION}' => '$2'),
|
'url' => array('{URL}' => '$1', '{DESCRIPTION}' => '$2'),
|
||||||
'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2')
|
'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2')
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,7 +24,6 @@ if (!defined('IN_PHPBB'))
|
||||||
define('ATTACHMENT_CATEGORY_WM', 2); // Windows Media Files - Streaming - @deprecated 3.2
|
define('ATTACHMENT_CATEGORY_WM', 2); // Windows Media Files - Streaming - @deprecated 3.2
|
||||||
define('ATTACHMENT_CATEGORY_RM', 3); // Real Media Files - Streaming - @deprecated 3.2
|
define('ATTACHMENT_CATEGORY_RM', 3); // Real Media Files - Streaming - @deprecated 3.2
|
||||||
define('ATTACHMENT_CATEGORY_QUICKTIME', 6); // Quicktime/Mov files - @deprecated 3.2
|
define('ATTACHMENT_CATEGORY_QUICKTIME', 6); // Quicktime/Mov files - @deprecated 3.2
|
||||||
define('ATTACHMENT_CATEGORY_FLASH', 5); // Flash/SWF files - @deprecated 3.3
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets compatibility globals in the global scope
|
* Sets compatibility globals in the global scope
|
||||||
|
|
|
@ -182,7 +182,6 @@ define('BBCODE_ID_U', 7);
|
||||||
define('BBCODE_ID_CODE', 8);
|
define('BBCODE_ID_CODE', 8);
|
||||||
define('BBCODE_ID_LIST', 9);
|
define('BBCODE_ID_LIST', 9);
|
||||||
define('BBCODE_ID_EMAIL', 10);
|
define('BBCODE_ID_EMAIL', 10);
|
||||||
define('BBCODE_ID_FLASH', 11);
|
|
||||||
define('BBCODE_ID_ATTACH', 12);
|
define('BBCODE_ID_ATTACH', 12);
|
||||||
|
|
||||||
// BBCode hard limit
|
// BBCode hard limit
|
||||||
|
|
|
@ -666,14 +666,13 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text
|
||||||
* @param bool $allow_urls If urls is allowed
|
* @param bool $allow_urls If urls is allowed
|
||||||
* @param bool $allow_smilies If smilies are allowed
|
* @param bool $allow_smilies If smilies are allowed
|
||||||
* @param bool $allow_img_bbcode
|
* @param bool $allow_img_bbcode
|
||||||
* @param bool $allow_flash_bbcode
|
|
||||||
* @param bool $allow_quote_bbcode
|
* @param bool $allow_quote_bbcode
|
||||||
* @param bool $allow_url_bbcode
|
* @param bool $allow_url_bbcode
|
||||||
* @param string $mode Mode to parse text as, e.g. post or sig
|
* @param string $mode Mode to parse text as, e.g. post or sig
|
||||||
*
|
*
|
||||||
* @return array An array of string with the errors that occurred while parsing
|
* @return array An array of string with the errors that occurred while parsing
|
||||||
*/
|
*/
|
||||||
function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $mode = 'post')
|
function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false, $allow_img_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $mode = 'post')
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
global $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
||||||
|
|
||||||
|
@ -689,12 +688,12 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
|
||||||
* @var bool allow_urls Whether or not to parse URLs
|
* @var bool allow_urls Whether or not to parse URLs
|
||||||
* @var bool allow_smilies Whether or not to parse Smilies
|
* @var bool allow_smilies Whether or not to parse Smilies
|
||||||
* @var bool allow_img_bbcode Whether or not to parse the [img] BBCode
|
* @var bool allow_img_bbcode Whether or not to parse the [img] BBCode
|
||||||
* @var bool allow_flash_bbcode Whether or not to parse the [flash] BBCode
|
|
||||||
* @var bool allow_quote_bbcode Whether or not to parse the [quote] BBCode
|
* @var bool allow_quote_bbcode Whether or not to parse the [quote] BBCode
|
||||||
* @var bool allow_url_bbcode Whether or not to parse the [url] BBCode
|
* @var bool allow_url_bbcode Whether or not to parse the [url] BBCode
|
||||||
* @var string mode Mode to parse text as, e.g. post or sig
|
* @var string mode Mode to parse text as, e.g. post or sig
|
||||||
* @since 3.1.0-a1
|
* @since 3.1.0-a1
|
||||||
* @changed 3.2.0-a1 Added mode
|
* @changed 3.2.0-a1 Added mode
|
||||||
|
* @changed 4.0.0-a1 Removed allow_flash_bbcode
|
||||||
*/
|
*/
|
||||||
$vars = array(
|
$vars = array(
|
||||||
'text',
|
'text',
|
||||||
|
@ -705,7 +704,6 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
|
||||||
'allow_urls',
|
'allow_urls',
|
||||||
'allow_smilies',
|
'allow_smilies',
|
||||||
'allow_img_bbcode',
|
'allow_img_bbcode',
|
||||||
'allow_flash_bbcode',
|
|
||||||
'allow_quote_bbcode',
|
'allow_quote_bbcode',
|
||||||
'allow_url_bbcode',
|
'allow_url_bbcode',
|
||||||
'mode',
|
'mode',
|
||||||
|
@ -721,7 +719,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb
|
||||||
}
|
}
|
||||||
|
|
||||||
$message_parser = new parse_message($text);
|
$message_parser = new parse_message($text);
|
||||||
$message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_flash_bbcode, $allow_quote_bbcode, $allow_url_bbcode, true, $mode);
|
$message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_quote_bbcode, $allow_url_bbcode, true, $mode);
|
||||||
|
|
||||||
$text = $message_parser->message;
|
$text = $message_parser->message;
|
||||||
$uid = $message_parser->bbcode_uid;
|
$uid = $message_parser->bbcode_uid;
|
||||||
|
|
|
@ -887,7 +887,6 @@ function set_user_options()
|
||||||
// Key need to be set in row, else default value is chosen
|
// Key need to be set in row, else default value is chosen
|
||||||
$keyoptions = array(
|
$keyoptions = array(
|
||||||
'viewimg' => array('bit' => 0, 'default' => 1),
|
'viewimg' => array('bit' => 0, 'default' => 1),
|
||||||
'viewflash' => array('bit' => 1, 'default' => 1),
|
|
||||||
'viewsmilies' => array('bit' => 2, 'default' => 1),
|
'viewsmilies' => array('bit' => 2, 'default' => 1),
|
||||||
'viewsigs' => array('bit' => 3, 'default' => 1),
|
'viewsigs' => array('bit' => 3, 'default' => 1),
|
||||||
'viewavatars' => array('bit' => 4, 'default' => 1),
|
'viewavatars' => array('bit' => 4, 'default' => 1),
|
||||||
|
|
|
@ -560,7 +560,7 @@ function add_warning($user_row, $warning, $send_pm = true, $post_id = 0)
|
||||||
$message_parser = new parse_message();
|
$message_parser = new parse_message();
|
||||||
|
|
||||||
$message_parser->message = $warn_pm_body;
|
$message_parser->message = $warn_pm_body;
|
||||||
$message_parser->parse(true, true, true, false, false, true, true);
|
$message_parser->parse(true, true, true, false, true, true);
|
||||||
|
|
||||||
$pm_data = array(
|
$pm_data = array(
|
||||||
'from_user_id' => $user->data['user_id'],
|
'from_user_id' => $user->data['user_id'],
|
||||||
|
|
|
@ -202,11 +202,6 @@ class bbcode_firstpass extends bbcode
|
||||||
return $bbcode_class->validate_email($match[1], $match[2]);
|
return $bbcode_class->validate_email($match[1], $match[2]);
|
||||||
}
|
}
|
||||||
)),
|
)),
|
||||||
'flash' => array('bbcode_id' => BBCODE_ID_FLASH, 'regexp' => array('#\[flash=([0-9]+),([0-9]+)\](.*?)\[/flash\]#ui' => function ($match) use($bbcode_class)
|
|
||||||
{
|
|
||||||
return $bbcode_class->bbcode_flash($match[1], $match[2], $match[3]);
|
|
||||||
}
|
|
||||||
))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Zero the parsed items array
|
// Zero the parsed items array
|
||||||
|
@ -410,60 +405,6 @@ class bbcode_firstpass extends bbcode
|
||||||
return '[img:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($in) . '[/img:' . $this->bbcode_uid . ']';
|
return '[img:' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($in) . '[/img:' . $this->bbcode_uid . ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Parse flash tag
|
|
||||||
*/
|
|
||||||
function bbcode_flash($width, $height, $in)
|
|
||||||
{
|
|
||||||
global $user, $config;
|
|
||||||
|
|
||||||
if (!$this->check_bbcode('flash', $in))
|
|
||||||
{
|
|
||||||
return $in;
|
|
||||||
}
|
|
||||||
|
|
||||||
$in = trim($in);
|
|
||||||
$error = false;
|
|
||||||
|
|
||||||
// Do not allow 0-sizes generally being entered
|
|
||||||
if ($width <= 0 || $height <= 0)
|
|
||||||
{
|
|
||||||
return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]';
|
|
||||||
}
|
|
||||||
|
|
||||||
$in = str_replace(' ', '%20', $in);
|
|
||||||
|
|
||||||
// Make sure $in is a URL.
|
|
||||||
if (!preg_match('#^' . get_preg_expression('url') . '$#iu', $in) &&
|
|
||||||
!preg_match('#^' . get_preg_expression('www_url') . '$#iu', $in))
|
|
||||||
{
|
|
||||||
return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Apply the same size checks on flash files as on images
|
|
||||||
if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width'])
|
|
||||||
{
|
|
||||||
if ($config['max_' . $this->mode . '_img_height'] && $config['max_' . $this->mode . '_img_height'] < $height)
|
|
||||||
{
|
|
||||||
$error = true;
|
|
||||||
$this->warn_msg[] = $user->lang('MAX_FLASH_HEIGHT_EXCEEDED', (int) $config['max_' . $this->mode . '_img_height']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($config['max_' . $this->mode . '_img_width'] && $config['max_' . $this->mode . '_img_width'] < $width)
|
|
||||||
{
|
|
||||||
$error = true;
|
|
||||||
$this->warn_msg[] = $user->lang('MAX_FLASH_WIDTH_EXCEEDED', (int) $config['max_' . $this->mode . '_img_width']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($error || $this->path_in_domain($in))
|
|
||||||
{
|
|
||||||
return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]';
|
|
||||||
}
|
|
||||||
|
|
||||||
return '[flash=' . $width . ',' . $height . ':' . $this->bbcode_uid . ']' . $this->bbcode_specialchars($in) . '[/flash:' . $this->bbcode_uid . ']';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse inline attachments [ia]
|
* Parse inline attachments [ia]
|
||||||
*/
|
*/
|
||||||
|
@ -1100,7 +1041,6 @@ class parse_message extends bbcode_firstpass
|
||||||
var $message_status = '';
|
var $message_status = '';
|
||||||
|
|
||||||
var $allow_img_bbcode = true;
|
var $allow_img_bbcode = true;
|
||||||
var $allow_flash_bbcode = true;
|
|
||||||
var $allow_quote_bbcode = true;
|
var $allow_quote_bbcode = true;
|
||||||
var $allow_url_bbcode = true;
|
var $allow_url_bbcode = true;
|
||||||
|
|
||||||
|
@ -1123,7 +1063,7 @@ class parse_message extends bbcode_firstpass
|
||||||
/**
|
/**
|
||||||
* Parse Message
|
* Parse Message
|
||||||
*/
|
*/
|
||||||
function parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
|
function parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
|
||||||
{
|
{
|
||||||
global $config, $user, $phpbb_dispatcher, $phpbb_container;
|
global $config, $user, $phpbb_dispatcher, $phpbb_container;
|
||||||
|
|
||||||
|
@ -1138,7 +1078,6 @@ class parse_message extends bbcode_firstpass
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->allow_img_bbcode = $allow_img_bbcode;
|
$this->allow_img_bbcode = $allow_img_bbcode;
|
||||||
$this->allow_flash_bbcode = $allow_flash_bbcode;
|
|
||||||
$this->allow_quote_bbcode = $allow_quote_bbcode;
|
$this->allow_quote_bbcode = $allow_quote_bbcode;
|
||||||
$this->allow_url_bbcode = $allow_url_bbcode;
|
$this->allow_url_bbcode = $allow_url_bbcode;
|
||||||
|
|
||||||
|
@ -1182,7 +1121,6 @@ class parse_message extends bbcode_firstpass
|
||||||
* @var bool allow_magic_url Do we allow magic urls
|
* @var bool allow_magic_url Do we allow magic urls
|
||||||
* @var bool allow_smilies Do we allow smilies
|
* @var bool allow_smilies Do we allow smilies
|
||||||
* @var bool allow_img_bbcode Do we allow image BBCode
|
* @var bool allow_img_bbcode Do we allow image BBCode
|
||||||
* @var bool allow_flash_bbcode Do we allow flash BBCode
|
|
||||||
* @var bool allow_quote_bbcode Do we allow quote BBCode
|
* @var bool allow_quote_bbcode Do we allow quote BBCode
|
||||||
* @var bool allow_url_bbcode Do we allow url BBCode
|
* @var bool allow_url_bbcode Do we allow url BBCode
|
||||||
* @var bool update_this_message Do we alter the parsed message
|
* @var bool update_this_message Do we alter the parsed message
|
||||||
|
@ -1194,6 +1132,7 @@ class parse_message extends bbcode_firstpass
|
||||||
* @var array warn_msg Array of the warning messages
|
* @var array warn_msg Array of the warning messages
|
||||||
* @since 3.1.2-RC1
|
* @since 3.1.2-RC1
|
||||||
* @changed 3.1.3-RC1 Added vars $bbcode_bitfield and $bbcode_uid
|
* @changed 3.1.3-RC1 Added vars $bbcode_bitfield and $bbcode_uid
|
||||||
|
* @changed 4.0.0-a1 Removed $allow_flash_bbcode
|
||||||
*/
|
*/
|
||||||
$message = $this->message;
|
$message = $this->message;
|
||||||
$warn_msg = $this->warn_msg;
|
$warn_msg = $this->warn_msg;
|
||||||
|
@ -1205,7 +1144,6 @@ class parse_message extends bbcode_firstpass
|
||||||
'allow_magic_url',
|
'allow_magic_url',
|
||||||
'allow_smilies',
|
'allow_smilies',
|
||||||
'allow_img_bbcode',
|
'allow_img_bbcode',
|
||||||
'allow_flash_bbcode',
|
|
||||||
'allow_quote_bbcode',
|
'allow_quote_bbcode',
|
||||||
'allow_url_bbcode',
|
'allow_url_bbcode',
|
||||||
'update_this_message',
|
'update_this_message',
|
||||||
|
@ -1234,7 +1172,6 @@ class parse_message extends bbcode_firstpass
|
||||||
($allow_magic_url) ? $parser->enable_magic_url() : $parser->disable_magic_url();
|
($allow_magic_url) ? $parser->enable_magic_url() : $parser->disable_magic_url();
|
||||||
($allow_smilies) ? $parser->enable_smilies() : $parser->disable_smilies();
|
($allow_smilies) ? $parser->enable_smilies() : $parser->disable_smilies();
|
||||||
($allow_img_bbcode) ? $parser->enable_bbcode('img') : $parser->disable_bbcode('img');
|
($allow_img_bbcode) ? $parser->enable_bbcode('img') : $parser->disable_bbcode('img');
|
||||||
($allow_flash_bbcode) ? $parser->enable_bbcode('flash') : $parser->disable_bbcode('flash');
|
|
||||||
($allow_quote_bbcode) ? $parser->enable_bbcode('quote') : $parser->disable_bbcode('quote');
|
($allow_quote_bbcode) ? $parser->enable_bbcode('quote') : $parser->disable_bbcode('quote');
|
||||||
($allow_url_bbcode) ? $parser->enable_bbcode('url') : $parser->disable_bbcode('url');
|
($allow_url_bbcode) ? $parser->enable_bbcode('url') : $parser->disable_bbcode('url');
|
||||||
|
|
||||||
|
@ -1343,7 +1280,7 @@ class parse_message extends bbcode_firstpass
|
||||||
if (!preg_match('/^<[rt][ >]/', $this->message))
|
if (!preg_match('/^<[rt][ >]/', $this->message))
|
||||||
{
|
{
|
||||||
// Force updating message - of course.
|
// Force updating message - of course.
|
||||||
$this->parse($allow_bbcode, $allow_magic_url, $allow_smilies, $this->allow_img_bbcode, $this->allow_flash_bbcode, $this->allow_quote_bbcode, $this->allow_url_bbcode, true);
|
$this->parse($allow_bbcode, $allow_magic_url, $allow_smilies, $this->allow_img_bbcode, $this->allow_quote_bbcode, $this->allow_url_bbcode, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// There's a bug when previewing a topic with no poll, because the empty title of the poll
|
// There's a bug when previewing a topic with no poll, because the empty title of the poll
|
||||||
|
@ -1919,7 +1856,7 @@ class parse_message extends bbcode_firstpass
|
||||||
foreach ($poll['poll_options'] as &$poll_option)
|
foreach ($poll['poll_options'] as &$poll_option)
|
||||||
{
|
{
|
||||||
$this->message = $poll_option;
|
$this->message = $poll_option;
|
||||||
$poll_option = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, false, $config['allow_post_links'], false, 'poll');
|
$poll_option = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, $config['allow_post_links'], false, 'poll');
|
||||||
}
|
}
|
||||||
unset($poll_option);
|
unset($poll_option);
|
||||||
$poll['poll_option_text'] = implode("\n", $poll['poll_options']);
|
$poll['poll_option_text'] = implode("\n", $poll['poll_options']);
|
||||||
|
@ -1936,7 +1873,7 @@ class parse_message extends bbcode_firstpass
|
||||||
{
|
{
|
||||||
$this->warn_msg[] = $user->lang['POLL_TITLE_TOO_LONG'];
|
$this->warn_msg[] = $user->lang['POLL_TITLE_TOO_LONG'];
|
||||||
}
|
}
|
||||||
$poll['poll_title'] = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, false, $config['allow_post_links'], false, 'poll');
|
$poll['poll_title'] = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, $config['allow_post_links'], false, 'poll');
|
||||||
if (strlen($poll['poll_title']) > 255)
|
if (strlen($poll['poll_title']) > 255)
|
||||||
{
|
{
|
||||||
$this->warn_msg[] = $user->lang['POLL_TITLE_COMP_TOO_LONG'];
|
$this->warn_msg[] = $user->lang['POLL_TITLE_COMP_TOO_LONG'];
|
||||||
|
|
|
@ -279,13 +279,11 @@ class phpbb_questionnaire_phpbb_data_provider
|
||||||
'allow_nocensors' => true,
|
'allow_nocensors' => true,
|
||||||
'allow_pm_attach' => true,
|
'allow_pm_attach' => true,
|
||||||
'allow_pm_report' => true,
|
'allow_pm_report' => true,
|
||||||
'allow_post_flash' => true,
|
|
||||||
'allow_post_links' => true,
|
'allow_post_links' => true,
|
||||||
'allow_privmsg' => true,
|
'allow_privmsg' => true,
|
||||||
'allow_quick_reply' => true,
|
'allow_quick_reply' => true,
|
||||||
'allow_sig' => true,
|
'allow_sig' => true,
|
||||||
'allow_sig_bbcode' => true,
|
'allow_sig_bbcode' => true,
|
||||||
'allow_sig_flash' => true,
|
|
||||||
'allow_sig_img' => true,
|
'allow_sig_img' => true,
|
||||||
'allow_sig_links' => true,
|
'allow_sig_links' => true,
|
||||||
'allow_sig_pm' => true,
|
'allow_sig_pm' => true,
|
||||||
|
@ -294,7 +292,6 @@ class phpbb_questionnaire_phpbb_data_provider
|
||||||
'allow_topic_notify' => true,
|
'allow_topic_notify' => true,
|
||||||
'attachment_quota' => true,
|
'attachment_quota' => true,
|
||||||
'auth_bbcode_pm' => true,
|
'auth_bbcode_pm' => true,
|
||||||
'auth_flash_pm' => true,
|
|
||||||
'auth_img_pm' => true,
|
'auth_img_pm' => true,
|
||||||
'auth_method' => true,
|
'auth_method' => true,
|
||||||
'auth_smilies_pm' => true,
|
'auth_smilies_pm' => true,
|
||||||
|
|
|
@ -587,10 +587,9 @@ class ucp_main
|
||||||
$bbcode_status = $auth->acl_get('u_pm_bbcode') || $auth->acl_getf_global('f_bbcode');
|
$bbcode_status = $auth->acl_get('u_pm_bbcode') || $auth->acl_getf_global('f_bbcode');
|
||||||
$smilies_status = $auth->acl_get('u_pm_smilies') || $auth->acl_getf_global('f_smilies');
|
$smilies_status = $auth->acl_get('u_pm_smilies') || $auth->acl_getf_global('f_smilies');
|
||||||
$img_status = $auth->acl_get('u_pm_img') || $auth->acl_getf_global('f_img');
|
$img_status = $auth->acl_get('u_pm_img') || $auth->acl_getf_global('f_img');
|
||||||
$flash_status = $auth->acl_get('u_pm_flash') || $auth->acl_getf_global('f_flash');
|
|
||||||
|
|
||||||
$message_parser->message = $draft_message;
|
$message_parser->message = $draft_message;
|
||||||
$message_parser->parse($bbcode_status, $config['allow_post_links'], $smilies_status, $img_status, $flash_status, true, $config['allow_post_links']);
|
$message_parser->parse($bbcode_status, $config['allow_post_links'], $smilies_status, $img_status, true, $config['allow_post_links']);
|
||||||
|
|
||||||
$draft_row = array(
|
$draft_row = array(
|
||||||
'draft_subject' => $draft_subject,
|
'draft_subject' => $draft_subject,
|
||||||
|
|
|
@ -684,7 +684,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||||
$bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode')) ? true : false;
|
$bbcode_status = ($config['allow_bbcode'] && $config['auth_bbcode_pm'] && $auth->acl_get('u_pm_bbcode')) ? true : false;
|
||||||
$smilies_status = ($config['allow_smilies'] && $config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies')) ? true : false;
|
$smilies_status = ($config['allow_smilies'] && $config['auth_smilies_pm'] && $auth->acl_get('u_pm_smilies')) ? true : false;
|
||||||
$img_status = ($config['auth_img_pm'] && $auth->acl_get('u_pm_img')) ? true : false;
|
$img_status = ($config['auth_img_pm'] && $auth->acl_get('u_pm_img')) ? true : false;
|
||||||
$flash_status = ($config['auth_flash_pm'] && $auth->acl_get('u_pm_flash')) ? true : false;
|
|
||||||
$url_status = ($config['allow_post_links']) ? true : false;
|
$url_status = ($config['allow_post_links']) ? true : false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -726,7 +725,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
$message_parser->message = $message;
|
$message_parser->message = $message;
|
||||||
$message_parser->parse($bbcode_status, $url_status, $smilies_status, $img_status, $flash_status, true, $url_status);
|
$message_parser->parse($bbcode_status, $url_status, $smilies_status, $img_status, true, $url_status);
|
||||||
|
|
||||||
$sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
$sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||||
'user_id' => $user->data['user_id'],
|
'user_id' => $user->data['user_id'],
|
||||||
|
@ -872,7 +871,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse message
|
// Parse message
|
||||||
$message_parser->parse($enable_bbcode, ($config['allow_post_links']) ? $enable_urls : false, $enable_smilies, $img_status, $flash_status, true, $config['allow_post_links']);
|
$message_parser->parse($enable_bbcode, ($config['allow_post_links']) ? $enable_urls : false, $enable_smilies, $img_status, true, $config['allow_post_links']);
|
||||||
|
|
||||||
// On a refresh we do not care about message parsing errors
|
// On a refresh we do not care about message parsing errors
|
||||||
if (count($message_parser->warn_msg) && !$refresh)
|
if (count($message_parser->warn_msg) && !$refresh)
|
||||||
|
@ -1327,7 +1326,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||||
'MESSAGE' => $message_text,
|
'MESSAGE' => $message_text,
|
||||||
'BBCODE_STATUS' => $user->lang(($bbcode_status ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
|
'BBCODE_STATUS' => $user->lang(($bbcode_status ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
|
||||||
'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
||||||
'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
|
|
||||||
'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
||||||
'URL_STATUS' => ($url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
|
'URL_STATUS' => ($url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
|
||||||
'MAX_FONT_SIZE' => (int) $config['max_post_font_size'],
|
'MAX_FONT_SIZE' => (int) $config['max_post_font_size'],
|
||||||
|
@ -1352,7 +1350,6 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||||
'S_ATTACH_DATA' => json_encode($message_parser->attachment_data),
|
'S_ATTACH_DATA' => json_encode($message_parser->attachment_data),
|
||||||
|
|
||||||
'S_BBCODE_IMG' => $img_status,
|
'S_BBCODE_IMG' => $img_status,
|
||||||
'S_BBCODE_FLASH' => $flash_status,
|
|
||||||
'S_BBCODE_QUOTE' => true,
|
'S_BBCODE_QUOTE' => true,
|
||||||
'S_BBCODE_URL' => $url_status,
|
'S_BBCODE_URL' => $url_status,
|
||||||
|
|
||||||
|
|
|
@ -230,7 +230,6 @@ class ucp_prefs
|
||||||
'post_st' => $request->variable('post_st', (!empty($user->data['user_post_show_days'])) ? (int) $user->data['user_post_show_days'] : 0),
|
'post_st' => $request->variable('post_st', (!empty($user->data['user_post_show_days'])) ? (int) $user->data['user_post_show_days'] : 0),
|
||||||
|
|
||||||
'images' => $request->variable('images', (bool) $user->optionget('viewimg')),
|
'images' => $request->variable('images', (bool) $user->optionget('viewimg')),
|
||||||
'flash' => $request->variable('flash', (bool) $user->optionget('viewflash')),
|
|
||||||
'smilies' => $request->variable('smilies', (bool) $user->optionget('viewsmilies')),
|
'smilies' => $request->variable('smilies', (bool) $user->optionget('viewsmilies')),
|
||||||
'sigs' => $request->variable('sigs', (bool) $user->optionget('viewsigs')),
|
'sigs' => $request->variable('sigs', (bool) $user->optionget('viewsigs')),
|
||||||
'avatars' => $request->variable('avatars', (bool) $user->optionget('viewavatars')),
|
'avatars' => $request->variable('avatars', (bool) $user->optionget('viewavatars')),
|
||||||
|
@ -280,7 +279,6 @@ class ucp_prefs
|
||||||
if (!count($error))
|
if (!count($error))
|
||||||
{
|
{
|
||||||
$user->optionset('viewimg', $data['images']);
|
$user->optionset('viewimg', $data['images']);
|
||||||
$user->optionset('viewflash', $data['flash']);
|
|
||||||
$user->optionset('viewsmilies', $data['smilies']);
|
$user->optionset('viewsmilies', $data['smilies']);
|
||||||
$user->optionset('viewsigs', $data['sigs']);
|
$user->optionset('viewsigs', $data['sigs']);
|
||||||
$user->optionset('viewavatars', $data['avatars']);
|
$user->optionset('viewavatars', $data['avatars']);
|
||||||
|
@ -415,7 +413,6 @@ class ucp_prefs
|
||||||
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
|
'ERROR' => (count($error)) ? implode('<br />', $error) : '',
|
||||||
|
|
||||||
'S_IMAGES' => $data['images'],
|
'S_IMAGES' => $data['images'],
|
||||||
'S_FLASH' => $data['flash'],
|
|
||||||
'S_SMILIES' => $data['smilies'],
|
'S_SMILIES' => $data['smilies'],
|
||||||
'S_SIGS' => $data['sigs'],
|
'S_SIGS' => $data['sigs'],
|
||||||
'S_AVATARS' => $data['avatars'],
|
'S_AVATARS' => $data['avatars'],
|
||||||
|
|
|
@ -538,7 +538,6 @@ class ucp_profile
|
||||||
$enable_urls,
|
$enable_urls,
|
||||||
$enable_smilies,
|
$enable_smilies,
|
||||||
$config['allow_sig_img'],
|
$config['allow_sig_img'],
|
||||||
$config['allow_sig_flash'],
|
|
||||||
true,
|
true,
|
||||||
$config['allow_sig_links'],
|
$config['allow_sig_links'],
|
||||||
'sig'
|
'sig'
|
||||||
|
@ -612,7 +611,6 @@ class ucp_profile
|
||||||
'BBCODE_STATUS' => $user->lang(($config['allow_sig_bbcode'] ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
|
'BBCODE_STATUS' => $user->lang(($config['allow_sig_bbcode'] ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
|
||||||
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
||||||
'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
||||||
'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
|
|
||||||
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
|
'URL_STATUS' => ($config['allow_sig_links']) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
|
||||||
'MAX_FONT_SIZE' => (int) $config['max_sig_font_size'],
|
'MAX_FONT_SIZE' => (int) $config['max_sig_font_size'],
|
||||||
|
|
||||||
|
@ -621,7 +619,6 @@ class ucp_profile
|
||||||
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
|
'S_BBCODE_ALLOWED' => $config['allow_sig_bbcode'],
|
||||||
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
|
'S_SMILIES_ALLOWED' => $config['allow_sig_smilies'],
|
||||||
'S_BBCODE_IMG' => ($config['allow_sig_img']) ? true : false,
|
'S_BBCODE_IMG' => ($config['allow_sig_img']) ? true : false,
|
||||||
'S_BBCODE_FLASH' => ($config['allow_sig_flash']) ? true : false,
|
|
||||||
'S_LINKS_ALLOWED' => ($config['allow_sig_links']) ? true : false)
|
'S_LINKS_ALLOWED' => ($config['allow_sig_links']) ? true : false)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1264,7 +1264,7 @@ function phpbb_prepare_message($message)
|
||||||
$enable_smilies = (!isset($convert->row['enable_smilies'])) ? true : $convert->row['enable_smilies'];
|
$enable_smilies = (!isset($convert->row['enable_smilies'])) ? true : $convert->row['enable_smilies'];
|
||||||
$enable_magic_url = (!isset($convert->row['enable_magic_url'])) ? true : $convert->row['enable_magic_url'];
|
$enable_magic_url = (!isset($convert->row['enable_magic_url'])) ? true : $convert->row['enable_magic_url'];
|
||||||
|
|
||||||
// parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
|
// parse($allow_bbcode, $allow_magic_url, $allow_smilies, $allow_img_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $update_this_message = true, $mode = 'post')
|
||||||
$message_parser->parse($enable_bbcode, $enable_magic_url, $enable_smilies);
|
$message_parser->parse($enable_bbcode, $enable_magic_url, $enable_smilies);
|
||||||
|
|
||||||
if (count($message_parser->warn_msg))
|
if (count($message_parser->warn_msg))
|
||||||
|
|
|
@ -28,13 +28,11 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_nocensors',
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_password_reset', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_password_reset', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_pm_attach', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_pm_attach', '0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_pm_report', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_pm_report', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_post_flash', '1');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_post_links', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_post_links', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_privmsg', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_privmsg', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_quick_reply', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_quick_reply', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_bbcode', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_bbcode', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_flash', '0');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_img', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_img', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_links', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_links', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig_pm', '1');
|
||||||
|
@ -45,7 +43,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('allowed_schemes_li
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('assets_version', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('assets_version', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('attachment_quota', '52428800');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('attachment_quota', '52428800');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_bbcode_pm', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_flash_pm', '0');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_img_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_img_pm', '1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_method', 'db');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_method', 'db');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_smilies_pm', '1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_smilies_pm', '1');
|
||||||
|
@ -377,7 +374,6 @@ INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_delete', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_download', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_download', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_edit', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_edit', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_email', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_email', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_flash', 1);
|
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_icons', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_icons', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_ignoreflood', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_ignoreflood', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_img', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_img', 1);
|
||||||
|
@ -489,7 +485,6 @@ INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_delete', 1)
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_download', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_download', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_edit', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_edit', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_emailpm', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_emailpm', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_flash', 1);
|
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_forward', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_forward', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_img', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_img', 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_printpm', 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_global) VALUES ('u_pm_printpm', 1);
|
||||||
|
@ -589,17 +584,17 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 5, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%';
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 5, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%';
|
||||||
|
|
||||||
# Standard Features (u_)
|
# Standard Features (u_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 6, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_flash', 'u_pm_forward');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 6, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_forward');
|
||||||
|
|
||||||
# Limited Features (u_)
|
# Limited Features (u_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 7, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_pm_flash', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 7, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group');
|
||||||
|
|
||||||
# No Private Messages (u_)
|
# No Private Messages (u_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_', 'u_chgavatar', 'u_chgcensors', 'u_chgemail', 'u_chgpasswd', 'u_download', 'u_hideonline', 'u_mention', 'u_sig', 'u_viewprofile');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_', 'u_chgavatar', 'u_chgcensors', 'u_chgemail', 'u_chgpasswd', 'u_download', 'u_hideonline', 'u_mention', 'u_sig', 'u_viewprofile');
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_readpm', 'u_sendpm', 'u_masspm', 'u_masspm_group');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 8, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_readpm', 'u_sendpm', 'u_masspm', 'u_masspm_group');
|
||||||
|
|
||||||
# No Avatar (u_)
|
# No Avatar (u_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_chgavatar', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_pm_flash', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option NOT IN ('u_attach', 'u_chgavatar', 'u_viewonline', 'u_chggrp', 'u_chgname', 'u_ignoreflood', 'u_pm_attach', 'u_pm_emailpm', 'u_savedrafts', 'u_search', 'u_sendemail', 'u_sendim', 'u_masspm', 'u_masspm_group');
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_chgavatar');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 9, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_chgavatar');
|
||||||
|
|
||||||
# Full Moderator (m_)
|
# Full Moderator (m_)
|
||||||
|
@ -618,7 +613,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 14, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%';
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 14, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%';
|
||||||
|
|
||||||
# Standard Access (f_)
|
# Standard Access (f_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 15, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_flash', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 15, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock');
|
||||||
|
|
||||||
# No Access (f_)
|
# No Access (f_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_';
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_';
|
||||||
|
@ -627,20 +622,20 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_list_topics', 'f_read', 'f_search', 'f_subscribe', 'f_print');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_list_topics', 'f_read', 'f_search', 'f_subscribe', 'f_print');
|
||||||
|
|
||||||
# Limited Access (f_)
|
# Limited Access (f_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_attach', 'f_bump', 'f_delete', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg');
|
||||||
|
|
||||||
# Bot Access (f_)
|
# Bot Access (f_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_list_topics', 'f_read', 'f_print');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_list_topics', 'f_read', 'f_print');
|
||||||
|
|
||||||
# On Moderation Queue (f_)
|
# On Moderation Queue (f_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg', 'f_noapprove');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_bump', 'f_delete', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg', 'f_noapprove');
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_noapprove');
|
||||||
|
|
||||||
# Standard Access + Polls (f_)
|
# Standard Access + Polls (f_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_flash', 'f_ignoreflood', 'f_sticky', 'f_user_lock');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 21, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_ignoreflood', 'f_sticky', 'f_user_lock');
|
||||||
|
|
||||||
# Limited Access + Polls (f_)
|
# Limited Access + Polls (f_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 22, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_sticky', 'f_user_lock', 'f_votechg');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 22, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_attach', 'f_bump', 'f_delete', 'f_icons', 'f_ignoreflood', 'f_sticky', 'f_user_lock', 'f_votechg');
|
||||||
|
|
||||||
# New Member (u_)
|
# New Member (u_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 23, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group', 'u_chgprofileinfo');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 23, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option LIKE 'u_%' AND auth_option IN ('u_sendpm', 'u_masspm', 'u_masspm_group', 'u_chgprofileinfo');
|
||||||
|
|
|
@ -92,7 +92,6 @@ $lang = array_merge($lang, array(
|
||||||
'ALLOW_QUICK_REPLY_BUTTON' => 'Submit and enable quick reply in all forums',
|
'ALLOW_QUICK_REPLY_BUTTON' => 'Submit and enable quick reply in all forums',
|
||||||
'ALLOW_SIG' => 'Allow signatures',
|
'ALLOW_SIG' => 'Allow signatures',
|
||||||
'ALLOW_SIG_BBCODE' => 'Allow BBCode in user signatures',
|
'ALLOW_SIG_BBCODE' => 'Allow BBCode in user signatures',
|
||||||
'ALLOW_SIG_FLASH' => 'Allow use of <code>[FLASH]</code> BBCode tag in user signatures',
|
|
||||||
'ALLOW_SIG_IMG' => 'Allow use of <code>[IMG]</code> BBCode tag in user signatures',
|
'ALLOW_SIG_IMG' => 'Allow use of <code>[IMG]</code> BBCode tag in user signatures',
|
||||||
'ALLOW_SIG_LINKS' => 'Allow use of links in user signatures',
|
'ALLOW_SIG_LINKS' => 'Allow use of links in user signatures',
|
||||||
'ALLOW_SIG_LINKS_EXPLAIN' => 'If disallowed the <code>[URL]</code> BBCode tag and automatic/magic URLs are disabled.',
|
'ALLOW_SIG_LINKS_EXPLAIN' => 'If disallowed the <code>[URL]</code> BBCode tag and automatic/magic URLs are disabled.',
|
||||||
|
@ -130,8 +129,6 @@ $lang = array_merge($lang, array(
|
||||||
'ACP_MESSAGE_SETTINGS_EXPLAIN' => 'Here you can set all default settings for private messaging.',
|
'ACP_MESSAGE_SETTINGS_EXPLAIN' => 'Here you can set all default settings for private messaging.',
|
||||||
|
|
||||||
'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages',
|
'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages',
|
||||||
'ALLOW_FLASH_PM' => 'Allow use of <code>[FLASH]</code> BBCode tag',
|
|
||||||
'ALLOW_FLASH_PM_EXPLAIN' => 'Note that the ability to use flash in private messages, if enabled here, also depends on the permissions.',
|
|
||||||
'ALLOW_FORWARD_PM' => 'Allow forwarding of private messages',
|
'ALLOW_FORWARD_PM' => 'Allow forwarding of private messages',
|
||||||
'ALLOW_IMG_PM' => 'Allow use of <code>[IMG]</code> BBCode tag',
|
'ALLOW_IMG_PM' => 'Allow use of <code>[IMG]</code> BBCode tag',
|
||||||
'ALLOW_MASS_PM' => 'Allow sending of private messages to multiple users and groups',
|
'ALLOW_MASS_PM' => 'Allow sending of private messages to multiple users and groups',
|
||||||
|
@ -162,8 +159,6 @@ $lang = array_merge($lang, array(
|
||||||
'ALLOW_POST_LINKS_EXPLAIN' => 'If disallowed the <code>[URL]</code> BBCode tag and automatic/magic URLs are disabled.',
|
'ALLOW_POST_LINKS_EXPLAIN' => 'If disallowed the <code>[URL]</code> BBCode tag and automatic/magic URLs are disabled.',
|
||||||
'ALLOWED_SCHEMES_LINKS' => 'Allowed schemes in links',
|
'ALLOWED_SCHEMES_LINKS' => 'Allowed schemes in links',
|
||||||
'ALLOWED_SCHEMES_LINKS_EXPLAIN' => 'Users can only post schemeless URLs or one of the comma-separated list of allowed schemes.',
|
'ALLOWED_SCHEMES_LINKS_EXPLAIN' => 'Users can only post schemeless URLs or one of the comma-separated list of allowed schemes.',
|
||||||
'ALLOW_POST_FLASH' => 'Allow use of <code>[FLASH]</code> BBCode tag in posts',
|
|
||||||
'ALLOW_POST_FLASH_EXPLAIN' => 'If disallowed the <code>[FLASH]</code> BBCode tag is disabled in posts. Otherwise the permission system controls which users can use the <code>[FLASH]</code> BBCode tag.',
|
|
||||||
|
|
||||||
'BUMP_INTERVAL' => 'Bump interval',
|
'BUMP_INTERVAL' => 'Bump interval',
|
||||||
'BUMP_INTERVAL_EXPLAIN' => 'Number of minutes, hours or days between the last post to a topic and the ability to bump that topic. Setting the value to 0 disables bumping entirely.',
|
'BUMP_INTERVAL_EXPLAIN' => 'Number of minutes, hours or days between the last post to a topic and the ability to bump that topic. Setting the value to 0 disables bumping entirely.',
|
||||||
|
@ -182,10 +177,6 @@ $lang = array_merge($lang, array(
|
||||||
'MAX_POLL_OPTIONS' => 'Maximum number of poll options',
|
'MAX_POLL_OPTIONS' => 'Maximum number of poll options',
|
||||||
'MAX_POST_FONT_SIZE' => 'Maximum font size per post',
|
'MAX_POST_FONT_SIZE' => 'Maximum font size per post',
|
||||||
'MAX_POST_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in a post. Set to 0 for unlimited font size.',
|
'MAX_POST_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in a post. Set to 0 for unlimited font size.',
|
||||||
'MAX_POST_IMG_HEIGHT' => 'Maximum flash height per post',
|
|
||||||
'MAX_POST_IMG_HEIGHT_EXPLAIN' => 'Maximum height of a flash file in postings. Set to 0 for unlimited size.',
|
|
||||||
'MAX_POST_IMG_WIDTH' => 'Maximum flash width per post',
|
|
||||||
'MAX_POST_IMG_WIDTH_EXPLAIN' => 'Maximum width of a flash file in postings. Set to 0 for unlimited size.',
|
|
||||||
'MAX_POST_URLS' => 'Maximum links per post',
|
'MAX_POST_URLS' => 'Maximum links per post',
|
||||||
'MAX_POST_URLS_EXPLAIN' => 'Maximum number of URLs in a post. Set to 0 for unlimited links.',
|
'MAX_POST_URLS_EXPLAIN' => 'Maximum number of URLs in a post. Set to 0 for unlimited links.',
|
||||||
'MENTIONS' => 'Mentions',
|
'MENTIONS' => 'Mentions',
|
||||||
|
@ -211,9 +202,9 @@ $lang = array_merge($lang, array(
|
||||||
'MAX_SIG_FONT_SIZE' => 'Maximum signature font size',
|
'MAX_SIG_FONT_SIZE' => 'Maximum signature font size',
|
||||||
'MAX_SIG_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in user signatures. Set to 0 for unlimited size.',
|
'MAX_SIG_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in user signatures. Set to 0 for unlimited size.',
|
||||||
'MAX_SIG_IMG_HEIGHT' => 'Maximum signature image height',
|
'MAX_SIG_IMG_HEIGHT' => 'Maximum signature image height',
|
||||||
'MAX_SIG_IMG_HEIGHT_EXPLAIN' => 'Maximum height of an image/flash file in user signatures. Set to 0 for unlimited height.',
|
'MAX_SIG_IMG_HEIGHT_EXPLAIN' => 'Maximum height of an image file in user signatures. Set to 0 for unlimited height.',
|
||||||
'MAX_SIG_IMG_WIDTH' => 'Maximum signature image width',
|
'MAX_SIG_IMG_WIDTH' => 'Maximum signature image width',
|
||||||
'MAX_SIG_IMG_WIDTH_EXPLAIN' => 'Maximum width of an image/flash file in user signatures. Set to 0 for unlimited width.',
|
'MAX_SIG_IMG_WIDTH_EXPLAIN' => 'Maximum width of an image file in user signatures. Set to 0 for unlimited width.',
|
||||||
'MAX_SIG_LENGTH' => 'Maximum signature length',
|
'MAX_SIG_LENGTH' => 'Maximum signature length',
|
||||||
'MAX_SIG_LENGTH_EXPLAIN' => 'Maximum number of characters in user signatures.',
|
'MAX_SIG_LENGTH_EXPLAIN' => 'Maximum number of characters in user signatures.',
|
||||||
'MAX_SIG_SMILIES' => 'Maximum smilies per signature',
|
'MAX_SIG_SMILIES' => 'Maximum smilies per signature',
|
||||||
|
|
|
@ -96,7 +96,6 @@ $lang = array_merge($lang, array(
|
||||||
'ACL_U_PM_BBCODE' => 'Can use BBCode in private messages',
|
'ACL_U_PM_BBCODE' => 'Can use BBCode in private messages',
|
||||||
'ACL_U_PM_SMILIES' => 'Can use smilies in private messages',
|
'ACL_U_PM_SMILIES' => 'Can use smilies in private messages',
|
||||||
'ACL_U_PM_IMG' => 'Can use [img] BBCode tag in private messages',
|
'ACL_U_PM_IMG' => 'Can use [img] BBCode tag in private messages',
|
||||||
'ACL_U_PM_FLASH' => 'Can use [flash] BBCode tag in private messages',
|
|
||||||
|
|
||||||
'ACL_U_SENDEMAIL' => 'Can send emails',
|
'ACL_U_SENDEMAIL' => 'Can send emails',
|
||||||
'ACL_U_SENDIM' => 'Can send instant messages',
|
'ACL_U_SENDIM' => 'Can send instant messages',
|
||||||
|
@ -136,7 +135,6 @@ $lang = array_merge($lang, array(
|
||||||
'ACL_F_ATTACH' => 'Can attach files',
|
'ACL_F_ATTACH' => 'Can attach files',
|
||||||
'ACL_F_ICONS' => 'Can use topic/post icons',
|
'ACL_F_ICONS' => 'Can use topic/post icons',
|
||||||
'ACL_F_BBCODE' => 'Can use BBCode',
|
'ACL_F_BBCODE' => 'Can use BBCode',
|
||||||
'ACL_F_FLASH' => 'Can use [flash] BBCode tag',
|
|
||||||
'ACL_F_IMG' => 'Can use [img] BBCode tag',
|
'ACL_F_IMG' => 'Can use [img] BBCode tag',
|
||||||
'ACL_F_SIGS' => 'Can use signatures',
|
'ACL_F_SIGS' => 'Can use signatures',
|
||||||
'ACL_F_SMILIES' => 'Can use smilies',
|
'ACL_F_SMILIES' => 'Can use smilies',
|
||||||
|
|
|
@ -51,7 +51,6 @@ $lang = array_merge($lang, array(
|
||||||
'BBCODE_A_HELP' => 'Inline uploaded attachment: [attachment=]filename.ext[/attachment]',
|
'BBCODE_A_HELP' => 'Inline uploaded attachment: [attachment=]filename.ext[/attachment]',
|
||||||
'BBCODE_B_HELP' => 'Bold text: [b]text[/b]',
|
'BBCODE_B_HELP' => 'Bold text: [b]text[/b]',
|
||||||
'BBCODE_C_HELP' => 'Code display: [code]code[/code]',
|
'BBCODE_C_HELP' => 'Code display: [code]code[/code]',
|
||||||
'BBCODE_D_HELP' => 'Flash: [flash=width,height]http://url[/flash]',
|
|
||||||
'BBCODE_F_HELP' => 'Font size: [size=85]small text[/size]',
|
'BBCODE_F_HELP' => 'Font size: [size=85]small text[/size]',
|
||||||
'BBCODE_IS_OFF' => '%sBBCode%s is <em>OFF</em>',
|
'BBCODE_IS_OFF' => '%sBBCode%s is <em>OFF</em>',
|
||||||
'BBCODE_IS_ON' => '%sBBCode%s is <em>ON</em>',
|
'BBCODE_IS_ON' => '%sBBCode%s is <em>ON</em>',
|
||||||
|
@ -122,8 +121,6 @@ $lang = array_merge($lang, array(
|
||||||
'EMPTY_FILEUPLOAD' => 'The uploaded file is empty.',
|
'EMPTY_FILEUPLOAD' => 'The uploaded file is empty.',
|
||||||
'EMPTY_MESSAGE' => 'You must enter a message when posting.',
|
'EMPTY_MESSAGE' => 'You must enter a message when posting.',
|
||||||
|
|
||||||
'FLASH_IS_OFF' => '[flash] is <em>OFF</em>',
|
|
||||||
'FLASH_IS_ON' => '[flash] is <em>ON</em>',
|
|
||||||
'FLOOD_ERROR' => 'You cannot make another post so soon after your last.',
|
'FLOOD_ERROR' => 'You cannot make another post so soon after your last.',
|
||||||
'FONT_COLOR' => 'Font colour',
|
'FONT_COLOR' => 'Font colour',
|
||||||
'FONT_COLOR_HIDE' => 'Hide font colour',
|
'FONT_COLOR_HIDE' => 'Hide font colour',
|
||||||
|
@ -152,14 +149,6 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'MAX_ATTACHMENT_FILESIZE' => 'Maximum filesize per attachment: %s.',
|
'MAX_ATTACHMENT_FILESIZE' => 'Maximum filesize per attachment: %s.',
|
||||||
'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %d.',
|
'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %d.',
|
||||||
'MAX_FLASH_HEIGHT_EXCEEDED' => array(
|
|
||||||
1 => 'Your flash files may only be up to %d pixel high.',
|
|
||||||
2 => 'Your flash files may only be up to %d pixels high.',
|
|
||||||
),
|
|
||||||
'MAX_FLASH_WIDTH_EXCEEDED' => array(
|
|
||||||
1 => 'Your flash files may only be up to %d pixel wide.',
|
|
||||||
2 => 'Your flash files may only be up to %d pixels wide.',
|
|
||||||
),
|
|
||||||
'MAX_IMG_HEIGHT_EXCEEDED' => array(
|
'MAX_IMG_HEIGHT_EXCEEDED' => array(
|
||||||
1 => 'Your images may only be up to %1$d pixel high.',
|
1 => 'Your images may only be up to %1$d pixel high.',
|
||||||
2 => 'Your images may only be up to %1$d pixels high.',
|
2 => 'Your images may only be up to %1$d pixels high.',
|
||||||
|
|
|
@ -586,7 +586,6 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'VIEW_AVATARS' => 'Display avatars',
|
'VIEW_AVATARS' => 'Display avatars',
|
||||||
'VIEW_EDIT' => 'View/Edit',
|
'VIEW_EDIT' => 'View/Edit',
|
||||||
'VIEW_FLASH' => 'Display Flash animations',
|
|
||||||
'VIEW_IMAGES' => 'Display images within posts',
|
'VIEW_IMAGES' => 'Display images within posts',
|
||||||
'VIEW_NEXT_HISTORY' => 'Next PM in history',
|
'VIEW_NEXT_HISTORY' => 'Next PM in history',
|
||||||
'VIEW_NEXT_PM' => 'Next PM',
|
'VIEW_NEXT_PM' => 'Next PM',
|
||||||
|
|
43
phpBB/phpbb/db/migration/data/v400/remove_flash.php
Normal file
43
phpBB/phpbb/db/migration/data/v400/remove_flash.php
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* This file is part of the phpBB Forum Software package.
|
||||||
|
*
|
||||||
|
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||||
|
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||||
|
*
|
||||||
|
* For full copyright and license information, please see
|
||||||
|
* the docs/CREDITS.txt file.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace phpbb\db\migration\data\v400;
|
||||||
|
|
||||||
|
use phpbb\db\migration\migration;
|
||||||
|
|
||||||
|
class remove_flash extends migration
|
||||||
|
{
|
||||||
|
public function effectively_installed()
|
||||||
|
{
|
||||||
|
return !$this->config->offsetExists('allow_post_flash');
|
||||||
|
}
|
||||||
|
|
||||||
|
static public function depends_on()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'\phpbb\db\migration\data\v400\dev',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function update_data()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
['config.remove', ['auth_flash_pm']],
|
||||||
|
['config.remove', ['allow_post_flash']],
|
||||||
|
['config.remove', ['allow_sig_flash']],
|
||||||
|
|
||||||
|
['permission.remove', ['f_flash', false]],
|
||||||
|
['permission.remove', ['u_pm_flash']],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
|
@ -251,7 +251,6 @@ class permissions
|
||||||
'u_pm_bbcode' => array('lang' => 'ACL_U_PM_BBCODE', 'cat' => 'pm'),
|
'u_pm_bbcode' => array('lang' => 'ACL_U_PM_BBCODE', 'cat' => 'pm'),
|
||||||
'u_pm_smilies' => array('lang' => 'ACL_U_PM_SMILIES', 'cat' => 'pm'),
|
'u_pm_smilies' => array('lang' => 'ACL_U_PM_SMILIES', 'cat' => 'pm'),
|
||||||
'u_pm_img' => array('lang' => 'ACL_U_PM_IMG', 'cat' => 'pm'),
|
'u_pm_img' => array('lang' => 'ACL_U_PM_IMG', 'cat' => 'pm'),
|
||||||
'u_pm_flash' => array('lang' => 'ACL_U_PM_FLASH', 'cat' => 'pm'),
|
|
||||||
|
|
||||||
'u_sendemail' => array('lang' => 'ACL_U_SENDEMAIL', 'cat' => 'misc'),
|
'u_sendemail' => array('lang' => 'ACL_U_SENDEMAIL', 'cat' => 'misc'),
|
||||||
'u_sendim' => array('lang' => 'ACL_U_SENDIM', 'cat' => 'misc'),
|
'u_sendim' => array('lang' => 'ACL_U_SENDIM', 'cat' => 'misc'),
|
||||||
|
@ -289,7 +288,6 @@ class permissions
|
||||||
'f_attach' => array('lang' => 'ACL_F_ATTACH', 'cat' => 'content'),
|
'f_attach' => array('lang' => 'ACL_F_ATTACH', 'cat' => 'content'),
|
||||||
'f_icons' => array('lang' => 'ACL_F_ICONS', 'cat' => 'content'),
|
'f_icons' => array('lang' => 'ACL_F_ICONS', 'cat' => 'content'),
|
||||||
'f_bbcode' => array('lang' => 'ACL_F_BBCODE', 'cat' => 'content'),
|
'f_bbcode' => array('lang' => 'ACL_F_BBCODE', 'cat' => 'content'),
|
||||||
'f_flash' => array('lang' => 'ACL_F_FLASH', 'cat' => 'content'),
|
|
||||||
'f_img' => array('lang' => 'ACL_F_IMG', 'cat' => 'content'),
|
'f_img' => array('lang' => 'ACL_F_IMG', 'cat' => 'content'),
|
||||||
'f_sigs' => array('lang' => 'ACL_F_SIGS', 'cat' => 'content'),
|
'f_sigs' => array('lang' => 'ACL_F_SIGS', 'cat' => 'content'),
|
||||||
'f_smilies' => array('lang' => 'ACL_F_SMILIES', 'cat' => 'content'),
|
'f_smilies' => array('lang' => 'ACL_F_SMILIES', 'cat' => 'content'),
|
||||||
|
|
|
@ -136,7 +136,6 @@ class data_access
|
||||||
'list' => 9,
|
'list' => 9,
|
||||||
'*' => 9,
|
'*' => 9,
|
||||||
'email' => 10,
|
'email' => 10,
|
||||||
'flash' => 11,
|
|
||||||
'attachment' => 12,
|
'attachment' => 12,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -37,13 +37,6 @@ interface renderer_interface
|
||||||
*/
|
*/
|
||||||
public function get_viewcensors();
|
public function get_viewcensors();
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the value of the "viewflash" option
|
|
||||||
*
|
|
||||||
* @return bool Option's value
|
|
||||||
*/
|
|
||||||
public function get_viewflash();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the value of the "viewimg" option
|
* Return the value of the "viewimg" option
|
||||||
*
|
*
|
||||||
|
@ -66,14 +59,6 @@ interface renderer_interface
|
||||||
*/
|
*/
|
||||||
public function set_viewcensors($value);
|
public function set_viewcensors($value);
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the "viewflash" option
|
|
||||||
*
|
|
||||||
* @param bool $value Option's value
|
|
||||||
* @return null
|
|
||||||
*/
|
|
||||||
public function set_viewflash($value);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the "viewimg" option
|
* Set the "viewimg" option
|
||||||
*
|
*
|
||||||
|
|
|
@ -57,7 +57,6 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||||
*/
|
*/
|
||||||
protected $custom_tokens = array(
|
protected $custom_tokens = array(
|
||||||
'email' => array('{DESCRIPTION}' => '{TEXT}'),
|
'email' => array('{DESCRIPTION}' => '{TEXT}'),
|
||||||
'flash' => array('{WIDTH}' => '{NUMBER1}', '{HEIGHT}' => '{NUMBER2}'),
|
|
||||||
'img' => array('{URL}' => '{IMAGEURL}'),
|
'img' => array('{URL}' => '{IMAGEURL}'),
|
||||||
'list' => array('{LIST_TYPE}' => '{HASHMAP}'),
|
'list' => array('{LIST_TYPE}' => '{HASHMAP}'),
|
||||||
'quote' => array('{USERNAME}' => '{TEXT1}'),
|
'quote' => array('{USERNAME}' => '{TEXT1}'),
|
||||||
|
@ -79,7 +78,6 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||||
'code' => '[CODE lang={IDENTIFIER;optional}]{TEXT}[/CODE]',
|
'code' => '[CODE lang={IDENTIFIER;optional}]{TEXT}[/CODE]',
|
||||||
'color' => '[COLOR={COLOR}]{TEXT}[/COLOR]',
|
'color' => '[COLOR={COLOR}]{TEXT}[/COLOR]',
|
||||||
'email' => '[EMAIL={EMAIL;useContent} subject={TEXT1;optional;postFilter=rawurlencode} body={TEXT2;optional;postFilter=rawurlencode}]{TEXT}[/EMAIL]',
|
'email' => '[EMAIL={EMAIL;useContent} subject={TEXT1;optional;postFilter=rawurlencode} body={TEXT2;optional;postFilter=rawurlencode}]{TEXT}[/EMAIL]',
|
||||||
'flash' => '[FLASH={NUMBER1},{NUMBER2} width={NUMBER1;postFilter=#flashwidth} height={NUMBER2;postFilter=#flashheight} url={URL;useContent} /]',
|
|
||||||
'i' => '[I]{TEXT}[/I]',
|
'i' => '[I]{TEXT}[/I]',
|
||||||
'img' => '[IMG src={IMAGEURL;useContent}]',
|
'img' => '[IMG src={IMAGEURL;useContent}]',
|
||||||
'list' => '[LIST type={HASHMAP=1:decimal,a:lower-alpha,A:upper-alpha,i:lower-roman,I:upper-roman;optional;postFilter=#simpletext} #createChild=LI]{TEXT}[/LIST]',
|
'list' => '[LIST type={HASHMAP=1:decimal,a:lower-alpha,A:upper-alpha,i:lower-roman,I:upper-roman;optional;postFilter=#simpletext} #createChild=LI]{TEXT}[/LIST]',
|
||||||
|
@ -268,18 +266,6 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||||
$filter = new RegexpFilter('!^([\p{L}\p{N}\-+,_. ]+)$!Du');
|
$filter = new RegexpFilter('!^([\p{L}\p{N}\-+,_. ]+)$!Du');
|
||||||
$configurator->attributeFilters->add('#inttext', $filter);
|
$configurator->attributeFilters->add('#inttext', $filter);
|
||||||
|
|
||||||
// Create custom filters for Flash restrictions, which use the same values as the image
|
|
||||||
// restrictions but have their own error message
|
|
||||||
$configurator->attributeFilters
|
|
||||||
->add('#flashheight', __NAMESPACE__ . '\\parser::filter_flash_height')
|
|
||||||
->addParameterByName('max_img_height')
|
|
||||||
->addParameterByName('logger');
|
|
||||||
|
|
||||||
$configurator->attributeFilters
|
|
||||||
->add('#flashwidth', __NAMESPACE__ . '\\parser::filter_flash_width')
|
|
||||||
->addParameterByName('max_img_width')
|
|
||||||
->addParameterByName('logger');
|
|
||||||
|
|
||||||
// Create a custom filter for phpBB's per-mode font size limits
|
// Create a custom filter for phpBB's per-mode font size limits
|
||||||
$configurator->attributeFilters
|
$configurator->attributeFilters
|
||||||
->add('#fontsize', __NAMESPACE__ . '\\parser::filter_font_size')
|
->add('#fontsize', __NAMESPACE__ . '\\parser::filter_font_size')
|
||||||
|
@ -306,8 +292,8 @@ class factory implements \phpbb\textformatter\cache_interface
|
||||||
$configurator->tags['QUOTE']->nestingLimit = PHP_INT_MAX;
|
$configurator->tags['QUOTE']->nestingLimit = PHP_INT_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modify the template to disable images/flash/mentions depending on user's settings
|
// Modify the template to disable images/mentions depending on user's settings
|
||||||
foreach (array('FLASH', 'IMG', 'MENTION') as $name)
|
foreach (['IMG', 'MENTION'] as $name)
|
||||||
{
|
{
|
||||||
$tag = $configurator->tags[$name];
|
$tag = $configurator->tags[$name];
|
||||||
$tag->template = '<xsl:choose><xsl:when test="$S_VIEW' . $name . '">' . $tag->template . '</xsl:when><xsl:otherwise><xsl:apply-templates/></xsl:otherwise></xsl:choose>';
|
$tag->template = '<xsl:choose><xsl:when test="$S_VIEW' . $name . '">' . $tag->template . '</xsl:when><xsl:otherwise><xsl:apply-templates/></xsl:otherwise></xsl:choose>';
|
||||||
|
|
|
@ -218,7 +218,7 @@ class parser implements \phpbb\textformatter\parser_interface
|
||||||
{
|
{
|
||||||
$errors[] = array($msg, $context['max_size']);
|
$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])]);
|
$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
|
* Filter the value used in a [size] BBCode
|
||||||
*
|
*
|
||||||
|
|
|
@ -48,11 +48,6 @@ class renderer implements \phpbb\textformatter\renderer_interface
|
||||||
*/
|
*/
|
||||||
protected $viewcensors = false;
|
protected $viewcensors = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var bool Status of the viewflash option
|
|
||||||
*/
|
|
||||||
protected $viewflash = false;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var bool Status of the viewimg option
|
* @var bool Status of the viewimg option
|
||||||
*/
|
*/
|
||||||
|
@ -167,7 +162,7 @@ class renderer implements \phpbb\textformatter\renderer_interface
|
||||||
/**
|
/**
|
||||||
* Configure this renderer as per the user's settings
|
* Configure this renderer as per the user's settings
|
||||||
*
|
*
|
||||||
* Should set the locale as well as the viewcensor/viewflash/viewimg/viewsmilies options.
|
* Should set the locale as well as the viewcensor/viewimg/viewsmilies options.
|
||||||
*
|
*
|
||||||
* @param \phpbb\user $user
|
* @param \phpbb\user $user
|
||||||
* @param \phpbb\config\config $config
|
* @param \phpbb\config\config $config
|
||||||
|
@ -179,7 +174,6 @@ class renderer implements \phpbb\textformatter\renderer_interface
|
||||||
$censor = $user->optionget('viewcensors') || !$config['allow_nocensors'] || !$auth->acl_get('u_chgcensors');
|
$censor = $user->optionget('viewcensors') || !$config['allow_nocensors'] || !$auth->acl_get('u_chgcensors');
|
||||||
|
|
||||||
$this->set_viewcensors($censor);
|
$this->set_viewcensors($censor);
|
||||||
$this->set_viewflash($user->optionget('viewflash'));
|
|
||||||
$this->set_viewimg($user->optionget('viewimg'));
|
$this->set_viewimg($user->optionget('viewimg'));
|
||||||
$this->set_viewsmilies($user->optionget('viewsmilies'));
|
$this->set_viewsmilies($user->optionget('viewsmilies'));
|
||||||
$this->set_usemention($config['allow_mentions'] && $auth->acl_get('u_mention'));
|
$this->set_usemention($config['allow_mentions'] && $auth->acl_get('u_mention'));
|
||||||
|
@ -221,14 +215,6 @@ class renderer implements \phpbb\textformatter\renderer_interface
|
||||||
return $this->viewcensors;
|
return $this->viewcensors;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function get_viewflash()
|
|
||||||
{
|
|
||||||
return $this->viewflash;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
@ -310,15 +296,6 @@ class renderer implements \phpbb\textformatter\renderer_interface
|
||||||
$this->renderer->setParameter('S_VIEWCENSORS', $value);
|
$this->renderer->setParameter('S_VIEWCENSORS', $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public function set_viewflash($value)
|
|
||||||
{
|
|
||||||
$this->viewflash = $value;
|
|
||||||
$this->renderer->setParameter('S_VIEWFLASH', $value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -77,7 +77,7 @@ abstract class base implements reparser_interface
|
||||||
|
|
||||||
// Those BBCodes are disabled based on context and user permissions and that value is never
|
// Those BBCodes are disabled based on context and user permissions and that value is never
|
||||||
// stored in the database. Here we test whether they were used in the original text.
|
// stored in the database. Here we test whether they were used in the original text.
|
||||||
$bbcodes = array('flash', 'img', 'quote', 'url');
|
$bbcodes = array('img', 'quote', 'url');
|
||||||
foreach ($bbcodes as $bbcode)
|
foreach ($bbcodes as $bbcode)
|
||||||
{
|
{
|
||||||
$field_name = 'enable_' . $bbcode . '_bbcode';
|
$field_name = 'enable_' . $bbcode . '_bbcode';
|
||||||
|
@ -253,7 +253,6 @@ abstract class base implements reparser_interface
|
||||||
$unparsed['enable_magic_url'],
|
$unparsed['enable_magic_url'],
|
||||||
$unparsed['enable_smilies'],
|
$unparsed['enable_smilies'],
|
||||||
$unparsed['enable_img_bbcode'],
|
$unparsed['enable_img_bbcode'],
|
||||||
$unparsed['enable_flash_bbcode'],
|
|
||||||
$unparsed['enable_quote_bbcode'],
|
$unparsed['enable_quote_bbcode'],
|
||||||
$unparsed['enable_url_bbcode'],
|
$unparsed['enable_url_bbcode'],
|
||||||
'text_reparser.' . $this->get_name()
|
'text_reparser.' . $this->get_name()
|
||||||
|
|
|
@ -49,7 +49,7 @@ class user extends \phpbb\session
|
||||||
protected $is_setup_flag;
|
protected $is_setup_flag;
|
||||||
|
|
||||||
// Able to add new options (up to id 31)
|
// Able to add new options (up to id 31)
|
||||||
var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'sig_bbcode' => 15, 'sig_smilies' => 16, 'sig_links' => 17);
|
var $keyoptions = array('viewimg' => 0, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'sig_bbcode' => 15, 'sig_smilies' => 16, 'sig_links' => 17);
|
||||||
|
|
||||||
public $profile_fields;
|
public $profile_fields;
|
||||||
|
|
||||||
|
|
|
@ -721,12 +721,11 @@ if ($mode == 'edit' && $post_data['bbcode_uid'])
|
||||||
$message_parser->bbcode_uid = $post_data['bbcode_uid'];
|
$message_parser->bbcode_uid = $post_data['bbcode_uid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// HTML, BBCode, Smilies, Images and Flash status
|
// HTML, BBCode, Smilies and Images status
|
||||||
$bbcode_status = ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id)) ? true : false;
|
$bbcode_status = ($config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id)) ? true : false;
|
||||||
$smilies_status = ($config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id)) ? true : false;
|
$smilies_status = ($config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id)) ? true : false;
|
||||||
$img_status = ($bbcode_status && $auth->acl_get('f_img', $forum_id)) ? true : false;
|
$img_status = ($bbcode_status && $auth->acl_get('f_img', $forum_id)) ? true : false;
|
||||||
$url_status = ($config['allow_post_links']) ? true : false;
|
$url_status = ($config['allow_post_links']) ? true : false;
|
||||||
$flash_status = ($bbcode_status && $auth->acl_get('f_flash', $forum_id) && $config['allow_post_flash']) ? true : false;
|
|
||||||
$quote_status = true;
|
$quote_status = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -770,7 +769,7 @@ if ($save && $user->data['is_registered'] && $auth->acl_get('u_savedrafts') && (
|
||||||
if (confirm_box(true))
|
if (confirm_box(true))
|
||||||
{
|
{
|
||||||
$message_parser->message = $message;
|
$message_parser->message = $message;
|
||||||
$message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']);
|
$message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $quote_status, $config['allow_post_links']);
|
||||||
|
|
||||||
$sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
$sql = 'INSERT INTO ' . DRAFTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||||
'user_id' => (int) $user->data['user_id'],
|
'user_id' => (int) $user->data['user_id'],
|
||||||
|
@ -1109,7 +1108,7 @@ if ($submit || $preview || $refresh)
|
||||||
|
|
||||||
if (!$preview || !empty($message_parser->message))
|
if (!$preview || !empty($message_parser->message))
|
||||||
{
|
{
|
||||||
$message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $flash_status, $quote_status, $config['allow_post_links']);
|
$message_parser->parse($post_data['enable_bbcode'], ($config['allow_post_links']) ? $post_data['enable_urls'] : false, $post_data['enable_smilies'], $img_status, $quote_status, $config['allow_post_links']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// On a refresh we do not care about message parsing errors
|
// On a refresh we do not care about message parsing errors
|
||||||
|
@ -1891,7 +1890,6 @@ $page_data = array(
|
||||||
'MESSAGE' => $post_data['post_text'],
|
'MESSAGE' => $post_data['post_text'],
|
||||||
'BBCODE_STATUS' => $user->lang(($bbcode_status ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
|
'BBCODE_STATUS' => $user->lang(($bbcode_status ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '<a href="' . $controller_helper->route('phpbb_help_bbcode_controller') . '">', '</a>'),
|
||||||
'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'],
|
||||||
'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'],
|
|
||||||
'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
||||||
'URL_STATUS' => ($bbcode_status && $url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
|
'URL_STATUS' => ($bbcode_status && $url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'],
|
||||||
'MAX_FONT_SIZE' => (int) $config['max_post_font_size'],
|
'MAX_FONT_SIZE' => (int) $config['max_post_font_size'],
|
||||||
|
@ -1938,7 +1936,6 @@ $page_data = array(
|
||||||
|
|
||||||
'S_BBCODE_IMG' => $img_status,
|
'S_BBCODE_IMG' => $img_status,
|
||||||
'S_BBCODE_URL' => $url_status,
|
'S_BBCODE_URL' => $url_status,
|
||||||
'S_BBCODE_FLASH' => $flash_status,
|
|
||||||
'S_BBCODE_QUOTE' => $quote_status,
|
'S_BBCODE_QUOTE' => $quote_status,
|
||||||
|
|
||||||
'S_POST_ACTION' => $s_action,
|
'S_POST_ACTION' => $s_action,
|
||||||
|
|
|
@ -91,5 +91,3 @@
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</a>
|
</a>
|
||||||
<!-- END email -->
|
<!-- END email -->
|
||||||
|
|
||||||
<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
// Define the bbCode tags
|
// Define the bbCode tags
|
||||||
var bbcode = new Array();
|
var bbcode = new Array();
|
||||||
var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
|
var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
|
||||||
var imageTag = false;
|
var imageTag = false;
|
||||||
|
|
||||||
function change_palette()
|
function change_palette()
|
||||||
|
@ -78,11 +78,6 @@
|
||||||
{{ Icon('iconify', 'mdi:link-variant', '', true, 'c-button-icon') }}
|
{{ Icon('iconify', 'mdi:link-variant', '', true, 'c-button-icon') }}
|
||||||
</button>
|
</button>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF S_BBCODE_FLASH -->
|
|
||||||
<button type="button" class="button button-icon-only bbcode-flash" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}">
|
|
||||||
{{ Icon('iconify', 'fa:flash', '', true, 'c-button-icon') }}
|
|
||||||
</button>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
<button type="button" class="button button-icon-only bbcode-color" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}">
|
<button type="button" class="button button-icon-only bbcode-color" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="change_palette();" title="{L_BBCODE_S_HELP}">
|
||||||
{{ Icon('iconify', 'fa:tint', '', true, 'c-button-icon') }}
|
{{ Icon('iconify', 'fa:tint', '', true, 'c-button-icon') }}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -65,7 +65,6 @@
|
||||||
{BBCODE_STATUS}<br />
|
{BBCODE_STATUS}<br />
|
||||||
<!-- IF S_BBCODE_ALLOWED -->
|
<!-- IF S_BBCODE_ALLOWED -->
|
||||||
{IMG_STATUS}<br />
|
{IMG_STATUS}<br />
|
||||||
{FLASH_STATUS}<br />
|
|
||||||
{URL_STATUS}<br />
|
{URL_STATUS}<br />
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
{SMILIES_STATUS}
|
{SMILIES_STATUS}
|
||||||
|
|
|
@ -17,13 +17,6 @@
|
||||||
<label for="images0"><input type="radio" name="images" id="images0" value="0"<!-- IF not S_IMAGES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
<label for="images0"><input type="radio" name="images" id="images0" value="0"<!-- IF not S_IMAGES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
|
||||||
<dt><label for="flash0">{L_VIEW_FLASH}{L_COLON}</label></dt>
|
|
||||||
<dd>
|
|
||||||
<label for="flash1"><input type="radio" name="flash" id="flash1" value="1"<!-- IF S_FLASH --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
|
||||||
<label for="flash0"><input type="radio" name="flash" id="flash0" value="0"<!-- IF not S_FLASH --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="smilies1">{L_VIEW_SMILIES}{L_COLON}</label></dt>
|
<dt><label for="smilies1">{L_VIEW_SMILIES}{L_COLON}</label></dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
|
@ -211,11 +211,6 @@ class phpbb_bbcode_parser_test extends \phpbb_test_case
|
||||||
'[quote="[img]https://area51.phpbb.com/images/area51.png[/img]"]test[/quote]',
|
'[quote="[img]https://area51.phpbb.com/images/area51.png[/img]"]test[/quote]',
|
||||||
'[quote="[img:]https://area51.phpbb.com/images/area51.png[/img:]":]test[/quote:]',
|
'[quote="[img:]https://area51.phpbb.com/images/area51.png[/img:]":]test[/quote:]',
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
'Disallow flash bbcodes in usernames - Username displayed as [flash]http://www.phpbb.com/[/flash]',
|
|
||||||
'[quote="[flash]http://www.phpbb.com/[/flash]"]test[/quote]',
|
|
||||||
'[quote="[flash]http://www.phpbb.com/[/flash]":]test[/quote:]',
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
'Disallow quote bbcodes in usernames - Username displayed as [quote]test[/quote]',
|
'Disallow quote bbcodes in usernames - Username displayed as [quote]test[/quote]',
|
||||||
'[quote="[quote]test[/quote]"]test[/quote]',
|
'[quote="[quote]test[/quote]"]test[/quote]',
|
||||||
|
|
|
@ -582,7 +582,6 @@ class phpbb_test_case_helpers
|
||||||
|
|
||||||
$user->date_format = 'Y-m-d H:i:s';
|
$user->date_format = 'Y-m-d H:i:s';
|
||||||
$user->optionset('viewcensors', true);
|
$user->optionset('viewcensors', true);
|
||||||
$user->optionset('viewflash', true);
|
|
||||||
$user->optionset('viewimg', true);
|
$user->optionset('viewimg', true);
|
||||||
$user->optionset('viewsmilies', true);
|
$user->optionset('viewsmilies', true);
|
||||||
$user->timezone = new \DateTimeZone('UTC');
|
$user->timezone = new \DateTimeZone('UTC');
|
||||||
|
|
|
@ -87,7 +87,6 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
|
||||||
$this->assertTrue(isset($configurator->BBCodes['CODE']));
|
$this->assertTrue(isset($configurator->BBCodes['CODE']));
|
||||||
$this->assertTrue(isset($configurator->BBCodes['COLOR']));
|
$this->assertTrue(isset($configurator->BBCodes['COLOR']));
|
||||||
$this->assertTrue(isset($configurator->BBCodes['EMAIL']));
|
$this->assertTrue(isset($configurator->BBCodes['EMAIL']));
|
||||||
$this->assertTrue(isset($configurator->BBCodes['FLASH']));
|
|
||||||
$this->assertTrue(isset($configurator->BBCodes['I']));
|
$this->assertTrue(isset($configurator->BBCodes['I']));
|
||||||
$this->assertTrue(isset($configurator->BBCodes['IMG']));
|
$this->assertTrue(isset($configurator->BBCodes['IMG']));
|
||||||
$this->assertTrue(isset($configurator->BBCodes['LIST']));
|
$this->assertTrue(isset($configurator->BBCodes['LIST']));
|
||||||
|
|
|
@ -36,5 +36,3 @@
|
||||||
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
||||||
|
|
||||||
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
||||||
|
|
||||||
<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
|
|
||||||
|
|
|
@ -36,5 +36,3 @@
|
||||||
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
||||||
|
|
||||||
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
||||||
|
|
||||||
<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
|
|
||||||
|
|
|
@ -36,5 +36,3 @@
|
||||||
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
||||||
|
|
||||||
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
||||||
|
|
||||||
<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
|
|
||||||
|
|
|
@ -74,5 +74,3 @@
|
||||||
{% for url in loops.url %}<a href="{{ URL }}" class="postlink">{{ DESCRIPTION }}</a>{% endfor %}
|
{% for url in loops.url %}<a href="{{ URL }}" class="postlink">{{ DESCRIPTION }}</a>{% endfor %}
|
||||||
|
|
||||||
{% for email in loops.email %}<a href="mailto:{{ EMAIL }}">{{ DESCRIPTION }}</a>{% endfor %}
|
{% for email in loops.email %}<a href="mailto:{{ EMAIL }}">{{ DESCRIPTION }}</a>{% endfor %}
|
||||||
|
|
||||||
{% for flash in loops.flash %}<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{{ WIDTH }}" height="{{ HEIGHT }}"><param name="movie" value="{{ URL }}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{{ URL }}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{{ WIDTH }}" height="{{ HEIGHT }}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object>{% endfor %}
|
|
||||||
|
|
|
@ -36,5 +36,3 @@
|
||||||
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
|
||||||
|
|
||||||
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
|
||||||
|
|
||||||
<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
|
|
||||||
|
|
|
@ -106,11 +106,6 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case
|
||||||
'apple',
|
'apple',
|
||||||
array('set_viewcensors' => false)
|
array('set_viewcensors' => false)
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
'<r><FLASH height="456" url="http://example.org/foo.swf" width="123"><s>[flash=123,456]</s><URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL><e>[/flash]</e></FLASH></r>',
|
|
||||||
'<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="123" height="456"><param name="movie" value="http://example.org/foo.swf"><param name="play" value="false"><param name="loop" value="false"><param name="quality" value="high"><param name="allowScriptAccess" value="never"><param name="allowNetworking" value="internal"><embed src="http://example.org/foo.swf" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="123" height="456" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></object>',
|
|
||||||
array('set_viewflash' => true)
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
'<r><IMG src="http://example.org/foo.png"><s>[img]</s>http://example.org/foo.png<e>[/img]</e></IMG></r>',
|
'<r><IMG src="http://example.org/foo.png"><s>[img]</s>http://example.org/foo.png<e>[/img]</e></IMG></r>',
|
||||||
'<img src="http://example.org/foo.png" class="postimage" alt="Image">',
|
'<img src="http://example.org/foo.png" class="postimage" alt="Image">',
|
||||||
|
@ -214,26 +209,6 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case
|
||||||
$phpbb_container->set('auth', $auth);
|
$phpbb_container->set('auth', $auth);
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
'<r><FLASH url="http://localhost/foo.swf" width="123" height="456"><s>[flash=123,456]</s>http://localhost/foo.swf<e>[/flash]</e></FLASH></r>',
|
|
||||||
'<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="123" height="456"><param name="movie" value="http://localhost/foo.swf"><param name="play" value="false"><param name="loop" value="false"><param name="quality" value="high"><param name="allowScriptAccess" value="never"><param name="allowNetworking" value="internal"><embed src="http://localhost/foo.swf" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="123" height="456" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></object>'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'<r><FLASH url="http://localhost/foo.swf" width="123" height="456"><s>[flash=123,456]</s>http://localhost/foo.swf<e>[/flash]</e></FLASH></r>',
|
|
||||||
'http://localhost/foo.swf',
|
|
||||||
function ($phpbb_container)
|
|
||||||
{
|
|
||||||
global $phpbb_root_path, $phpEx;
|
|
||||||
|
|
||||||
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
|
|
||||||
$lang = new \phpbb\language\language($lang_loader);
|
|
||||||
$user = new \phpbb\user($lang, '\phpbb\datetime');
|
|
||||||
$user->data['user_options'] = 230271;
|
|
||||||
$user->optionset('viewflash', false);
|
|
||||||
|
|
||||||
$phpbb_container->set('user', $user);
|
|
||||||
}
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
'<r><IMG src="http://localhost/mrgreen.gif"><s>[img]</s><URL url="http://localhost/mrgreen.gif">http://localhost/mrgreen.gif</URL><e>[/img]</e></IMG></r>',
|
'<r><IMG src="http://localhost/mrgreen.gif"><s>[img]</s><URL url="http://localhost/mrgreen.gif">http://localhost/mrgreen.gif</URL><e>[/img]</e></IMG></r>',
|
||||||
'<img src="http://localhost/mrgreen.gif" class="postimage" alt="Image">'
|
'<img src="http://localhost/mrgreen.gif" class="postimage" alt="Image">'
|
||||||
|
@ -307,7 +282,6 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array('viewcensors'),
|
array('viewcensors'),
|
||||||
array('viewflash'),
|
|
||||||
array('viewimg'),
|
array('viewimg'),
|
||||||
array('viewsmilies')
|
array('viewsmilies')
|
||||||
);
|
);
|
||||||
|
|
|
@ -39,7 +39,6 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca
|
||||||
$user = new \phpbb\user($lang, '\phpbb\datetime');
|
$user = new \phpbb\user($lang, '\phpbb\datetime');
|
||||||
$user->data['user_options'] = 230271;
|
$user->data['user_options'] = 230271;
|
||||||
$user->optionset('viewcensors', true);
|
$user->optionset('viewcensors', true);
|
||||||
$user->optionset('viewflash', true);
|
|
||||||
$user->optionset('viewimg', true);
|
$user->optionset('viewimg', true);
|
||||||
$user->optionset('viewsmilies', true);
|
$user->optionset('viewsmilies', true);
|
||||||
|
|
||||||
|
@ -159,27 +158,6 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca
|
||||||
'apple',
|
'apple',
|
||||||
false
|
false
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
'<r><FLASH url="http://localhost/foo.swf" width="123" height="456"><s>[flash=123,456]</s>http://localhost/foo.swf<e>[/flash]</e></FLASH></r>',
|
|
||||||
'<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="123" height="456"><param name="movie" value="http://localhost/foo.swf"><param name="play" value="false"><param name="loop" value="false"><param name="quality" value="high"><param name="allowScriptAccess" value="never"><param name="allowNetworking" value="internal"><embed src="http://localhost/foo.swf" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="123" height="456" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></object>'
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'<r><FLASH url="http://localhost/foo.swf" width="123" height="456"><s>[flash=123,456]</s>http://localhost/foo.swf<e>[/flash]</e></FLASH></r>',
|
|
||||||
'http://localhost/foo.swf',
|
|
||||||
true,
|
|
||||||
function ($phpbb_container)
|
|
||||||
{
|
|
||||||
global $phpbb_root_path, $phpEx;
|
|
||||||
|
|
||||||
$lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx);
|
|
||||||
$lang = new \phpbb\language\language($lang_loader);
|
|
||||||
$user = new \phpbb\user($lang, '\phpbb\datetime');
|
|
||||||
$user->data['user_options'] = 230271;
|
|
||||||
$user->optionset('viewflash', false);
|
|
||||||
|
|
||||||
$phpbb_container->set('user', $user);
|
|
||||||
}
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
'<r><IMG src="http://localhost/mrgreen.gif"><s>[img]</s><URL url="http://localhost/mrgreen.gif">http://localhost/mrgreen.gif</URL><e>[/img]</e></IMG></r>',
|
'<r><IMG src="http://localhost/mrgreen.gif"><s>[img]</s><URL url="http://localhost/mrgreen.gif">http://localhost/mrgreen.gif</URL><e>[/img]</e></IMG></r>',
|
||||||
'<img src="http://localhost/mrgreen.gif" class="postimage" alt="Image">'
|
'<img src="http://localhost/mrgreen.gif" class="postimage" alt="Image">'
|
||||||
|
|
|
@ -32,7 +32,7 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
/**
|
/**
|
||||||
* @dataProvider get_text_formatter_tests
|
* @dataProvider get_text_formatter_tests
|
||||||
*/
|
*/
|
||||||
public function test_text_formatter($original, $expected, $allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_flash_bbcode, $allow_quote_bbcode, $allow_url_bbcode, $setup = null)
|
public function test_text_formatter($original, $expected, $allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_quote_bbcode, $allow_url_bbcode, $setup = null)
|
||||||
{
|
{
|
||||||
$actual = $original;
|
$actual = $original;
|
||||||
$uid = '';
|
$uid = '';
|
||||||
|
@ -44,7 +44,7 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
$setup();
|
$setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_text_for_storage($actual, $uid, $bitfield, $flags, $allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_flash_bbcode, $allow_quote_bbcode, $allow_url_bbcode);
|
generate_text_for_storage($actual, $uid, $bitfield, $flags, $allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_quote_bbcode, $allow_url_bbcode);
|
||||||
|
|
||||||
$this->assertSame($expected, $actual);
|
$this->assertSame($expected, $actual);
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'Hello [url=http://example.org]world[/url] :)',
|
'Hello [url=http://example.org]world[/url] :)',
|
||||||
|
@ -72,7 +71,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'&<>"\'',
|
'&<>"\'',
|
||||||
|
@ -83,7 +81,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
true,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
||||||
|
@ -94,7 +91,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
||||||
|
@ -105,7 +101,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
||||||
|
@ -115,7 +110,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
true,
|
true,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
@ -127,7 +121,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
||||||
|
@ -138,16 +131,14 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
'[b]..[/b] http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]',
|
||||||
'<r><B><s>[b]</s>..<e>[/b]</e></B> http://example.org :) [img]http://example.org/img.png[/img] <FLASH height="123" url="http://example.org/flash.swf" width="123"><s>[flash=123,123]</s>http://example.org/flash.swf<e>[/flash]</e></FLASH> [quote]...[/quote] [url]http://example.org[/url]</r>',
|
'<r><B><s>[b]</s>..<e>[/b]</e></B> http://example.org :) [img]http://example.org/img.png[/img] [flash=123,123]http://example.org/flash.swf[/flash] [quote]...[/quote] [url]http://example.org[/url]</r>',
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
true,
|
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
|
@ -158,7 +149,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
|
@ -170,7 +160,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
|
||||||
true,
|
true,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -38,15 +38,12 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
$config = new \phpbb\config\config(array('max_poll_options' => 999));
|
$config = new \phpbb\config\config(array('max_poll_options' => 999));
|
||||||
|
|
||||||
$map = array(
|
$map = array(
|
||||||
array('MAX_FLASH_HEIGHT_EXCEEDED', 123, 'Your flash files may only be up to 123 pixels high.'),
|
|
||||||
array('MAX_FLASH_WIDTH_EXCEEDED', 456, 'Your flash files may only be up to 456 pixels wide.'),
|
|
||||||
array('MAX_FONT_SIZE_EXCEEDED', 120, 'You may only use fonts up to size 120.'),
|
array('MAX_FONT_SIZE_EXCEEDED', 120, 'You may only use fonts up to size 120.'),
|
||||||
array('MAX_FONT_SIZE_EXCEEDED', 200, 'You may only use fonts up to size 200.'),
|
array('MAX_FONT_SIZE_EXCEEDED', 200, 'You may only use fonts up to size 200.'),
|
||||||
array('MAX_IMG_HEIGHT_EXCEEDED', 12, 'Your images may only be up to 12 pixels high.'),
|
array('MAX_IMG_HEIGHT_EXCEEDED', 12, 'Your images may only be up to 12 pixels high.'),
|
||||||
array('MAX_IMG_WIDTH_EXCEEDED', 34, 'Your images may only be up to 34 pixels wide.'),
|
array('MAX_IMG_WIDTH_EXCEEDED', 34, 'Your images may only be up to 34 pixels wide.'),
|
||||||
array('TOO_MANY_SMILIES', 3, 'Your message contains too many smilies. The maximum number of smilies allowed is 3.'),
|
array('TOO_MANY_SMILIES', 3, 'Your message contains too many smilies. The maximum number of smilies allowed is 3.'),
|
||||||
array('TOO_MANY_URLS', 2, 'Your message contains too many URLs. The maximum number of URLs allowed is 2.'),
|
array('TOO_MANY_URLS', 2, 'Your message contains too many URLs. The maximum number of URLs allowed is 2.'),
|
||||||
array('UNAUTHORISED_BBCODE', '[flash]', 'You cannot use certain BBCodes: [flash].'),
|
|
||||||
array('UNAUTHORISED_BBCODE', '[img]', 'You cannot use certain BBCodes: [img].'),
|
array('UNAUTHORISED_BBCODE', '[img]', 'You cannot use certain BBCodes: [img].'),
|
||||||
array('UNAUTHORISED_BBCODE', '[quote]', 'You cannot use certain BBCodes: [quote].'),
|
array('UNAUTHORISED_BBCODE', '[quote]', 'You cannot use certain BBCodes: [quote].'),
|
||||||
array('UNAUTHORISED_BBCODE', '[url]', 'You cannot use certain BBCodes: [url].'),
|
array('UNAUTHORISED_BBCODE', '[url]', 'You cannot use certain BBCodes: [url].'),
|
||||||
|
@ -112,7 +109,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
|
|
||||||
$this->assertSame(
|
$this->assertSame(
|
||||||
'<r>Me<I><s>[i]</s>s<e>[/i]</e></I>sage</r>',
|
'<r>Me<I><s>[i]</s>s<e>[/i]</e></I>sage</r>',
|
||||||
$message_parser->parse(true, true, true, true, true, true, true, false)
|
$message_parser->parse(true, true, true, true, true, true, false)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertSame($warn_msg, $message_parser->warn_msg);
|
$this->assertSame($warn_msg, $message_parser->warn_msg);
|
||||||
|
@ -155,23 +152,6 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
),
|
),
|
||||||
array('You cannot use certain BBCodes: [quote].')
|
array('You cannot use certain BBCodes: [quote].')
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
array(
|
|
||||||
'poll_title' => 'xxx',
|
|
||||||
'poll_option_text' => "[flash=12,34]http://example.org/x.swf[/flash]\n:)",
|
|
||||||
'poll_max_options' => 2,
|
|
||||||
'poll_options_size' => 2
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'poll_title' => '<t>xxx</t>',
|
|
||||||
'poll_option_text' => "<t>[flash=12,34]http://example.org/x.swf[/flash]</t>\n<r><E>:)</E></r>",
|
|
||||||
'poll_options' => array(
|
|
||||||
'<t>[flash=12,34]http://example.org/x.swf[/flash]</t>',
|
|
||||||
'<r><E>:)</E></r>'
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array('You cannot use certain BBCodes: [flash].')
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'poll_title' => 'xxx',
|
'poll_title' => 'xxx',
|
||||||
|
@ -211,85 +191,78 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'[b]bold[/b]',
|
'[b]bold[/b]',
|
||||||
'<r><B><s>[b]</s>bold<e>[/b]</e></B></r>',
|
'<r><B><s>[b]</s>bold<e>[/b]</e></B></r>',
|
||||||
array(true, true, true, true, true, true, true)
|
array(true, true, true, true, true, true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[b]bold[/b]',
|
'[b]bold[/b]',
|
||||||
'<t>[b]bold[/b]</t>',
|
'<t>[b]bold[/b]</t>',
|
||||||
array(false, true, true, true, true, true, true)
|
array(false, true, true, true, true, true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'http://example.org',
|
'http://example.org',
|
||||||
'<r><URL url="http://example.org">http://example.org</URL></r>',
|
'<r><URL url="http://example.org">http://example.org</URL></r>',
|
||||||
array(true, true, true, true, true, true, true)
|
array(true, true, true, true, true, true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'http://example.org',
|
'http://example.org',
|
||||||
'<t>http://example.org</t>',
|
'<t>http://example.org</t>',
|
||||||
array(true, false, true, true, true, true, true)
|
array(true, false, true, true, true, true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
':)',
|
':)',
|
||||||
'<r><E>:)</E></r>',
|
'<r><E>:)</E></r>',
|
||||||
array(true, true, true, true, true, true, true)
|
array(true, true, true, true, true, true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
':)',
|
':)',
|
||||||
'<t>:)</t>',
|
'<t>:)</t>',
|
||||||
array(true, true, false, true, true, true, true)
|
array(true, true, false, true, true, true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
||||||
'<r><URL url="http://example.org"><s>[url=http://example.org]</s><IMG src="http://example.org/img.png"><s>[img]</s>http://example.org/img.png<e>[/img]</e></IMG><e>[/url]</e></URL></r>',
|
'<r><URL url="http://example.org"><s>[url=http://example.org]</s><IMG src="http://example.org/img.png"><s>[img]</s>http://example.org/img.png<e>[/img]</e></IMG><e>[/url]</e></URL></r>',
|
||||||
array(true, true, true, true, true, true, true)
|
array(true, true, true, true, true, true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
||||||
'<r><URL url="http://example.org"><s>[url=http://example.org]</s>[img]http://example.org/img.png[/img]<e>[/url]</e></URL></r>',
|
'<r><URL url="http://example.org"><s>[url=http://example.org]</s>[img]http://example.org/img.png[/img]<e>[/url]</e></URL></r>',
|
||||||
array(true, true, true, false, true, true, true),
|
array(true, true, true, false, true, true),
|
||||||
null,
|
null,
|
||||||
array('You cannot use certain BBCodes: [img].')
|
array('You cannot use certain BBCodes: [img].')
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
'[flash=12,34]http://example.org/foo.swf[/flash]',
|
|
||||||
'<r><FLASH height="34" url="http://example.org/foo.swf" width="12"><s>[flash=12,34]</s><URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL><e>[/flash]</e></FLASH></r>',
|
|
||||||
array(true, true, true, true, true, true, true)
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
'[flash=12,34]http://example.org/foo.swf[/flash]',
|
'[flash=12,34]http://example.org/foo.swf[/flash]',
|
||||||
'<r>[flash=12,34]<URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL>[/flash]</r>',
|
'<r>[flash=12,34]<URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL>[/flash]</r>',
|
||||||
array(true, true, true, true, false, true, true),
|
array(true, true, true, true, true, true)
|
||||||
null,
|
|
||||||
array('You cannot use certain BBCodes: [flash].')
|
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[quote="foo"]bar :)[/quote]',
|
'[quote="foo"]bar :)[/quote]',
|
||||||
'<r><QUOTE author="foo"><s>[quote="foo"]</s>bar <E>:)</E><e>[/quote]</e></QUOTE></r>',
|
'<r><QUOTE author="foo"><s>[quote="foo"]</s>bar <E>:)</E><e>[/quote]</e></QUOTE></r>',
|
||||||
array(true, true, true, true, true, true, true)
|
array(true, true, true, true, true, true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[quote="foo"]bar :)[/quote]',
|
'[quote="foo"]bar :)[/quote]',
|
||||||
'<r>[quote="foo"]bar <E>:)</E>[/quote]</r>',
|
'<r>[quote="foo"]bar <E>:)</E>[/quote]</r>',
|
||||||
array(true, true, true, true, true, false, true),
|
array(true, true, true, true, false, true),
|
||||||
null,
|
null,
|
||||||
array('You cannot use certain BBCodes: [quote].')
|
array('You cannot use certain BBCodes: [quote].')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
||||||
'<r><URL url="http://example.org"><s>[url=http://example.org]</s><IMG src="http://example.org/img.png"><s>[img]</s>http://example.org/img.png<e>[/img]</e></IMG><e>[/url]</e></URL></r>',
|
'<r><URL url="http://example.org"><s>[url=http://example.org]</s><IMG src="http://example.org/img.png"><s>[img]</s>http://example.org/img.png<e>[/img]</e></IMG><e>[/url]</e></URL></r>',
|
||||||
array(true, true, true, true, true, true, true)
|
array(true, true, true, true, true, true)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
'[url=http://example.org][img]http://example.org/img.png[/img][/url]',
|
||||||
'<r>[url=http://example.org]<IMG src="http://example.org/img.png"><s>[img]</s>http://example.org/img.png<e>[/img]</e></IMG>[/url]</r>',
|
'<r>[url=http://example.org]<IMG src="http://example.org/img.png"><s>[img]</s>http://example.org/img.png<e>[/img]</e></IMG>[/url]</r>',
|
||||||
array(true, true, true, true, true, true, false),
|
array(true, true, true, true, true, false),
|
||||||
null,
|
null,
|
||||||
array('You cannot use certain BBCodes: [url].')
|
array('You cannot use certain BBCodes: [url].')
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'[size=200]200[/size]',
|
'[size=200]200[/size]',
|
||||||
'<r><SIZE size="200"><s>[size=200]</s>200<e>[/size]</e></SIZE></r>',
|
'<r><SIZE size="200"><s>[size=200]</s>200<e>[/size]</e></SIZE></r>',
|
||||||
array(true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_font_size', 200);
|
$phpbb_container->get('config')->set('max_post_font_size', 200);
|
||||||
|
@ -298,7 +271,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'[size=200]200[/size]',
|
'[size=200]200[/size]',
|
||||||
'<r><SIZE size="200"><s>[size=200]</s>200<e>[/size]</e></SIZE></r>',
|
'<r><SIZE size="200"><s>[size=200]</s>200<e>[/size]</e></SIZE></r>',
|
||||||
array(true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_font_size', 0);
|
$phpbb_container->get('config')->set('max_post_font_size', 0);
|
||||||
|
@ -307,7 +280,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'[size=2000]2000[/size]',
|
'[size=2000]2000[/size]',
|
||||||
'<t>[size=2000]2000[/size]</t>',
|
'<t>[size=2000]2000[/size]</t>',
|
||||||
array(true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_font_size', 200);
|
$phpbb_container->get('config')->set('max_post_font_size', 200);
|
||||||
|
@ -317,7 +290,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'[size=0]0[/size]',
|
'[size=0]0[/size]',
|
||||||
'<t>[size=0]0[/size]</t>',
|
'<t>[size=0]0[/size]</t>',
|
||||||
array(true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_font_size', 200);
|
$phpbb_container->get('config')->set('max_post_font_size', 200);
|
||||||
|
@ -326,7 +299,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'[size=200]200[/size]',
|
'[size=200]200[/size]',
|
||||||
'<r><SIZE size="200"><s>[size=200]</s>200<e>[/size]</e></SIZE></r>',
|
'<r><SIZE size="200"><s>[size=200]</s>200<e>[/size]</e></SIZE></r>',
|
||||||
array(true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_sig_font_size', 200);
|
$phpbb_container->get('config')->set('max_sig_font_size', 200);
|
||||||
|
@ -335,7 +308,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'[size=200]200[/size]',
|
'[size=200]200[/size]',
|
||||||
'<t>[size=200]200[/size]</t>',
|
'<t>[size=200]200[/size]</t>',
|
||||||
array(true, true, true, true, true, true, true, true, 'sig'),
|
array(true, true, true, true, true, true, true, 'sig'),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_sig_font_size', 120);
|
$phpbb_container->get('config')->set('max_sig_font_size', 120);
|
||||||
|
@ -345,7 +318,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'[img]http://example.org/100x100.png[/img]',
|
'[img]http://example.org/100x100.png[/img]',
|
||||||
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
|
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
|
||||||
array(true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_img_height', 0);
|
$phpbb_container->get('config')->set('max_post_img_height', 0);
|
||||||
|
@ -355,7 +328,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'[img]http://example.org/100x100.png[/img]',
|
'[img]http://example.org/100x100.png[/img]',
|
||||||
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
|
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
|
||||||
array(true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_img_height', 100);
|
$phpbb_container->get('config')->set('max_post_img_height', 100);
|
||||||
|
@ -365,37 +338,17 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'[img]http://example.org/100x100.png[/img]',
|
'[img]http://example.org/100x100.png[/img]',
|
||||||
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
|
'<r><IMG src="http://example.org/100x100.png"><s>[img]</s><URL url="http://example.org/100x100.png">http://example.org/100x100.png</URL><e>[/img]</e></IMG></r>',
|
||||||
array(true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_sig_img_height', 12);
|
$phpbb_container->get('config')->set('max_sig_img_height', 12);
|
||||||
$phpbb_container->get('config')->set('max_sig_img_width', 34);
|
$phpbb_container->get('config')->set('max_sig_img_width', 34);
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
'[flash=999,999]http://example.org/foo.swf[/flash]',
|
|
||||||
'<r>[flash=999,999]<URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL>[/flash]</r>',
|
|
||||||
array(true, true, true, true, true, true, true),
|
|
||||||
function ($phpbb_container)
|
|
||||||
{
|
|
||||||
$phpbb_container->get('config')->set('max_post_img_height', 123);
|
|
||||||
},
|
|
||||||
array('Your flash files may only be up to 123 pixels high.')
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'[flash=999,999]http://example.org/foo.swf[/flash]',
|
|
||||||
'<r>[flash=999,999]<URL url="http://example.org/foo.swf">http://example.org/foo.swf</URL>[/flash]</r>',
|
|
||||||
array(true, true, true, true, true, true, true),
|
|
||||||
function ($phpbb_container)
|
|
||||||
{
|
|
||||||
$phpbb_container->get('config')->set('max_post_img_width', 456);
|
|
||||||
},
|
|
||||||
array('Your flash files may only be up to 456 pixels wide.')
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
':) :) :)',
|
':) :) :)',
|
||||||
'<r><E>:)</E> <E>:)</E> <E>:)</E></r>',
|
'<r><E>:)</E> <E>:)</E> <E>:)</E></r>',
|
||||||
array(true, true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_smilies', 3);
|
$phpbb_container->get('config')->set('max_post_smilies', 3);
|
||||||
|
@ -404,7 +357,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
':) :) :) :)',
|
':) :) :) :)',
|
||||||
'<r><E>:)</E> <E>:)</E> <E>:)</E> :)</r>',
|
'<r><E>:)</E> <E>:)</E> <E>:)</E> :)</r>',
|
||||||
array(true, true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_smilies', 3);
|
$phpbb_container->get('config')->set('max_post_smilies', 3);
|
||||||
|
@ -414,7 +367,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
':) :) :) :)',
|
':) :) :) :)',
|
||||||
'<r><E>:)</E> <E>:)</E> <E>:)</E> <E>:)</E></r>',
|
'<r><E>:)</E> <E>:)</E> <E>:)</E> <E>:)</E></r>',
|
||||||
array(true, true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_smilies', 0);
|
$phpbb_container->get('config')->set('max_post_smilies', 0);
|
||||||
|
@ -423,7 +376,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
':) :) :) :)',
|
':) :) :) :)',
|
||||||
'<r><E>:)</E> <E>:)</E> <E>:)</E> <E>:)</E></r>',
|
'<r><E>:)</E> <E>:)</E> <E>:)</E> <E>:)</E></r>',
|
||||||
array(true, true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_sig_smilies', 3);
|
$phpbb_container->get('config')->set('max_sig_smilies', 3);
|
||||||
|
@ -432,7 +385,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
':) :) :) :)',
|
':) :) :) :)',
|
||||||
'<r><E>:)</E> <E>:)</E> <E>:)</E> :)</r>',
|
'<r><E>:)</E> <E>:)</E> <E>:)</E> :)</r>',
|
||||||
array(true, true, true, true, true, true, true, true, 'sig'),
|
array(true, true, true, true, true, true, true, 'sig'),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_sig_smilies', 3);
|
$phpbb_container->get('config')->set('max_sig_smilies', 3);
|
||||||
|
@ -442,7 +395,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'http://example.org http://example.org http://example.org',
|
'http://example.org http://example.org http://example.org',
|
||||||
'<r><URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL> http://example.org</r>',
|
'<r><URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL> http://example.org</r>',
|
||||||
array(true, true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_urls', 2);
|
$phpbb_container->get('config')->set('max_post_urls', 2);
|
||||||
|
@ -452,7 +405,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'http://example.org http://example.org http://example.org',
|
'http://example.org http://example.org http://example.org',
|
||||||
'<r><URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL></r>',
|
'<r><URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL></r>',
|
||||||
array(true, true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_post_urls', 0);
|
$phpbb_container->get('config')->set('max_post_urls', 0);
|
||||||
|
@ -461,7 +414,7 @@ class phpbb_text_processing_message_parser_test extends phpbb_test_case
|
||||||
array(
|
array(
|
||||||
'http://example.org http://example.org http://example.org',
|
'http://example.org http://example.org http://example.org',
|
||||||
'<r><URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL></r>',
|
'<r><URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL> <URL url="http://example.org">http://example.org</URL></r>',
|
||||||
array(true, true, true, true, true, true, true, true),
|
array(true, true, true, true, true, true, true),
|
||||||
function ($phpbb_container)
|
function ($phpbb_container)
|
||||||
{
|
{
|
||||||
$phpbb_container->get('config')->set('max_sig_urls', 2);
|
$phpbb_container->get('config')->set('max_sig_urls', 2);
|
||||||
|
|
|
@ -117,20 +117,6 @@ abstract class phpbb_textreparser_test_row_based_plugin extends phpbb_database_t
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array(
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
array(
|
|
||||||
array(
|
|
||||||
'id' => '6',
|
|
||||||
'text' => '<r><FLASH height="345" url="http://example.org/flash.swf" width="123"><s>[flash=123,345]</s>http://example.org/flash.swf<e>[/flash]</e></FLASH></r>',
|
|
||||||
),
|
|
||||||
array(
|
|
||||||
'id' => '7',
|
|
||||||
'text' => '<t>[flash=123,345]http://example.org/flash.swf[/flash]</t>',
|
|
||||||
),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
array(
|
array(
|
||||||
8,
|
8,
|
||||||
9,
|
9,
|
||||||
|
|
Loading…
Add table
Reference in a new issue