diff --git a/Upload/inc/plugins/htmlposts.php b/Upload/inc/plugins/htmlposts.php
index b447279..1a74708 100644
--- a/Upload/inc/plugins/htmlposts.php
+++ b/Upload/inc/plugins/htmlposts.php
@@ -202,40 +202,41 @@ function htmlposts_parse(&$message)
}
// Create a new class to control the parser options easily
- if (!class_exists("control_html"))
- {
- class control_html
- {
- public $html_enabled;
-
- function control_html()
- {
- // Is it enabled already? Save it in a var to later disallow disabling
- $this->html_enabled = $parser->options['allow_html'];
- }
-
- function set_html($status)
- {
- $status = (int)$status;
- if ($status != 0 && $status != 1) return false;
-
- // if we're trying to disable it but it's enabled by default, disallow the action
- if ($status == 0 && $this->html_enabled == 1)
- return false;
-
- global $parser;
-
- // Set to desired status
- $parser->options['allow_html'] = $status;
- // for previewing posts
- global $parser_options;
- if (!empty($parser_options))
- $parser_options['allow_html'] = $status;
-
- return true;
- }
- }
- }
+ if (!class_exists("control_html"))
+ {
+ class control_html
+ {
+ public $html_enabled;
+
+ function __construct()
+ {
+ // Is it enabled already? Save it in a var to later disallow disabling
+ global $parser;
+ $this->html_enabled = $parser->options['allow_html'];
+ }
+
+ function set_html($status)
+ {
+ $status = (int)$status;
+ if ($status != 0 && $status != 1) return false;
+
+ // if we're trying to disable it but it's enabled by default, disallow the action
+ if ($status == 0 && $this->html_enabled == 1)
+ return false;
+
+ global $parser;
+
+ // Set to desired status
+ $parser->options['allow_html'] = $status;
+ // for previewing posts
+ global $parser_options;
+ if (!empty($parser_options))
+ $parser_options['allow_html'] = $status;
+
+ return true;
+ }
+ }
+ }
// Create object if it doesn't exist
if (!is_object($control_html))