mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-16 05:34:01 +02:00
[ticket/16955] Clean up textformatter and textreparser
PHPBB3-16955
This commit is contained in:
@@ -243,7 +243,8 @@ abstract class base implements reparser_interface
|
||||
// generate_text_for_edit() and decode_message() actually return the text as HTML. It has to
|
||||
// be decoded to plain text before it can be reparsed
|
||||
$text = html_entity_decode($unparsed['text'], ENT_QUOTES, 'UTF-8');
|
||||
$bitfield = $flags = null;
|
||||
$bitfield = '';
|
||||
$flags = 0;
|
||||
generate_text_for_storage(
|
||||
$text,
|
||||
$unparsed['bbcode_uid'],
|
||||
|
@@ -132,9 +132,9 @@ class manager
|
||||
* If there is no reparser with the specified name, null is returned.
|
||||
*
|
||||
* @param string $name Name of the reparser to look up.
|
||||
* @return string A reparser service name, or null.
|
||||
* @return string|null A reparser service name, or null.
|
||||
*/
|
||||
public function find_reparser($name)
|
||||
public function find_reparser(string $name)
|
||||
{
|
||||
foreach ($this->reparsers as $service => $reparser)
|
||||
{
|
||||
|
@@ -24,21 +24,21 @@ class user_signature extends \phpbb\textreparser\row_based_plugin
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function add_missing_fields(array $row)
|
||||
protected function add_missing_fields(array $record)
|
||||
{
|
||||
if (!isset($this->keyoptions))
|
||||
{
|
||||
$this->save_keyoptions();
|
||||
}
|
||||
|
||||
$options = $row['user_options'];
|
||||
$row += array(
|
||||
$options = $record['user_options'];
|
||||
$record += array(
|
||||
'enable_bbcode' => phpbb_optionget($this->keyoptions['sig_bbcode'], $options),
|
||||
'enable_smilies' => phpbb_optionget($this->keyoptions['sig_smilies'], $options),
|
||||
'enable_magic_url' => phpbb_optionget($this->keyoptions['sig_links'], $options),
|
||||
);
|
||||
|
||||
return parent::add_missing_fields($row);
|
||||
return parent::add_missing_fields($record);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user