Completed
Pull Request — master (#628)
by Richard
19:02 queued 04:58
created
htdocs/class/xoopseditor/tinymce4/external_plugins/filemanager/execute.php 3 patches
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
     
40 40
     if (file_exists($path."config.php"))
41 41
     {
42
-	   require_once($path."config.php");
43
-	   $cycle = FALSE;
42
+        require_once($path."config.php");
43
+        $cycle = FALSE;
44 44
     }
45 45
     $path = fix_dirname($path)."/";
46 46
     $cycle = FALSE;
@@ -69,54 +69,54 @@  discard block
 block discarded – undo
69 69
                 unlink($path);
70 70
                 if (file_exists($path_thumb)) unlink($path_thumb);
71 71
 		    
72
-        		$info=pathinfo($path);
73
-        		if ($relative_image_creation){
74
-        		    foreach($relative_path_from_current_pos as $k=>$path)
72
+                $info=pathinfo($path);
73
+                if ($relative_image_creation){
74
+                    foreach($relative_path_from_current_pos as $k=>$path)
75 75
                     {
76 76
                         if ($path!="" && $path[strlen($path)-1]!=="/") $path.="/";
77 77
 
78
-            			if (file_exists($info['dirname']."/".$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension']))
78
+                        if (file_exists($info['dirname']."/".$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension']))
79 79
                         {
80
-            			    unlink($info['dirname']."/".$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension']);
81
-            			}
82
-        		    }
83
-        		}
80
+                            unlink($info['dirname']."/".$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension']);
81
+                        }
82
+                    }
83
+                }
84 84
         		
85
-        		if ($fixed_image_creation)
85
+                if ($fixed_image_creation)
86 86
                 {
87
-        		    foreach($fixed_path_from_filemanager as $k=>$path)
87
+                    foreach($fixed_path_from_filemanager as $k=>$path)
88 88
                     {
89
-            			if ($path!="" && $path[strlen($path)-1] !== "/") $path.="/";
89
+                        if ($path!="" && $path[strlen($path)-1] !== "/") $path.="/";
90 90
 
91
-            			$base_dir=$path.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
92
-            			if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
91
+                        $base_dir=$path.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
92
+                        if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
93 93
                         {
94
-            			    unlink($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']);
95
-            			}
96
-        		    }
97
-        		}
94
+                            unlink($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']);
95
+                        }
96
+                    }
97
+                }
98 98
             }
99 99
             break;
100 100
         case 'delete_folder':
101 101
             if ($delete_folders){
102
-        		if (is_dir($path_thumb))
102
+                if (is_dir($path_thumb))
103 103
                 {
104
-        		    deleteDir($path_thumb);
104
+                    deleteDir($path_thumb);
105 105
                 }
106 106
 
107
-        		if (is_dir($path))
107
+                if (is_dir($path))
108 108
                 {
109
-        		    deleteDir($path);	
110
-        		    if ($fixed_image_creation)
109
+                    deleteDir($path);	
110
+                    if ($fixed_image_creation)
111 111
                     {
112
-            			foreach($fixed_path_from_filemanager as $k=>$paths){
113
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
112
+                        foreach($fixed_path_from_filemanager as $k=>$paths){
113
+                            if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
114 114
 
115
-            			    $base_dir=$paths.substr_replace($path, '', 0, strlen($current_path));
116
-            			    if (is_dir($base_dir)) deleteDir($base_dir);
117
-            			}
118
-        		    }
119
-        		}
115
+                            $base_dir=$paths.substr_replace($path, '', 0, strlen($current_path));
116
+                            if (is_dir($base_dir)) deleteDir($base_dir);
117
+                        }
118
+                    }
119
+                }
120 120
             }
121 121
             break;
122 122
         case 'create_folder':
@@ -134,14 +134,14 @@  discard block
 block discarded – undo
134 134
                     if (!rename_folder($path,$name,$transliteration)) die(lang_Rename_existing_folder);
135 135
 
136 136
                     rename_folder($path_thumb,$name,$transliteration);
137
-        		    if ($fixed_image_creation){
138
-            			foreach($fixed_path_from_filemanager as $k=>$paths){
139
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
137
+                    if ($fixed_image_creation){
138
+                        foreach($fixed_path_from_filemanager as $k=>$paths){
139
+                            if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
140 140
             			    
141 141
                             $base_dir=$paths.substr_replace($path, '', 0, strlen($current_path));
142
-            			    rename_folder($base_dir,$name,$transliteration);
143
-            			}
144
-		           }
142
+                            rename_folder($base_dir,$name,$transliteration);
143
+                        }
144
+                    }
145 145
                 }
146 146
                 else {
147 147
                     die(lang_Empty_name);
@@ -157,28 +157,28 @@  discard block
 block discarded – undo
157 157
 
158 158
                     rename_file($path_thumb,$name,$transliteration);
159 159
 
160
-        		    if ($fixed_image_creation)
160
+                    if ($fixed_image_creation)
161 161
                     {
162 162
                         $info=pathinfo($path);
163 163
 
164
-            			foreach($fixed_path_from_filemanager as $k=>$paths)
164
+                        foreach($fixed_path_from_filemanager as $k=>$paths)
165 165
                         {
166
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
166
+                            if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
167 167
 
168
-            			    $base_dir = $paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
169
-            			    if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
168
+                            $base_dir = $paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
169
+                            if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
170 170
                             {
171
-            				    rename_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'],$fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k],$transliteration);
172
-            			    }
173
-            			}
174
-        		    }
171
+                                rename_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'],$fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k],$transliteration);
172
+                            }
173
+                        }
174
+                    }
175 175
                 }
176 176
                 else {
177 177
                     die(lang_Empty_name);
178 178
                 }
179 179
             }
180 180
             break;
181
-	   case 'duplicate_file':
181
+        case 'duplicate_file':
182 182
             if ($duplicate_files)
183 183
             {
184 184
                 $name = fix_filename($name,$transliteration);
@@ -191,18 +191,18 @@  discard block
 block discarded – undo
191 191
                     if ($fixed_image_creation)
192 192
                     {
193 193
                         $info=pathinfo($path);
194
-            			foreach($fixed_path_from_filemanager as $k=>$paths)
194
+                        foreach($fixed_path_from_filemanager as $k=>$paths)
195 195
                         {
196
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.= "/";
196
+                            if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.= "/";
197 197
 
198
-            			    $base_dir=$paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
198
+                            $base_dir=$paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
199 199
 
200
-            			    if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
200
+                            if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
201 201
                             {
202
-            				duplicate_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'],$fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k]);
203
-            			    }
204
-            			}
205
-        		    }
202
+                            duplicate_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'],$fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k]);
203
+                            }
204
+                        }
205
+                    }
206 206
                 }
207 207
                 else
208 208
                 {
Please login to merge, or discard this patch.
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -4,24 +4,24 @@  discard block
 block discarded – undo
4 4
 include('include/utils.php');
5 5
 
6 6
 
7
-$thumb_pos  = strpos($_POST['path_thumb'], $thumbs_base_path);
7
+$thumb_pos = strpos($_POST['path_thumb'], $thumbs_base_path);
8 8
 
9
-if ($thumb_pos !=0
10
-    || strpos($_POST['path_thumb'],'../',strlen($thumbs_base_path)+$thumb_pos)!==FALSE
11
-    || strpos($_POST['path'],'/')===0
12
-    || strpos($_POST['path'],'../')!==FALSE
13
-    || strpos($_POST['path'],'./')===0)
9
+if ($thumb_pos != 0
10
+    || strpos($_POST['path_thumb'], '../', strlen($thumbs_base_path) + $thumb_pos) !== FALSE
11
+    || strpos($_POST['path'], '/') === 0
12
+    || strpos($_POST['path'], '../') !== FALSE
13
+    || strpos($_POST['path'], './') === 0)
14 14
 {
15 15
     die('wrong path');
16 16
 }
17 17
 
18 18
 $language_file = 'lang/en_EN.php'; 
19
-if (isset($_GET['lang']) && $_GET['lang'] !== 'undefined' && $_GET['lang']!='')
19
+if (isset($_GET['lang']) && $_GET['lang'] !== 'undefined' && $_GET['lang'] != '')
20 20
 {
21 21
     $path_parts = pathinfo($_GET['lang']);
22
-    if (is_readable('lang/' .$path_parts['basename']. '.php'))
22
+    if (is_readable('lang/'.$path_parts['basename'].'.php'))
23 23
     { 
24
-        $language_file = 'lang/' .$path_parts['basename']. '.php';
24
+        $language_file = 'lang/'.$path_parts['basename'].'.php';
25 25
     }
26 26
 }
27 27
 
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
 $cycle = TRUE;
33 33
 $max_cycles = 50;
34 34
 $i = 0;
35
-while($cycle && $i<$max_cycles)
35
+while ($cycle && $i < $max_cycles)
36 36
 {
37 37
     $i++;
38
-    if ($path == $base)  $cycle=FALSE;
38
+    if ($path == $base)  $cycle = FALSE;
39 39
     
40 40
     if (file_exists($path."config.php"))
41 41
     {
@@ -51,29 +51,29 @@  discard block
 block discarded – undo
51 51
 if (isset($_POST['name']))
52 52
 {
53 53
     $name = $_POST['name'];
54
-    if (strpos($name,'../') !== FALSE) die('wrong name');
54
+    if (strpos($name, '../') !== FALSE) die('wrong name');
55 55
 }
56 56
 
57 57
 $info = pathinfo($path);
58
-if (isset($info['extension']) && !(isset($_GET['action']) && $_GET['action']==='delete_folder') && !in_array(strtolower($info['extension']), $ext))
58
+if (isset($info['extension']) && !(isset($_GET['action']) && $_GET['action'] === 'delete_folder') && !in_array(strtolower($info['extension']), $ext))
59 59
 {
60 60
     die('wrong extension');
61 61
 }
62 62
     
63 63
 if (isset($_GET['action']))
64 64
 {
65
-    switch($_GET['action'])
65
+    switch ($_GET['action'])
66 66
     {
67 67
         case 'delete_file':
68
-            if ($delete_files){
68
+            if ($delete_files) {
69 69
                 unlink($path);
70 70
                 if (file_exists($path_thumb)) unlink($path_thumb);
71 71
 		    
72
-        		$info=pathinfo($path);
73
-        		if ($relative_image_creation){
74
-        		    foreach($relative_path_from_current_pos as $k=>$path)
72
+        		$info = pathinfo($path);
73
+        		if ($relative_image_creation) {
74
+        		    foreach ($relative_path_from_current_pos as $k=>$path)
75 75
                     {
76
-                        if ($path!="" && $path[strlen($path)-1]!=="/") $path.="/";
76
+                        if ($path != "" && $path[strlen($path) - 1] !== "/") $path .= "/";
77 77
 
78 78
             			if (file_exists($info['dirname']."/".$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension']))
79 79
                         {
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
         		
85 85
         		if ($fixed_image_creation)
86 86
                 {
87
-        		    foreach($fixed_path_from_filemanager as $k=>$path)
87
+        		    foreach ($fixed_path_from_filemanager as $k=>$path)
88 88
                     {
89
-            			if ($path!="" && $path[strlen($path)-1] !== "/") $path.="/";
89
+            			if ($path != "" && $path[strlen($path) - 1] !== "/") $path .= "/";
90 90
 
91
-            			$base_dir=$path.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
91
+            			$base_dir = $path.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
92 92
             			if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
93 93
                         {
94 94
             			    unlink($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             }
99 99
             break;
100 100
         case 'delete_folder':
101
-            if ($delete_folders){
101
+            if ($delete_folders) {
102 102
         		if (is_dir($path_thumb))
103 103
                 {
104 104
         		    deleteDir($path_thumb);
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
         		    deleteDir($path);	
110 110
         		    if ($fixed_image_creation)
111 111
                     {
112
-            			foreach($fixed_path_from_filemanager as $k=>$paths){
113
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
112
+            			foreach ($fixed_path_from_filemanager as $k=>$paths) {
113
+            			    if ($paths != "" && $paths[strlen($paths) - 1] !== "/") $paths .= "/";
114 114
 
115
-            			    $base_dir=$paths.substr_replace($path, '', 0, strlen($current_path));
115
+            			    $base_dir = $paths.substr_replace($path, '', 0, strlen($current_path));
116 116
             			    if (is_dir($base_dir)) deleteDir($base_dir);
117 117
             			}
118 118
         		    }
@@ -122,24 +122,24 @@  discard block
 block discarded – undo
122 122
         case 'create_folder':
123 123
             if ($create_folders)
124 124
             {
125
-                create_folder(fix_path($path,$transliteration),fix_path($path_thumb,$transliteration));
125
+                create_folder(fix_path($path, $transliteration), fix_path($path_thumb, $transliteration));
126 126
             }
127 127
             break;
128 128
         case 'rename_folder':
129
-            if ($rename_folders){
130
-                $name=fix_filename($name,$transliteration);
131
-                $name=str_replace('.','',$name);
129
+            if ($rename_folders) {
130
+                $name = fix_filename($name, $transliteration);
131
+                $name = str_replace('.', '', $name);
132 132
 		
133
-                if (!empty($name)){
134
-                    if (!rename_folder($path,$name,$transliteration)) die(lang_Rename_existing_folder);
133
+                if (!empty($name)) {
134
+                    if (!rename_folder($path, $name, $transliteration)) die(lang_Rename_existing_folder);
135 135
 
136
-                    rename_folder($path_thumb,$name,$transliteration);
137
-        		    if ($fixed_image_creation){
138
-            			foreach($fixed_path_from_filemanager as $k=>$paths){
139
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
136
+                    rename_folder($path_thumb, $name, $transliteration);
137
+        		    if ($fixed_image_creation) {
138
+            			foreach ($fixed_path_from_filemanager as $k=>$paths) {
139
+            			    if ($paths != "" && $paths[strlen($paths) - 1] !== "/") $paths .= "/";
140 140
             			    
141
-                            $base_dir=$paths.substr_replace($path, '', 0, strlen($current_path));
142
-            			    rename_folder($base_dir,$name,$transliteration);
141
+                            $base_dir = $paths.substr_replace($path, '', 0, strlen($current_path));
142
+            			    rename_folder($base_dir, $name, $transliteration);
143 143
             			}
144 144
 		           }
145 145
                 }
@@ -149,26 +149,26 @@  discard block
 block discarded – undo
149 149
             }
150 150
             break;
151 151
         case 'rename_file':
152
-            if ($rename_files){
153
-                $name=fix_filename($name,$transliteration);
152
+            if ($rename_files) {
153
+                $name = fix_filename($name, $transliteration);
154 154
                 if (!empty($name))
155 155
                 {
156
-                    if (!rename_file($path,$name,$transliteration)) die(lang_Rename_existing_file);
156
+                    if (!rename_file($path, $name, $transliteration)) die(lang_Rename_existing_file);
157 157
 
158
-                    rename_file($path_thumb,$name,$transliteration);
158
+                    rename_file($path_thumb, $name, $transliteration);
159 159
 
160 160
         		    if ($fixed_image_creation)
161 161
                     {
162
-                        $info=pathinfo($path);
162
+                        $info = pathinfo($path);
163 163
 
164
-            			foreach($fixed_path_from_filemanager as $k=>$paths)
164
+            			foreach ($fixed_path_from_filemanager as $k=>$paths)
165 165
                         {
166
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
166
+            			    if ($paths != "" && $paths[strlen($paths) - 1] !== "/") $paths .= "/";
167 167
 
168 168
             			    $base_dir = $paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
169 169
             			    if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
170 170
                             {
171
-            				    rename_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'],$fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k],$transliteration);
171
+            				    rename_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'], $fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k], $transliteration);
172 172
             			    }
173 173
             			}
174 174
         		    }
@@ -181,25 +181,25 @@  discard block
 block discarded – undo
181 181
 	   case 'duplicate_file':
182 182
             if ($duplicate_files)
183 183
             {
184
-                $name = fix_filename($name,$transliteration);
184
+                $name = fix_filename($name, $transliteration);
185 185
                 if (!empty($name))
186 186
                 {
187
-                    if (!duplicate_file($path,$name)) die(lang_Rename_existing_file);
187
+                    if (!duplicate_file($path, $name)) die(lang_Rename_existing_file);
188 188
                     
189
-                    duplicate_file($path_thumb,$name);
189
+                    duplicate_file($path_thumb, $name);
190 190
         		    
191 191
                     if ($fixed_image_creation)
192 192
                     {
193
-                        $info=pathinfo($path);
194
-            			foreach($fixed_path_from_filemanager as $k=>$paths)
193
+                        $info = pathinfo($path);
194
+            			foreach ($fixed_path_from_filemanager as $k=>$paths)
195 195
                         {
196
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.= "/";
196
+            			    if ($paths != "" && $paths[strlen($paths) - 1] !== "/") $paths .= "/";
197 197
 
198
-            			    $base_dir=$paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
198
+            			    $base_dir = $paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
199 199
 
200 200
             			    if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
201 201
                             {
202
-            				duplicate_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'],$fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k]);
202
+            				duplicate_file($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension'], $fixed_image_creation_name_to_prepend[$k].$name.$fixed_image_creation_to_append[$k]);
203 203
             			    }
204 204
             			}
205 205
         		    }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             }
212 212
             break;
213 213
         case 'paste_clipboard':
214
-            if ( ! isset($_SESSION['RF']['clipboard_action'], $_SESSION['RF']['clipboard']['path'], $_SESSION['RF']['clipboard']['path_thumb']) 
214
+            if (!isset($_SESSION['RF']['clipboard_action'], $_SESSION['RF']['clipboard']['path'], $_SESSION['RF']['clipboard']['path_thumb']) 
215 215
                 || $_SESSION['RF']['clipboard_action'] == '' 
216 216
                 || $_SESSION['RF']['clipboard']['path'] == ''
217 217
                 || $_SESSION['RF']['clipboard']['path_thumb'] == '')
@@ -230,22 +230,22 @@  discard block
 block discarded – undo
230 230
             }
231 231
 
232 232
             // user wants to paste folder to it's own sub folder.. baaaah.
233
-            if (is_dir($data['path']) && strpos($path, $data['path']) !== FALSE){
233
+            if (is_dir($data['path']) && strpos($path, $data['path']) !== FALSE) {
234 234
                 die();
235 235
             } 
236 236
 
237 237
             // something terribly gone wrong
238
-            if ($action !== 'copy' && $action !== 'cut'){
238
+            if ($action !== 'copy' && $action !== 'cut') {
239 239
                 die('no action');
240 240
             }
241 241
 
242 242
             // check for writability
243
-            if (is_really_writable($path) === FALSE || is_really_writable($path_thumb) === FALSE){
243
+            if (is_really_writable($path) === FALSE || is_really_writable($path_thumb) === FALSE) {
244 244
                 die($path.'--'.$path_thumb.'--'.lang_Dir_No_Write);
245 245
             }
246 246
 
247 247
             // check if server disables copy or rename
248
-            if (is_function_callable(($action === 'copy' ? 'copy' : 'rename')) === FALSE){
248
+            if (is_function_callable(($action === 'copy' ? 'copy' : 'rename')) === FALSE) {
249 249
                 die(sprintf(lang_Function_Disabled, ($action === 'copy' ? lcfirst(lang_Copy) : lcfirst(lang_Cut))));
250 250
             }
251 251
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
                 rrename($data['path_thumb'], $path_thumb);
261 261
 
262 262
                 // cleanup
263
-                if (is_dir($data['path']) === TRUE){
263
+                if (is_dir($data['path']) === TRUE) {
264 264
                     rrename_after_cleaner($data['path']);
265 265
                     rrename_after_cleaner($data['path_thumb']);
266 266
                 }
Please login to merge, or discard this patch.
Braces   +47 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,6 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 include('config/config.php');
3
-if ($_SESSION['RF']["verify"] !== "RESPONSIVEfilemanager") die('forbiden');
3
+if ($_SESSION['RF']["verify"] !== "RESPONSIVEfilemanager") {
4
+    die('forbiden');
5
+}
4 6
 include('include/utils.php');
5 7
 
6 8
 
@@ -35,7 +37,9 @@  discard block
 block discarded – undo
35 37
 while($cycle && $i<$max_cycles)
36 38
 {
37 39
     $i++;
38
-    if ($path == $base)  $cycle=FALSE;
40
+    if ($path == $base) {
41
+        $cycle=FALSE;
42
+    }
39 43
     
40 44
     if (file_exists($path."config.php"))
41 45
     {
@@ -51,8 +55,10 @@  discard block
 block discarded – undo
51 55
 if (isset($_POST['name']))
52 56
 {
53 57
     $name = $_POST['name'];
54
-    if (strpos($name,'../') !== FALSE) die('wrong name');
55
-}
58
+    if (strpos($name,'../') !== FALSE) {
59
+        die('wrong name');
60
+    }
61
+    }
56 62
 
57 63
 $info = pathinfo($path);
58 64
 if (isset($info['extension']) && !(isset($_GET['action']) && $_GET['action']==='delete_folder') && !in_array(strtolower($info['extension']), $ext))
@@ -67,13 +73,17 @@  discard block
 block discarded – undo
67 73
         case 'delete_file':
68 74
             if ($delete_files){
69 75
                 unlink($path);
70
-                if (file_exists($path_thumb)) unlink($path_thumb);
76
+                if (file_exists($path_thumb)) {
77
+                    unlink($path_thumb);
78
+                }
71 79
 		    
72 80
         		$info=pathinfo($path);
73 81
         		if ($relative_image_creation){
74 82
         		    foreach($relative_path_from_current_pos as $k=>$path)
75 83
                     {
76
-                        if ($path!="" && $path[strlen($path)-1]!=="/") $path.="/";
84
+                        if ($path!="" && $path[strlen($path)-1]!=="/") {
85
+                            $path.="/";
86
+                        }
77 87
 
78 88
             			if (file_exists($info['dirname']."/".$path.$relative_image_creation_name_to_prepend[$k].$info['filename'].$relative_image_creation_name_to_append[$k].".".$info['extension']))
79 89
                         {
@@ -86,7 +96,9 @@  discard block
 block discarded – undo
86 96
                 {
87 97
         		    foreach($fixed_path_from_filemanager as $k=>$path)
88 98
                     {
89
-            			if ($path!="" && $path[strlen($path)-1] !== "/") $path.="/";
99
+            			if ($path!="" && $path[strlen($path)-1] !== "/") {
100
+            			    $path.="/";
101
+            			}
90 102
 
91 103
             			$base_dir=$path.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
92 104
             			if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
@@ -110,10 +122,14 @@  discard block
 block discarded – undo
110 122
         		    if ($fixed_image_creation)
111 123
                     {
112 124
             			foreach($fixed_path_from_filemanager as $k=>$paths){
113
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
125
+            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") {
126
+            			        $paths.="/";
127
+            			    }
114 128
 
115 129
             			    $base_dir=$paths.substr_replace($path, '', 0, strlen($current_path));
116
-            			    if (is_dir($base_dir)) deleteDir($base_dir);
130
+            			    if (is_dir($base_dir)) {
131
+            			        deleteDir($base_dir);
132
+            			    }
117 133
             			}
118 134
         		    }
119 135
         		}
@@ -131,19 +147,22 @@  discard block
 block discarded – undo
131 147
                 $name=str_replace('.','',$name);
132 148
 		
133 149
                 if (!empty($name)){
134
-                    if (!rename_folder($path,$name,$transliteration)) die(lang_Rename_existing_folder);
150
+                    if (!rename_folder($path,$name,$transliteration)) {
151
+                        die(lang_Rename_existing_folder);
152
+                    }
135 153
 
136 154
                     rename_folder($path_thumb,$name,$transliteration);
137 155
         		    if ($fixed_image_creation){
138 156
             			foreach($fixed_path_from_filemanager as $k=>$paths){
139
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
157
+            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") {
158
+            			        $paths.="/";
159
+            			    }
140 160
             			    
141 161
                             $base_dir=$paths.substr_replace($path, '', 0, strlen($current_path));
142 162
             			    rename_folder($base_dir,$name,$transliteration);
143 163
             			}
144 164
 		           }
145
-                }
146
-                else {
165
+                } else {
147 166
                     die(lang_Empty_name);
148 167
                 }
149 168
             }
@@ -153,7 +172,9 @@  discard block
 block discarded – undo
153 172
                 $name=fix_filename($name,$transliteration);
154 173
                 if (!empty($name))
155 174
                 {
156
-                    if (!rename_file($path,$name,$transliteration)) die(lang_Rename_existing_file);
175
+                    if (!rename_file($path,$name,$transliteration)) {
176
+                        die(lang_Rename_existing_file);
177
+                    }
157 178
 
158 179
                     rename_file($path_thumb,$name,$transliteration);
159 180
 
@@ -163,7 +184,9 @@  discard block
 block discarded – undo
163 184
 
164 185
             			foreach($fixed_path_from_filemanager as $k=>$paths)
165 186
                         {
166
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.="/";
187
+            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") {
188
+            			        $paths.="/";
189
+            			    }
167 190
 
168 191
             			    $base_dir = $paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
169 192
             			    if (file_exists($base_dir.$fixed_image_creation_name_to_prepend[$k].$info['filename'].$fixed_image_creation_to_append[$k].".".$info['extension']))
@@ -172,8 +195,7 @@  discard block
 block discarded – undo
172 195
             			    }
173 196
             			}
174 197
         		    }
175
-                }
176
-                else {
198
+                } else {
177 199
                     die(lang_Empty_name);
178 200
                 }
179 201
             }
@@ -184,7 +206,9 @@  discard block
 block discarded – undo
184 206
                 $name = fix_filename($name,$transliteration);
185 207
                 if (!empty($name))
186 208
                 {
187
-                    if (!duplicate_file($path,$name)) die(lang_Rename_existing_file);
209
+                    if (!duplicate_file($path,$name)) {
210
+                        die(lang_Rename_existing_file);
211
+                    }
188 212
                     
189 213
                     duplicate_file($path_thumb,$name);
190 214
         		    
@@ -193,7 +217,9 @@  discard block
 block discarded – undo
193 217
                         $info=pathinfo($path);
194 218
             			foreach($fixed_path_from_filemanager as $k=>$paths)
195 219
                         {
196
-            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") $paths.= "/";
220
+            			    if ($paths!="" && $paths[strlen($paths)-1] !== "/") {
221
+            			        $paths.= "/";
222
+            			    }
197 223
 
198 224
             			    $base_dir=$paths.substr_replace($info['dirname']."/", '', 0, strlen($current_path));
199 225
 
@@ -203,8 +229,7 @@  discard block
 block discarded – undo
203 229
             			    }
204 230
             			}
205 231
         		    }
206
-                }
207
-                else
232
+                } else
208 233
                 {
209 234
                     die(lang_Empty_name);
210 235
                 }
@@ -253,8 +278,7 @@  discard block
 block discarded – undo
253 278
             {
254 279
                 rcopy($data['path'], $path);
255 280
                 rcopy($data['path_thumb'], $path_thumb);
256
-            }
257
-            elseif ($action === 'cut')
281
+            } elseif ($action === 'cut')
258 282
             {
259 283
                 rrename($data['path'], $path);
260 284
                 rrename($data['path_thumb'], $path_thumb);
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/tinymce4/editor_registry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,1 +1,1 @@
 block discarded – undo
1
-<?php

/**
 *  TinyMCE adapter for XOOPS
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license             GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         class
 * @subpackage      editor
 * @since           2.3.0
 * @author          Taiwen Jiang <[email protected]>
 * @version         $Id: editor_registry.php 8066 2011-11-06 05:09:33Z beckmi $
 */

return $config = array(
        "name"      =>  "tinymce4",
        "class"     =>  "XoopsFormTinymce4",
        "file"      =>  \XoopsBaseConfig::get('root-path') . "/class/xoopseditor/tinymce4/formtinymce.php",
        "title"     =>  _XOOPS_EDITOR_TINYMCE4,
        "order"     =>  5,
        "nohtml"    =>  0
    );
2 1
\ No newline at end of file
2
+<?php

/**
 *  TinyMCE adapter for XOOPS
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license             GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         class
 * @subpackage      editor
 * @since           2.3.0
 * @author          Taiwen Jiang <[email protected]>
 * @version         $Id: editor_registry.php 8066 2011-11-06 05:09:33Z beckmi $
 */

return $config = array("name"      =>  "tinymce4", "class"     =>  "XoopsFormTinymce4", "file"      =>  \XoopsBaseConfig::get('root-path')."/class/xoopseditor/tinymce4/formtinymce.php", "title"     =>  _XOOPS_EDITOR_TINYMCE4, "order"     =>  5, "nohtml"    =>  0);
3 3
\ No newline at end of file
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/tinymce4/include/xoopsimagemanager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
  */
16 16
 
17 17
 // check categories readability by group
18
-$groups = is_object($GLOBALS["xoopsUser"]) ? $GLOBALS["xoopsUser"]->getGroups() : array(FixedGroups::ANONYMOUS );
19
-$imgcat_handler =& xoops_getHandler('imagecategory');
18
+$groups = is_object($GLOBALS["xoopsUser"]) ? $GLOBALS["xoopsUser"]->getGroups() : array(FixedGroups::ANONYMOUS);
19
+$imgcat_handler = & xoops_getHandler('imagecategory');
20 20
 if (count($imgcat_handler->getList($groups, 'imgcat_read', 1)) == 0) {
21 21
     return false;
22 22
 }
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/tinymce4/include/xoopsmlcontent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,1 +1,1 @@
 block discarded – undo
1
-<?php

/**
 *  TinyMCE adapter for XOOPS
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         class
 * @subpackage      editor
 * @since           2.3.0
 * @author          Laurent JEN <[email protected]>
 * @version         $Id: xoopsmlcontent.php 8066 2011-11-06 05:09:33Z beckmi $
 */

// Xlanguage
if ( $GLOBALS["module_handler"]->getByDirname("xlanguage") && defined("XLANGUAGE_LANG_TAG") ) {
    return true;
}

// Easiest Multi-Language Hack (EMLH)
if ( defined('EASIESTML_LANGS') && defined('EASIESTML_LANGNAMES') ) {
    return true;
}

return false;
2 1
\ No newline at end of file
2
+<?php

/**
 *  TinyMCE adapter for XOOPS
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         class
 * @subpackage      editor
 * @since           2.3.0
 * @author          Laurent JEN <[email protected]>
 * @version         $Id: xoopsmlcontent.php 8066 2011-11-06 05:09:33Z beckmi $
 */

// Xlanguage
if ($GLOBALS["module_handler"]->getByDirname("xlanguage") && defined("XLANGUAGE_LANG_TAG")) {
    return true; }

// Easiest Multi-Language Hack (EMLH)
if (defined('EASIESTML_LANGS') && defined('EASIESTML_LANGNAMES')) {
    return true; }

return false;
3 3
\ No newline at end of file
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/tinymce4/include/xoopsemotions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,1 +1,1 @@
 block discarded – undo
1
-<?php
/**
 *  TinyMCE adapter for XOOPS
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         class
 * @subpackage      editor
 * @since           2.3.0
 * @author          Laurent JEN <[email protected]>
 * @version         $Id: xoopsemotions.php 8066 2011-11-06 05:09:33Z beckmi $
 */

include_once \XoopsBaseConfig::get('root-path') . "/modules/system/constants.php";
// Add your code here to check acces by groups
return true;
2 1
\ No newline at end of file
2
+<?php
/**
 *  TinyMCE adapter for XOOPS
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         class
 * @subpackage      editor
 * @since           2.3.0
 * @author          Laurent JEN <[email protected]>
 * @version         $Id: xoopsemotions.php 8066 2011-11-06 05:09:33Z beckmi $
 */

include_once \XoopsBaseConfig::get('root-path')."/modules/system/constants.php"; // Add your code here to check acces by groups
return true;
3 3
\ No newline at end of file
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/tinymce4/language/english.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@
 block discarded – undo
14 14
  * Assocated with editor_registry.php
15 15
  */
16 16
 // Name of the editor
17
-define("_XOOPS_EDITOR_TINYMCE4","TinyMCE4");
17
+define("_XOOPS_EDITOR_TINYMCE4", "TinyMCE4");
18 18
 
19 19
 // The value must be the same as /tinymce/jscripts/langs/your_language_code, for example, "en" for English, "fr" for French
20 20
 // For details, check http://tinymce.moxiecode.com/download_i18n.php
21
-define("_XOOPS_EDITOR_TINYMCE4_LANGUAGE","en");
21
+define("_XOOPS_EDITOR_TINYMCE4_LANGUAGE", "en");
22 22
 
23 23
 // FONT LIST, FORMAT: "Name=value1,value2;Name=value"
24 24
 
25
-define("_XOOPS_EDITOR_TINYMCE4_FONTS","Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings");
25
+define("_XOOPS_EDITOR_TINYMCE4_FONTS", "Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings");
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/tinymce4/language/french.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@
 block discarded – undo
14 14
  * Assocated with editor_registry.php
15 15
  */
16 16
 // Name of the editor
17
-define("_XOOPS_EDITOR_TINYMCE4","TinyMCE4");
17
+define("_XOOPS_EDITOR_TINYMCE4", "TinyMCE4");
18 18
 
19 19
 // The value must be the same as /tinymce/jscripts/langs/your_language_code, for example, "en" for English, "fr" for French
20 20
 // For details, check http://tinymce.moxiecode.com/download_i18n.php
21
-define("_XOOPS_EDITOR_TINYMCE4_LANGUAGE","fr_FR");
21
+define("_XOOPS_EDITOR_TINYMCE4_LANGUAGE", "fr_FR");
22 22
 
23 23
 // FONT LIST, FORMAT: "Name=value1,value2;Name=value"
24
-define("_XOOPS_EDITOR_TINYMCE4_FONTS","Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings");
24
+define("_XOOPS_EDITOR_TINYMCE4_FONTS", "Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings");
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/tinymce4/tinymce.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -216,10 +216,10 @@
 block discarded – undo
216 216
     }
217 217
 
218 218
     /**
219
-      * loadPlugins - load all plugins execpt the plugins in setting["exclude_plugins"]
220
-      *
221
-      * @return array plugins
222
-      */
219
+     * loadPlugins - load all plugins execpt the plugins in setting["exclude_plugins"]
220
+     *
221
+     * @return array plugins
222
+     */
223 223
     public function loadPlugins()
224 224
     {
225 225
         $plugins = array();
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function __construct($config)
38 38
     {
39 39
         $this->setConfig($config);
40
-        $this->rootpath = $this->config["rootpath"] . "/tinymce/js/tinymce";
40
+        $this->rootpath = $this->config["rootpath"]."/tinymce/js/tinymce";
41 41
     }
42 42
 
43 43
     /**
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
 
81 81
         // Load default settings
82 82
         if (!($this->setting = @include($GLOBALS['xoops']->path("var/configs/tinymce.php")))) {
83
-            $this->setting = include __DIR__ . "/settings.php";
83
+            $this->setting = include __DIR__."/settings.php";
84 84
         }
85 85
 
86 86
         // get editor language (from ...)
87
-        if (is_readable(\XoopsBaseConfig::get('root-path') . $this->rootpath . '/langs/' . $this->config["language"] . '.js')) {
87
+        if (is_readable(\XoopsBaseConfig::get('root-path').$this->rootpath.'/langs/'.$this->config["language"].'.js')) {
88 88
             $this->setting["language"] = $this->config["language"];
89 89
             $configured[] = "language";
90 90
         }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $configured[] = "content_css";
94 94
 
95 95
         if (!empty($this->config["theme"])
96
-            && is_dir(\XoopsBaseConfig::get('root-path') . $this->rootpath . "/themes/" . $this->config["theme"])
96
+            && is_dir(\XoopsBaseConfig::get('root-path').$this->rootpath."/themes/".$this->config["theme"])
97 97
         ) {
98 98
             $this->setting["theme"] = $this->config["theme"];
99 99
             $configured[] = "theme";
@@ -127,63 +127,63 @@  discard block
 block discarded – undo
127 127
             foreach ($this->config["buttons"] as $button) {
128 128
                 $i++;
129 129
                 if (isset($button["before"])) {
130
-                    $this->setting["theme_" . $this->setting["theme"] . "_buttons{$i}_add_before"] = $button["before"];
130
+                    $this->setting["theme_".$this->setting["theme"]."_buttons{$i}_add_before"] = $button["before"];
131 131
                 }
132 132
                 if (isset($button["add"])) {
133
-                    $this->setting["theme_" . $this->setting["theme"] . "_buttons{$i}_add"] = $button["add"];
133
+                    $this->setting["theme_".$this->setting["theme"]."_buttons{$i}_add"] = $button["add"];
134 134
                 }
135 135
                 if (isset($button[""])) {
136
-                    $this->setting["theme_" . $this->setting["theme"] . "_buttons{$i}"] = $button[""];
136
+                    $this->setting["theme_".$this->setting["theme"]."_buttons{$i}"] = $button[""];
137 137
                 }
138 138
             }
139 139
             $configured[] = "buttons";
140 140
 
141 141
             if (isset($this->config["toolbar_location"])) {
142
-                $this->setting["theme_" . $this->setting["theme"] . "_toolbar_location"]
142
+                $this->setting["theme_".$this->setting["theme"]."_toolbar_location"]
143 143
                     = $this->config["toolbar_location"];
144 144
                 $configured[] = "toolbar_location";
145 145
             } else {
146
-                $this->setting["theme_" . $this->setting["theme"] . "_toolbar_location"] = "top";
146
+                $this->setting["theme_".$this->setting["theme"]."_toolbar_location"] = "top";
147 147
             }
148 148
 
149 149
             if (isset($this->config["toolbar_align"])) {
150
-                $this->setting["theme_" . $this->setting["theme"] . "_toolbar_align"] = $this->config["toolbar_align"];
150
+                $this->setting["theme_".$this->setting["theme"]."_toolbar_align"] = $this->config["toolbar_align"];
151 151
                 $configured[] = "toolbar_align";
152 152
             } else {
153
-                $this->setting["theme_" . $this->setting["theme"] . "_toolbar_align"] = "left";
153
+                $this->setting["theme_".$this->setting["theme"]."_toolbar_align"] = "left";
154 154
             }
155 155
 
156 156
             if (isset($this->config["statusbar_location"])) {
157
-                $this->setting["theme_" . $this->setting["theme"] . "_statusbar_location"]
157
+                $this->setting["theme_".$this->setting["theme"]."_statusbar_location"]
158 158
                     = $this->config["statusbar_location"];
159 159
                 $configured[] = "statusbar_location";
160 160
             }
161 161
 
162 162
             if (isset($this->config["path_location"])) {
163
-                $this->setting["theme_" . $this->setting["theme"] . "_path_location"] = $this->config["path_location"];
163
+                $this->setting["theme_".$this->setting["theme"]."_path_location"] = $this->config["path_location"];
164 164
                 $configured[] = "path_location";
165 165
             }
166 166
 
167 167
             if (isset($this->config["resize_horizontal"])) {
168
-                $this->setting["theme_" . $this->setting["theme"] . "_resize_horizontal"]
168
+                $this->setting["theme_".$this->setting["theme"]."_resize_horizontal"]
169 169
                     = $this->config["resize_horizontal"];
170 170
                 $configured[] = "resize_horizontal";
171 171
             }
172 172
 
173 173
             if (isset($this->config["resizing"])) {
174
-                $this->setting["theme_" . $this->setting["theme"] . "_resizing"] = $this->config["resizing"];
174
+                $this->setting["theme_".$this->setting["theme"]."_resizing"] = $this->config["resizing"];
175 175
                 $configured[] = "resizing";
176 176
             }
177 177
 
178 178
             if (!empty($this->config["fonts"])) {
179
-                $this->setting["theme_" . $this->setting["theme"] . "_fonts"] = $this->config["fonts"];
179
+                $this->setting["theme_".$this->setting["theme"]."_fonts"] = $this->config["fonts"];
180 180
                 $configured[] = "fonts";
181 181
             }
182 182
 
183
-            for ($i=1; $i <= 4; $i++) {
183
+            for ($i = 1; $i <= 4; $i++) {
184 184
                 $buttons = array();
185
-                if (isset($this->setting["theme_" . $this->setting["theme"] . "_buttons{$i}"])) {
186
-                    $checklist = explode(",", $this->setting["theme_" . $this->setting["theme"] . "_buttons{$i}"]);
185
+                if (isset($this->setting["theme_".$this->setting["theme"]."_buttons{$i}"])) {
186
+                    $checklist = explode(",", $this->setting["theme_".$this->setting["theme"]."_buttons{$i}"]);
187 187
                     foreach ($checklist as $plugin) {
188 188
                         if (strpos(strtolower($plugin), "xoops") !== false) {
189 189
                             if (in_array($plugin, $this->xoopsPlugins)) {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
                             $buttons[] = $plugin;
194 194
                         }
195 195
                     }
196
-                    $this->setting["theme_" . $this->setting["theme"] . "_buttons{$i}"] = implode(",", $buttons);
196
+                    $this->setting["theme_".$this->setting["theme"]."_buttons{$i}"] = implode(",", $buttons);
197 197
                 }
198 198
             }
199 199
         }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             $this->setting[$key] = $val;
207 207
         }
208 208
 
209
-        if (!is_dir(\XoopsBaseConfig::get('root-path') . $this->rootpath . "/themes/" . $this->setting["theme"] . '/docs/' . $this->setting["language"] . '/')) {
209
+        if (!is_dir(\XoopsBaseConfig::get('root-path').$this->rootpath."/themes/".$this->setting["theme"].'/docs/'.$this->setting["language"].'/')) {
210 210
             $this->setting["docs_language"] = "en";
211 211
         }
212 212
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
     public function loadPlugins()
224 224
     {
225 225
         $plugins = array();
226
-        $plugins_list = XoopsLists::getDirListAsArray(\XoopsBaseConfig::get('root-path') . $this->rootpath . "/plugins");
226
+        $plugins_list = XoopsLists::getDirListAsArray(\XoopsBaseConfig::get('root-path').$this->rootpath."/plugins");
227 227
         if (empty($this->setting["plugins"])) {
228 228
             $plugins = $plugins_list;
229 229
         } else {
@@ -248,11 +248,11 @@  discard block
 block discarded – undo
248 248
     {
249 249
         $xoopsPlugins = array();
250 250
         $xoops_root_path = \XoopsBaseConfig::get('root-path');
251
-        $allplugins = XoopsLists::getDirListAsArray ($xoops_root_path . $this->rootpath . "/plugins");
251
+        $allplugins = XoopsLists::getDirListAsArray($xoops_root_path.$this->rootpath."/plugins");
252 252
         foreach ($allplugins as $plugin) {
253 253
             if (strpos(strtolower($plugin), "xoops") !== false
254
-                && file_exists($xoops_root_path . $this->config["rootpath"] . "/include/$plugin.php")) {
255
-                if ($right = @include $xoops_root_path . $this->config["rootpath"] . "/include/$plugin.php") {
254
+                && file_exists($xoops_root_path.$this->config["rootpath"]."/include/$plugin.php")) {
255
+                if ($right = @include $xoops_root_path.$this->config["rootpath"]."/include/$plugin.php") {
256 256
                     $xoopsPlugins[$plugin] = $plugin;
257 257
                 }
258 258
             }
@@ -271,8 +271,8 @@  discard block
 block discarded – undo
271 271
         }
272 272
 
273 273
         $css = array();
274
-        $css[] = $css_url . '/' . $css_file;
275
-        $css_content = file_get_contents($css_path . '/' . $css_file);
274
+        $css[] = $css_url.'/'.$css_file;
275
+        $css_content = file_get_contents($css_path.'/'.$css_file);
276 276
 
277 277
         // get all import css files
278 278
         if (preg_match_all("~\@import url\((.*\.css)\);~sUi", $css_content, $matches, PREG_PATTERN_ORDER)) {
@@ -307,15 +307,15 @@  discard block
 block discarded – undo
307 307
             $callback = "";
308 308
         }
309 309
 
310
-        $ret = '<script language="javascript" type="text/javascript" src="' . \XoopsBaseConfig::get('url') . $this->rootpath . '/tinymce.min.js"></script>';
310
+        $ret = '<script language="javascript" type="text/javascript" src="'.\XoopsBaseConfig::get('url').$this->rootpath.'/tinymce.min.js"></script>';
311 311
         $ret .= '<script language="javascript" type="text/javascript">
312 312
                 tinyMCE.init({
313 313
             ';
314 314
 
315 315
         foreach ($this->setting as $key => $val) {
316
-            $ret .= $key . ":";
316
+            $ret .= $key.":";
317 317
             if ($val === true) {
318
-                $ret.= "true,";
318
+                $ret .= "true,";
319 319
             } elseif ($val === false) {
320 320
                 $ret .= "false,";
321 321
             } else {
@@ -326,14 +326,14 @@  discard block
 block discarded – undo
326 326
 
327 327
         //	 Ajout alain01 tinymce v4
328 328
 
329
-        $chemin_array=parse_url(\XoopsBaseConfig::get('url'));
330
-        $chemin_scheme =  $chemin_array["scheme"]; // http
331
-        $chemin_host =  $chemin_array["host"]; // www.example.com  or // localhost
329
+        $chemin_array = parse_url(\XoopsBaseConfig::get('url'));
330
+        $chemin_scheme = $chemin_array["scheme"]; // http
331
+        $chemin_host = $chemin_array["host"]; // www.example.com  or // localhost
332 332
         //$chemin_path =  $chemin_array["path"]; // /myweb1
333 333
         if (!isset($chemin_array['path'])) {
334 334
             $chemin_path = '';
335 335
         } else {
336
-            $chemin_path =  $chemin_array["path"];
336
+            $chemin_path = $chemin_array["path"];
337 337
         }
338 338
 
339 339
         //$ret .='language_url : "'.$chemin_path.'/class/xoopseditor/tinymce4/tinymce/js/tinymce/langs/fr_FR.js",';
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         $ret .= '"external_filemanager_path": "'.$chemin_path.'/class/xoopseditor/tinymce4/external_plugins/filemanager/",';
370 370
         $ret .= "\n";
371 371
 
372
-        $ret .='templates: "'.$chemin_path.'/uploads/filemanager/templates/liste-templates.js",';
372
+        $ret .= 'templates: "'.$chemin_path.'/uploads/filemanager/templates/liste-templates.js",';
373 373
         $ret .= "\n";
374 374
         // fin ajout alain01
375 375
 
@@ -387,6 +387,6 @@  discard block
 block discarded – undo
387 387
                 </script>
388 388
             ';
389 389
 
390
-        return $ret ;
390
+        return $ret;
391 391
     }
392 392
 }
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/textarea/editor_registry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
 return $config = array(
25 25
     "class"  => "FormTextArea",
26
-    "file"   => \XoopsBaseConfig::get('root-path') . "/class/xoopseditor/textarea/textarea.php",
26
+    "file"   => \XoopsBaseConfig::get('root-path')."/class/xoopseditor/textarea/textarea.php",
27 27
     "title"  => _XOOPS_EDITOR_TEXTAREA, // display to end user
28 28
     "order"  => 1, // 0 will disable the editor
29 29
     "nohtml" => 1 // For forms that have "dohtml" disabled
Please login to merge, or discard this patch.