Completed
Push — master ( 754537...f00877 )
by Petrus
04:14
created
vendor/ezyang/htmlpurifier/extras/ConfigDoc/HTMLXSLTProcessor.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,9 @@
 block discarded – undo
13 13
 
14 14
     public function __construct($proc = false)
15 15
     {
16
-        if ($proc === false) $proc = new XSLTProcessor();
16
+        if ($proc === false) {
17
+            $proc = new XSLTProcessor();
18
+        }
17 19
         $this->xsltProcessor = $proc;
18 20
     }
19 21
 
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/extras/HTMLPurifierExtras.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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';
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/extras/FSTools/File.php 1 patch
Braces   +29 added lines, -10 removed lines patch added patch discarded remove patch
@@ -81,7 +81,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/extras/FSTools.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/release1-update.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,7 +104,10 @@
 block discarded – undo
104 104
 
105 105
 passthru('php maintenance/flush.php');
106 106
 
107
-if ($is_dev) echo "Review changes, write something in WHATSNEW and FOCUS, and then commit with log 'Release $version.'" . PHP_EOL;
108
-else echo "Numbers updated to dev, no other modifications necessary!";
107
+if ($is_dev) {
108
+    echo "Review changes, write something in WHATSNEW and FOCUS, and then commit with log 'Release $version.'" . PHP_EOL;
109
+} else {
110
+    echo "Numbers updated to dev, no other modifications necessary!";
111
+}
109 112
 
110 113
 // vim: et sw=4 sts=4
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/plugins/phorum/htmlpurifier.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -169,8 +169,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/plugins/phorum/settings/migrate-sigs.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,10 @@  discard block
 block discarded – undo
22 22
 {
23 23
     global $PHORUM;
24 24
 
25
-    if(!$offset) return; // bail out quick if $offset == 0
25
+    if(!$offset) {
26
+        return;
27
+    }
28
+    // bail out quick if $offset == 0
26 29
 
27 30
     // theoretically, we could get rid of this multi-request
28 31
     // doo-hickery if safe mode is off
@@ -39,7 +42,9 @@  discard block
 block discarded – undo
39 42
     }
40 43
     $userinfos = phorum_db_user_get_fields($user_ids, 'signature');
41 44
     foreach ($userinfos as $i => $user) {
42
-        if (empty($user['signature'])) continue;
45
+        if (empty($user['signature'])) {
46
+            continue;
47
+        }
43 48
         $sig = $user['signature'];
44 49
         // perform standard Phorum processing on the sig
45 50
         $sig = str_replace(array("&","<",">"), array("&amp;","&lt;","&gt;"), $sig);
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/plugins/phorum/settings/save.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,9 @@
 block discarded – undo
8 8
         settings, edit that file. To use the web form, delete that file.<br />";
9 9
     } else {
10 10
         $config = phorum_htmlpurifier_get_config(true);
11
-        if (!isset($_POST['reset'])) $config->mergeArrayFromForm($_POST, 'config', $PHORUM['mod_htmlpurifier']['directives']);
11
+        if (!isset($_POST['reset'])) {
12
+            $config->mergeArrayFromForm($_POST, 'config', $PHORUM['mod_htmlpurifier']['directives']);
13
+        }
12 14
         $PHORUM['mod_htmlpurifier']['config'] = $config->getAll();
13 15
     }
14 16
     $PHORUM['mod_htmlpurifier']['wysiwyg'] = !empty($_POST['wysiwyg']);
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/plugins/phorum/config.default.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@
 block discarded – undo
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',
Please login to merge, or discard this patch.