aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textreparser
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/textreparser')
-rw-r--r--phpBB/phpbb/textreparser/plugins/user_signature.php27
1 files changed, 15 insertions, 12 deletions
diff --git a/phpBB/phpbb/textreparser/plugins/user_signature.php b/phpBB/phpbb/textreparser/plugins/user_signature.php
index db82d4089b..f657a45d38 100644
--- a/phpBB/phpbb/textreparser/plugins/user_signature.php
+++ b/phpBB/phpbb/textreparser/plugins/user_signature.php
@@ -22,21 +22,15 @@ class user_signature extends \phpbb\textreparser\row_based_plugin
protected $keyoptions;
/**
- * Constructor
- *
- * Retrieves and saves the bit numbers used for user options
- */
- public function __construct()
- {
- $class_vars = get_class_vars('phpbb\\user');
- $this->keyoptions = $class_vars['keyoptions'];
- }
-
- /**
* {@inheritdoc}
*/
protected function add_missing_fields(array $row)
{
+ if (!isset($this->keyoptions))
+ {
+ $this->save_keyoptions();
+ }
+
$options = $row['user_options'];
$row += array(
'enable_bbcode' => phpbb_optionget($this->keyoptions['sig_bbcode'], $options),
@@ -44,7 +38,7 @@ class user_signature extends \phpbb\textreparser\row_based_plugin
'enable_magic_url' => phpbb_optionget($this->keyoptions['sig_links'], $options),
);
- return $row;
+ return parent::add_missing_fields($row);
}
/**
@@ -67,4 +61,13 @@ class user_signature extends \phpbb\textreparser\row_based_plugin
{
return USERS_TABLE;
}
+
+ /**
+ * Save the keyoptions var from \phpbb\user
+ */
+ protected function save_keyoptions()
+ {
+ $class_vars = get_class_vars('phpbb\\user');
+ $this->keyoptions = $class_vars['keyoptions'];
+ }
}