@@ -30,10 +30,10 @@ |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | /** Returns the filename of the file. */ |
33 | - public function getName() {return $this->name;} |
|
33 | + public function getName() {return $this->name; } |
|
34 | 34 | |
35 | 35 | /** Returns directory of the file without trailing slash */ |
36 | - public function getDirectory() {return $this->fs->dirname($this->name);} |
|
36 | + public function getDirectory() {return $this->fs->dirname($this->name); } |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * Retrieves the contents of a file |
@@ -81,7 +81,9 @@ discard block |
||
81 | 81 | /** Opens file's handle */ |
82 | 82 | public function open($mode) |
83 | 83 | { |
84 | - if ($this->handle) $this->close(); |
|
84 | + if ($this->handle) { |
|
85 | + $this->close(); |
|
86 | + } |
|
85 | 87 | $this->handle = $this->fs->fopen($this->name, $mode); |
86 | 88 | return true; |
87 | 89 | } |
@@ -89,7 +91,9 @@ discard block |
||
89 | 91 | /** Closes file's handle */ |
90 | 92 | public function close() |
91 | 93 | { |
92 | - if (!$this->handle) return false; |
|
94 | + if (!$this->handle) { |
|
95 | + return false; |
|
96 | + } |
|
93 | 97 | $status = $this->fs->fclose($this->handle); |
94 | 98 | $this->handle = false; |
95 | 99 | return $status; |
@@ -98,42 +102,57 @@ discard block |
||
98 | 102 | /** Retrieves a line from an open file, with optional max length $length */ |
99 | 103 | public function getLine($length = null) |
100 | 104 | { |
101 | - if (!$this->handle) $this->open('r'); |
|
102 | - if ($length === null) return $this->fs->fgets($this->handle); |
|
103 | - else return $this->fs->fgets($this->handle, $length); |
|
105 | + if (!$this->handle) { |
|
106 | + $this->open('r'); |
|
107 | + } |
|
108 | + if ($length === null) { |
|
109 | + return $this->fs->fgets($this->handle); |
|
110 | + } else { |
|
111 | + return $this->fs->fgets($this->handle, $length); |
|
112 | + } |
|
104 | 113 | } |
105 | 114 | |
106 | 115 | /** Retrieves a character from an open file */ |
107 | 116 | public function getChar() |
108 | 117 | { |
109 | - if (!$this->handle) $this->open('r'); |
|
118 | + if (!$this->handle) { |
|
119 | + $this->open('r'); |
|
120 | + } |
|
110 | 121 | return $this->fs->fgetc($this->handle); |
111 | 122 | } |
112 | 123 | |
113 | 124 | /** Retrieves an $length bytes of data from an open data */ |
114 | 125 | public function read($length) |
115 | 126 | { |
116 | - if (!$this->handle) $this->open('r'); |
|
127 | + if (!$this->handle) { |
|
128 | + $this->open('r'); |
|
129 | + } |
|
117 | 130 | return $this->fs->fread($this->handle, $length); |
118 | 131 | } |
119 | 132 | |
120 | 133 | /** Writes to an open file */ |
121 | 134 | public function put($string) |
122 | 135 | { |
123 | - if (!$this->handle) $this->open('a'); |
|
136 | + if (!$this->handle) { |
|
137 | + $this->open('a'); |
|
138 | + } |
|
124 | 139 | return $this->fs->fwrite($this->handle, $string); |
125 | 140 | } |
126 | 141 | |
127 | 142 | /** Returns TRUE if the end of the file has been reached */ |
128 | 143 | public function eof() |
129 | 144 | { |
130 | - if (!$this->handle) return true; |
|
145 | + if (!$this->handle) { |
|
146 | + return true; |
|
147 | + } |
|
131 | 148 | return $this->fs->feof($this->handle); |
132 | 149 | } |
133 | 150 | |
134 | 151 | public function __destruct() |
135 | 152 | { |
136 | - if ($this->handle) $this->close(); |
|
153 | + if ($this->handle) { |
|
154 | + $this->close(); |
|
155 | + } |
|
137 | 156 | } |
138 | 157 | |
139 | 158 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | * This is a stub include that automatically configures the include path. |
5 | 5 | */ |
6 | 6 | |
7 | -set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() ); |
|
7 | +set_include_path(dirname(__FILE__).PATH_SEPARATOR.get_include_path()); |
|
8 | 8 | require_once 'HTMLPurifierExtras.php'; |
9 | 9 | require_once 'HTMLPurifierExtras.autoload.php'; |
10 | 10 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | ) return false; |
24 | 24 | // Custom implementations can go here |
25 | 25 | // Standard implementation: |
26 | - return str_replace('_', '/', $class) . '.php'; |
|
26 | + return str_replace('_', '/', $class).'.php'; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | } |
@@ -10,7 +10,9 @@ discard block |
||
10 | 10 | public static function autoload($class) |
11 | 11 | { |
12 | 12 | $path = HTMLPurifierExtras::getPath($class); |
13 | - if (!$path) return false; |
|
13 | + if (!$path) { |
|
14 | + return false; |
|
15 | + } |
|
14 | 16 | require $path; |
15 | 17 | return true; |
16 | 18 | } |
@@ -20,7 +22,9 @@ discard block |
||
20 | 22 | if ( |
21 | 23 | strncmp('FSTools', $class, 7) !== 0 && |
22 | 24 | strncmp('ConfigDoc', $class, 9) !== 0 |
23 | - ) return false; |
|
25 | + ) { |
|
26 | + return false; |
|
27 | + } |
|
24 | 28 | // Custom implementations can go here |
25 | 29 | // Standard implementation: |
26 | 30 | return str_replace('_', '/', $class) . '.php'; |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | { |
40 | 40 | $folders = preg_split("#[\\\\/]#", $folder); |
41 | 41 | $base = ''; |
42 | - for($i = 0, $c = count($folders); $i < $c; $i++) { |
|
43 | - if(empty($folders[$i])) { |
|
42 | + for ($i = 0, $c = count($folders); $i < $c; $i++) { |
|
43 | + if (empty($folders[$i])) { |
|
44 | 44 | if (!$i) { |
45 | 45 | // special case for root level |
46 | 46 | $base .= DIRECTORY_SEPARATOR; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | continue; |
49 | 49 | } |
50 | 50 | $base .= $folders[$i]; |
51 | - if(!is_dir($base)){ |
|
51 | + if (!is_dir($base)) { |
|
52 | 52 | $this->mkdir($base); |
53 | 53 | } |
54 | 54 | $base .= DIRECTORY_SEPARATOR; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | // Loop through the folder |
74 | 74 | $dir = $this->dir($source); |
75 | - while ( false !== ($entry = $dir->read()) ) { |
|
75 | + while (false !== ($entry = $dir->read())) { |
|
76 | 76 | // Skip pointers |
77 | 77 | if ($entry == '.' || $entry == '..') { |
78 | 78 | continue; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | continue; |
126 | 126 | } |
127 | 127 | // Recurse |
128 | - $this->rmdirr($dirname . DIRECTORY_SEPARATOR . $entry); |
|
128 | + $this->rmdirr($dirname.DIRECTORY_SEPARATOR.$entry); |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | // Clean up |
@@ -17,7 +17,9 @@ discard block |
||
17 | 17 | */ |
18 | 18 | public static function singleton() |
19 | 19 | { |
20 | - if (empty(FSTools::$singleton)) FSTools::$singleton = new FSTools(); |
|
20 | + if (empty(FSTools::$singleton)) { |
|
21 | + FSTools::$singleton = new FSTools(); |
|
22 | + } |
|
21 | 23 | return FSTools::$singleton; |
22 | 24 | } |
23 | 25 | |
@@ -139,9 +141,13 @@ discard block |
||
139 | 141 | public function globr($dir, $pattern, $flags = NULL) |
140 | 142 | { |
141 | 143 | $files = $this->glob("$dir/$pattern", $flags); |
142 | - if ($files === false) $files = array(); |
|
144 | + if ($files === false) { |
|
145 | + $files = array(); |
|
146 | + } |
|
143 | 147 | $sub_dirs = $this->glob("$dir/*", GLOB_ONLYDIR); |
144 | - if ($sub_dirs === false) $sub_dirs = array(); |
|
148 | + if ($sub_dirs === false) { |
|
149 | + $sub_dirs = array(); |
|
150 | + } |
|
145 | 151 | foreach ($sub_dirs as $sub_dir) { |
146 | 152 | $sub_files = $this->globr($sub_dir, $pattern, $flags); |
147 | 153 | $files = array_merge($files, $sub_files); |
@@ -131,10 +131,10 @@ discard block |
||
131 | 131 | $phorum_sig = ''; |
132 | 132 | if(isset($row["user"]["signature"]) |
133 | 133 | && isset($row['meta']['show_signature']) && $row['meta']['show_signature']==1){ |
134 | - $phorum_sig=trim($row["user"]["signature"]); |
|
135 | - if(!empty($phorum_sig)){ |
|
136 | - $phorum_sig="\n\n$phorum_sig"; |
|
137 | - } |
|
134 | + $phorum_sig=trim($row["user"]["signature"]); |
|
135 | + if(!empty($phorum_sig)){ |
|
136 | + $phorum_sig="\n\n$phorum_sig"; |
|
137 | + } |
|
138 | 138 | } |
139 | 139 | return $phorum_sig; |
140 | 140 | } |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | if (!empty($GLOBALS['PHORUM']['mod_htmlpurifier']['wysiwyg'])) { |
262 | 262 | $i = $GLOBALS['PHORUM']['DATA']['MODE']; |
263 | 263 | if ($i == 'quote' || $i == 'edit' || $i == 'moderation') { |
264 | - ?> |
|
264 | + ?> |
|
265 | 265 | <div> |
266 | 266 | <p> |
267 | 267 | <strong>Notice:</strong> HTML has been scrubbed for your safety. |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | { |
33 | 33 | $PHORUM = $GLOBALS["PHORUM"]; |
34 | 34 | |
35 | - $purifier =& HTMLPurifier::getInstance(); |
|
35 | + $purifier = & HTMLPurifier::getInstance(); |
|
36 | 36 | $cache_serial = $PHORUM['mod_htmlpurifier']['body_cache_serial']; |
37 | 37 | |
38 | - foreach($data as $message_id => $message){ |
|
39 | - if(isset($message['body'])) { |
|
38 | + foreach ($data as $message_id => $message) { |
|
39 | + if (isset($message['body'])) { |
|
40 | 40 | |
41 | 41 | if ($message_id) { |
42 | 42 | // we're dealing with a real message, not a fake, so |
@@ -82,16 +82,16 @@ discard block |
||
82 | 82 | $body = $fake_data[$message_id]['body']; |
83 | 83 | $body = str_replace("<phorum break>\n", "\n", $body); |
84 | 84 | $updated_message['body'] = $body; // save it in |
85 | - $body .= $signature . $edit_message; // add it back in |
|
85 | + $body .= $signature.$edit_message; // add it back in |
|
86 | 86 | } else { |
87 | 87 | // reverse Phorum's pre-processing |
88 | 88 | $body = $message['body']; |
89 | 89 | // order is important |
90 | 90 | $body = str_replace("<phorum break>\n", "\n", $body); |
91 | - $body = str_replace(array('<','>','&', '"'), array('<','>','&','"'), $body); |
|
91 | + $body = str_replace(array('<', '>', '&', '"'), array('<', '>', '&', '"'), $body); |
|
92 | 92 | if (!$message_id && defined('PHORUM_CONTROL_CENTER')) { |
93 | 93 | // we're in control.php, so it was double-escaped |
94 | - $body = str_replace(array('<','>','&', '"'), array('<','>','&','"'), $body); |
|
94 | + $body = str_replace(array('<', '>', '&', '"'), array('<', '>', '&', '"'), $body); |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | |
@@ -129,11 +129,11 @@ discard block |
||
129 | 129 | function phorum_htmlpurifier_generate_sig($row) |
130 | 130 | { |
131 | 131 | $phorum_sig = ''; |
132 | - if(isset($row["user"]["signature"]) |
|
133 | - && isset($row['meta']['show_signature']) && $row['meta']['show_signature']==1){ |
|
134 | - $phorum_sig=trim($row["user"]["signature"]); |
|
135 | - if(!empty($phorum_sig)){ |
|
136 | - $phorum_sig="\n\n$phorum_sig"; |
|
132 | + if (isset($row["user"]["signature"]) |
|
133 | + && isset($row['meta']['show_signature']) && $row['meta']['show_signature'] == 1) { |
|
134 | + $phorum_sig = trim($row["user"]["signature"]); |
|
135 | + if (!empty($phorum_sig)) { |
|
136 | + $phorum_sig = "\n\n$phorum_sig"; |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | return $phorum_sig; |
@@ -146,10 +146,10 @@ discard block |
||
146 | 146 | { |
147 | 147 | $PHORUM = $GLOBALS['PHORUM']; |
148 | 148 | $editmessage = ''; |
149 | - if(isset($row['meta']['edit_count']) && $row['meta']['edit_count'] > 0) { |
|
150 | - $editmessage = str_replace ("%count%", $row['meta']['edit_count'], $PHORUM["DATA"]["LANG"]["EditedMessage"]); |
|
151 | - $editmessage = str_replace ("%lastedit%", phorum_date($PHORUM["short_date_time"],$row['meta']['edit_date']), $editmessage); |
|
152 | - $editmessage = str_replace ("%lastuser%", $row['meta']['edit_username'], $editmessage); |
|
149 | + if (isset($row['meta']['edit_count']) && $row['meta']['edit_count'] > 0) { |
|
150 | + $editmessage = str_replace("%count%", $row['meta']['edit_count'], $PHORUM["DATA"]["LANG"]["EditedMessage"]); |
|
151 | + $editmessage = str_replace("%lastedit%", phorum_date($PHORUM["short_date_time"], $row['meta']['edit_date']), $editmessage); |
|
152 | + $editmessage = str_replace("%lastuser%", $row['meta']['edit_username'], $editmessage); |
|
153 | 153 | $editmessage = "\n\n\n\n$editmessage"; |
154 | 154 | } |
155 | 155 | return $editmessage; |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | function phorum_htmlpurifier_quote($array) |
196 | 196 | { |
197 | 197 | $PHORUM = $GLOBALS["PHORUM"]; |
198 | - $purifier =& HTMLPurifier::getInstance(); |
|
198 | + $purifier = & HTMLPurifier::getInstance(); |
|
199 | 199 | $text = $purifier->purify($array[1]); |
200 | 200 | $source = htmlspecialchars($array[0]); |
201 | 201 | return "<blockquote cite=\"$source\">\n$text\n</blockquote>"; |
@@ -217,8 +217,8 @@ discard block |
||
217 | 217 | $GLOBALS['PHORUM']['mod_htmlpurifier']['body_cache_serial'] = $config->getSerial(); |
218 | 218 | |
219 | 219 | // load migration |
220 | - if (file_exists(dirname(__FILE__) . '/migrate.php')) { |
|
221 | - include(dirname(__FILE__) . '/migrate.php'); |
|
220 | + if (file_exists(dirname(__FILE__).'/migrate.php')) { |
|
221 | + include(dirname(__FILE__).'/migrate.php'); |
|
222 | 222 | } else { |
223 | 223 | echo '<strong>Error:</strong> No migration path specified for HTML Purifier, please check |
224 | 224 | <tt>modes/htmlpurifier/migrate.bbcode.php</tt> for instructions on |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | if (!function_exists('phorum_htmlpurifier_migrate')) { |
230 | 230 | // Dummy function |
231 | - function phorum_htmlpurifier_migrate($data) {return $data;} |
|
231 | + function phorum_htmlpurifier_migrate($data) {return $data; } |
|
232 | 232 | } |
233 | 233 | |
234 | 234 | } |
@@ -243,8 +243,8 @@ discard block |
||
243 | 243 | if (!empty($message['body'])) { |
244 | 244 | $body = $message['body']; |
245 | 245 | // de-entity-ize contents |
246 | - $body = str_replace(array('<','>','&'), array('<','>','&'), $body); |
|
247 | - $purifier =& HTMLPurifier::getInstance(); |
|
246 | + $body = str_replace(array('<', '>', '&'), array('<', '>', '&'), $body); |
|
247 | + $purifier = & HTMLPurifier::getInstance(); |
|
248 | 248 | $body = $purifier->purify($body); |
249 | 249 | // re-entity-ize contents |
250 | 250 | $body = htmlspecialchars($body, ENT_QUOTES, $GLOBALS['PHORUM']['DATA']['CHARSET']); |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | <strong>HTML input</strong> is enabled. Make sure you escape all HTML and |
280 | 280 | angled brackets with <code>&lt;</code> and <code>&gt;</code>. |
281 | 281 | </p><?php |
282 | - $purifier =& HTMLPurifier::getInstance(); |
|
282 | + $purifier = & HTMLPurifier::getInstance(); |
|
283 | 283 | $config = $purifier->config; |
284 | 284 | if ($config->get('AutoFormat.AutoParagraph')) { |
285 | 285 | ?><p> |
@@ -169,8 +169,12 @@ discard block |
||
169 | 169 | $replacements = array(); |
170 | 170 | // we need to remove add <phorum break> as that is the form these |
171 | 171 | // extra bits are in. |
172 | - if ($signature) $replacements[str_replace("\n", "<phorum break>\n", $signature)] = ''; |
|
173 | - if ($editmessage) $replacements[str_replace("\n", "<phorum break>\n", $editmessage)] = ''; |
|
172 | + if ($signature) { |
|
173 | + $replacements[str_replace("\n", "<phorum break>\n", $signature)] = ''; |
|
174 | + } |
|
175 | + if ($editmessage) { |
|
176 | + $replacements[str_replace("\n", "<phorum break>\n", $editmessage)] = ''; |
|
177 | + } |
|
174 | 178 | $row['body'] = strtr($row['body'], $replacements); |
175 | 179 | return array($signature, $editmessage); |
176 | 180 | } |
@@ -273,7 +277,9 @@ discard block |
||
273 | 277 | } |
274 | 278 | return; |
275 | 279 | } |
276 | - if (!empty($GLOBALS['PHORUM']['mod_htmlpurifier']['suppress_message'])) return; |
|
280 | + if (!empty($GLOBALS['PHORUM']['mod_htmlpurifier']['suppress_message'])) { |
|
281 | + return; |
|
282 | + } |
|
277 | 283 | ?><div class="htmlpurifier-help"> |
278 | 284 | <p> |
279 | 285 | <strong>HTML input</strong> is enabled. Make sure you escape all HTML and |
@@ -290,7 +296,9 @@ discard block |
||
290 | 296 | } |
291 | 297 | $html_definition = $config->getDefinition('HTML'); |
292 | 298 | $allowed = array(); |
293 | - foreach ($html_definition->info as $name => $x) $allowed[] = "<code>$name</code>"; |
|
299 | + foreach ($html_definition->info as $name => $x) { |
|
300 | + $allowed[] = "<code>$name</code>"; |
|
301 | + } |
|
294 | 302 | sort($allowed); |
295 | 303 | $allowed_text = implode(', ', $allowed); |
296 | 304 | ?><p><strong>Allowed tags:</strong> <?php |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | |
5 | 5 | // default HTML Purifier configuration settings |
6 | 6 | $config->set('HTML.Allowed', |
7 | - // alphabetically sorted |
|
7 | + // alphabetically sorted |
|
8 | 8 | 'a[href|title] |
9 | 9 | abbr[title] |
10 | 10 | acronym[title] |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $config->set('Core.AggressivelyFixLt', true); |
52 | 52 | $config->set('Core.Encoding', $GLOBALS['PHORUM']['DATA']['CHARSET']); // we'll change this eventually |
53 | 53 | if (strtolower($GLOBALS['PHORUM']['DATA']['CHARSET']) !== 'utf-8') { |
54 | - $config->set('Core.EscapeNonASCIICharacters', true); |
|
54 | + $config->set('Core.EscapeNonASCIICharacters', true); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | // vim: et sw=4 sts=4 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if(!defined("PHORUM")) exit; |
|
3 | +if (!defined("PHORUM")) exit; |
|
4 | 4 | |
5 | 5 | // default HTML Purifier configuration settings |
6 | 6 | $config->set('HTML.Allowed', |
@@ -1,6 +1,8 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if(!defined("PHORUM")) exit; |
|
3 | +if(!defined("PHORUM")) { |
|
4 | + exit; |
|
5 | +} |
|
4 | 6 | |
5 | 7 | // default HTML Purifier configuration settings |
6 | 8 | $config->set('HTML.Allowed', |
@@ -9,19 +9,19 @@ discard block |
||
9 | 9 | * by creating a 'config.php' file. |
10 | 10 | */ |
11 | 11 | |
12 | -if(!defined("PHORUM_ADMIN")) exit; |
|
12 | +if (!defined("PHORUM_ADMIN")) exit; |
|
13 | 13 | |
14 | 14 | // error reporting is good! |
15 | 15 | error_reporting(E_ALL ^ E_NOTICE); |
16 | 16 | |
17 | 17 | // load library and other paraphenalia |
18 | 18 | require_once './include/admin/PhorumInputForm.php'; |
19 | -require_once (dirname(__FILE__) . '/htmlpurifier/HTMLPurifier.auto.php'); |
|
20 | -require_once (dirname(__FILE__) . '/init-config.php'); |
|
21 | -require_once (dirname(__FILE__) . '/settings/migrate-sigs-form.php'); |
|
22 | -require_once (dirname(__FILE__) . '/settings/migrate-sigs.php'); |
|
23 | -require_once (dirname(__FILE__) . '/settings/form.php'); |
|
24 | -require_once (dirname(__FILE__) . '/settings/save.php'); |
|
19 | +require_once (dirname(__FILE__).'/htmlpurifier/HTMLPurifier.auto.php'); |
|
20 | +require_once (dirname(__FILE__).'/init-config.php'); |
|
21 | +require_once (dirname(__FILE__).'/settings/migrate-sigs-form.php'); |
|
22 | +require_once (dirname(__FILE__).'/settings/migrate-sigs.php'); |
|
23 | +require_once (dirname(__FILE__).'/settings/form.php'); |
|
24 | +require_once (dirname(__FILE__).'/settings/save.php'); |
|
25 | 25 | |
26 | 26 | // define friendly configuration directives. you can expand this array |
27 | 27 | // to get more web-definable directives |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | if ($offset = phorum_htmlpurifier_migrate_sigs_check()) { |
53 | 53 | // migrate signatures |
54 | 54 | phorum_htmlpurifier_migrate_sigs($offset); |
55 | -} elseif(!empty($_POST)){ |
|
55 | +} elseif (!empty($_POST)) { |
|
56 | 56 | // save settings |
57 | 57 | phorum_htmlpurifier_save_settings(); |
58 | 58 | } |
@@ -9,7 +9,9 @@ |
||
9 | 9 | * by creating a 'config.php' file. |
10 | 10 | */ |
11 | 11 | |
12 | -if(!defined("PHORUM_ADMIN")) exit; |
|
12 | +if(!defined("PHORUM_ADMIN")) { |
|
13 | + exit; |
|
14 | +} |
|
13 | 15 | |
14 | 16 | // error reporting is good! |
15 | 17 | error_reporting(E_ALL ^ E_NOTICE); |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | $config_exists = phorum_htmlpurifier_config_file_exists(); |
12 | 12 | if ($default || $config_exists || !isset($PHORUM['mod_htmlpurifier']['config'])) { |
13 | 13 | $config = HTMLPurifier_Config::createDefault(); |
14 | - include(dirname(__FILE__) . '/config.default.php'); |
|
14 | + include(dirname(__FILE__).'/config.default.php'); |
|
15 | 15 | if ($config_exists) { |
16 | - include(dirname(__FILE__) . '/config.php'); |
|
16 | + include(dirname(__FILE__).'/config.php'); |
|
17 | 17 | } |
18 | 18 | unset($PHORUM['mod_htmlpurifier']['config']); // unnecessary |
19 | 19 | } else { |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | function phorum_htmlpurifier_config_file_exists() |
26 | 26 | { |
27 | - return file_exists(dirname(__FILE__) . '/config.php'); |
|
27 | + return file_exists(dirname(__FILE__).'/config.php'); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | // vim: et sw=4 sts=4 |
@@ -15,9 +15,9 @@ |
||
15 | 15 | * explicitly says, "No, I do not need to migrate." |
16 | 16 | */ |
17 | 17 | |
18 | -if(!defined("PHORUM")) exit; |
|
18 | +if (!defined("PHORUM")) exit; |
|
19 | 19 | |
20 | -require_once(dirname(__FILE__) . "/../bbcode/bbcode.php"); |
|
20 | +require_once(dirname(__FILE__)."/../bbcode/bbcode.php"); |
|
21 | 21 | |
22 | 22 | /** |
23 | 23 | * 'format' hook style function that will be called to convert |
@@ -15,7 +15,9 @@ |
||
15 | 15 | * explicitly says, "No, I do not need to migrate." |
16 | 16 | */ |
17 | 17 | |
18 | -if(!defined("PHORUM")) exit; |
|
18 | +if(!defined("PHORUM")) { |
|
19 | + exit; |
|
20 | +} |
|
19 | 21 | |
20 | 22 | require_once(dirname(__FILE__) . "/../bbcode/bbcode.php"); |
21 | 23 |