Test Failed
Pull Request — master (#592)
by Lucio
10:17
created
htdocs/class/xoopseditor/xoopseditor.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
         // TODO: switch to property_exists() as of PHP 5.1.0
53 53
         $vars = get_class_vars(__CLASS__);
54 54
         foreach ($configs as $key => $val) {
55
-            if (method_exists($this, 'set' . ucfirst($key))) {
56
-                $this->{'set' . ucfirst($key)}($val);
55
+            if (method_exists($this, 'set'.ucfirst($key))) {
56
+                $this->{'set'.ucfirst($key)}($val);
57 57
             } elseif (array_key_exists("_{$key}", $vars)) {
58 58
                 $this->{"_{$key}"} = $val;
59 59
             } elseif (array_key_exists($key, $vars)) {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function __construct()
100 100
     {
101
-        $this->root_path = XOOPS_ROOT_PATH . '/class/xoopseditor';
101
+        $this->root_path = XOOPS_ROOT_PATH.'/class/xoopseditor';
102 102
     }
103 103
 
104 104
     /**
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
             $result = array_flip($editor_handler->getList());
158 158
         */
159 159
         if (!isset($this->root_path)) {
160
-            $this->root_path = XOOPS_ROOT_PATH . '/class/xoopseditor';
161
-            $GLOBALS['xoopsLogger']->addDeprecated(__CLASS__ . '::' . __FUNCTION__ . '() should not be called statically.');
160
+            $this->root_path = XOOPS_ROOT_PATH.'/class/xoopseditor';
161
+            $GLOBALS['xoopsLogger']->addDeprecated(__CLASS__.'::'.__FUNCTION__.'() should not be called statically.');
162 162
         }
163 163
 
164 164
         xoops_load('XoopsCache');
@@ -167,14 +167,14 @@  discard block
 block discarded – undo
167 167
             $list  = array();
168 168
             $order = array();
169 169
             xoops_load('XoopsLists');
170
-            $_list = XoopsLists::getDirListAsArray($this->root_path . '/');
170
+            $_list = XoopsLists::getDirListAsArray($this->root_path.'/');
171 171
             foreach ($_list as $item) {
172
-                if (file_exists($file = $this->root_path . '/' . $item . '/language/' . $GLOBALS['xoopsConfig']['language'] . '.php')) {
172
+                if (file_exists($file = $this->root_path.'/'.$item.'/language/'.$GLOBALS['xoopsConfig']['language'].'.php')) {
173 173
                     include_once $file;
174
-                } elseif (file_exists($file = $this->root_path . '/' . $item . '/language/english.php')) {
174
+                } elseif (file_exists($file = $this->root_path.'/'.$item.'/language/english.php')) {
175 175
                     include_once $file;
176 176
                 }
177
-                if (file_exists($file = $this->root_path . '/' . $item . '/editor_registry.php')) {
177
+                if (file_exists($file = $this->root_path.'/'.$item.'/editor_registry.php')) {
178 178
                     include $file;
179 179
                     if (empty($config['order'])) {
180 180
                         continue;
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      */
211 211
     public function render($editor)
212 212
     {
213
-        trigger_error(__CLASS__ . '::' . __FUNCTION__ . '() deprecated', E_USER_WARNING);
213
+        trigger_error(__CLASS__.'::'.__FUNCTION__.'() deprecated', E_USER_WARNING);
214 214
 
215 215
         return $editor->render();
216 216
     }
@@ -246,13 +246,13 @@  discard block
 block discarded – undo
246 246
         if (empty($name) || !array_key_exists($name, $this->getList())) {
247 247
             return $editor;
248 248
         }
249
-        $editor_path = $this->root_path . '/' . $name;
250
-        if (file_exists($file = $editor_path . '/language/' . $GLOBALS['xoopsConfig']['language'] . '.php')) {
249
+        $editor_path = $this->root_path.'/'.$name;
250
+        if (file_exists($file = $editor_path.'/language/'.$GLOBALS['xoopsConfig']['language'].'.php')) {
251 251
             include_once $file;
252
-        } elseif (file_exists($file = $editor_path . '/language/english.php')) {
252
+        } elseif (file_exists($file = $editor_path.'/language/english.php')) {
253 253
             include_once $file;
254 254
         }
255
-        if (file_exists($file = $editor_path . '/editor_registry.php')) {
255
+        if (file_exists($file = $editor_path.'/editor_registry.php')) {
256 256
             include $file;
257 257
         } else {
258 258
             return $editor;
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/dhtmltextarea/editor_registry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
 return $config = array(
21 21
     'class'  => 'FormDhtmlTextArea',
22
-    'file'   => XOOPS_ROOT_PATH . '/class/xoopseditor/dhtmltextarea/dhtmltextarea.php',
22
+    'file'   => XOOPS_ROOT_PATH.'/class/xoopseditor/dhtmltextarea/dhtmltextarea.php',
23 23
     'title'  => _XOOPS_EDITOR_DHTMLTEXTAREA,
24 24
     'order'  => 2,
25 25
     'nohtml' => 1);
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/dhtmltextarea/dhtmltextarea.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     public function __construct($options = array())
47 47
     {
48 48
         parent::__construct($options);
49
-        $this->rootPath = '/class/xoopseditor/' . basename(__DIR__);
49
+        $this->rootPath = '/class/xoopseditor/'.basename(__DIR__);
50 50
         $hiddenText     = isset($this->configs['hiddenText']) ? $this->configs['hiddenText'] : $this->_hiddenText;
51 51
         xoops_load('XoopsFormDhtmlTextArea');
52 52
         $this->renderer = new XoopsFormDhtmlTextArea('', $this->getName(), $this->getValue(), $this->getRows(), $this->getCols(), $hiddenText, $this->configs);
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/tinymce/editor_registry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 return $config = array(
14 14
     'name' => 'tinymce',
15 15
     'class' => 'XoopsFormTinymce',
16
-    'file' => XOOPS_ROOT_PATH . '/class/xoopseditor/tinymce/formtinymce.php',
16
+    'file' => XOOPS_ROOT_PATH.'/class/xoopseditor/tinymce/formtinymce.php',
17 17
     'title' => _XOOPS_EDITOR_TINYMCE,
18 18
     'order' => 5,
19 19
     'nohtml' => 0);
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/tinymce/include/xoopsemotions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
14 14
 
15
-include_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
15
+include_once XOOPS_ROOT_PATH.'/modules/system/constants.php';
16 16
 // Add your code here to check access by groups
17 17
 
18 18
 return true;
Please login to merge, or discard this patch.
htdocs/class/xoopseditor/tinymce/tinymce.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function __construct($config)
37 37
     {
38 38
         $this->setConfig($config);
39
-        $this->rootpath                = $this->config['rootpath'] . '/tinymce/jscripts/tiny_mce';
39
+        $this->rootpath                = $this->config['rootpath'].'/tinymce/jscripts/tiny_mce';
40 40
         $this->xoopsPlugins            = $this->get_xoopsPlugins();
41 41
         self::$LastOfElementsTinymce   = $this->config['elements'];
42 42
         self::$ListOfElementsTinymce[] = self::$LastOfElementsTinymce;
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 
80 80
         // Load default settings
81 81
         if (!($this->setting = @include($GLOBALS['xoops']->path('var/configs/tinymce.php')))) {
82
-            $this->setting = include __DIR__ . '/settings.php';
82
+            $this->setting = include __DIR__.'/settings.php';
83 83
         }
84 84
 
85 85
         // get editor language (from ...)
86
-        if (isset($this->config['language']) && is_readable(XOOPS_ROOT_PATH . $this->rootpath . '/langs/' . $this->config['language'] . '.js')) {
86
+        if (isset($this->config['language']) && is_readable(XOOPS_ROOT_PATH.$this->rootpath.'/langs/'.$this->config['language'].'.js')) {
87 87
             $this->setting['language'] = $this->config['language'];
88 88
             $configured[]              = 'language';
89 89
         }
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $this->setting['content_css'] = implode(',', $this->loadCss());
92 92
         $configured[]                 = 'content_css';
93 93
 
94
-        if (!empty($this->config['theme']) && is_dir(XOOPS_ROOT_PATH . $this->rootpath . '/themes/' . $this->config['theme'])) {
94
+        if (!empty($this->config['theme']) && is_dir(XOOPS_ROOT_PATH.$this->rootpath.'/themes/'.$this->config['theme'])) {
95 95
             $this->setting['theme'] = $this->config['theme'];
96 96
             $configured[]           = 'theme';
97 97
         }
@@ -121,60 +121,60 @@  discard block
 block discarded – undo
121 121
             foreach ($this->config['buttons'] as $button) {
122 122
                 ++$i;
123 123
                 if (isset($button['before'])) {
124
-                    $this->setting['theme_' . $this->setting['theme'] . "_buttons{$i}_add_before"] = $button['before'];
124
+                    $this->setting['theme_'.$this->setting['theme']."_buttons{$i}_add_before"] = $button['before'];
125 125
                 }
126 126
                 if (isset($button['add'])) {
127
-                    $this->setting['theme_' . $this->setting['theme'] . "_buttons{$i}_add"] = $button['add'];
127
+                    $this->setting['theme_'.$this->setting['theme']."_buttons{$i}_add"] = $button['add'];
128 128
                 }
129 129
                 if (isset($button[''])) {
130
-                    $this->setting['theme_' . $this->setting['theme'] . "_buttons{$i}"] = $button[''];
130
+                    $this->setting['theme_'.$this->setting['theme']."_buttons{$i}"] = $button[''];
131 131
                 }
132 132
             }
133 133
             $configured[] = 'buttons';
134 134
 
135 135
             if (isset($this->config['toolbar_location'])) {
136
-                $this->setting['theme_' . $this->setting['theme'] . '_toolbar_location'] = $this->config['toolbar_location'];
136
+                $this->setting['theme_'.$this->setting['theme'].'_toolbar_location'] = $this->config['toolbar_location'];
137 137
                 $configured[]                                                            = 'toolbar_location';
138 138
             } else {
139
-                $this->setting['theme_' . $this->setting['theme'] . '_toolbar_location'] = 'top';
139
+                $this->setting['theme_'.$this->setting['theme'].'_toolbar_location'] = 'top';
140 140
             }
141 141
 
142 142
             if (isset($this->config['toolbar_align'])) {
143
-                $this->setting['theme_' . $this->setting['theme'] . '_toolbar_align'] = $this->config['toolbar_align'];
143
+                $this->setting['theme_'.$this->setting['theme'].'_toolbar_align'] = $this->config['toolbar_align'];
144 144
                 $configured[]                                                         = 'toolbar_align';
145 145
             } else {
146
-                $this->setting['theme_' . $this->setting['theme'] . '_toolbar_align'] = 'left';
146
+                $this->setting['theme_'.$this->setting['theme'].'_toolbar_align'] = 'left';
147 147
             }
148 148
 
149 149
             if (isset($this->config['statusbar_location'])) {
150
-                $this->setting['theme_' . $this->setting['theme'] . '_statusbar_location'] = $this->config['statusbar_location'];
150
+                $this->setting['theme_'.$this->setting['theme'].'_statusbar_location'] = $this->config['statusbar_location'];
151 151
                 $configured[]                                                              = 'statusbar_location';
152 152
             }
153 153
 
154 154
             if (isset($this->config['path_location'])) {
155
-                $this->setting['theme_' . $this->setting['theme'] . '_path_location'] = $this->config['path_location'];
155
+                $this->setting['theme_'.$this->setting['theme'].'_path_location'] = $this->config['path_location'];
156 156
                 $configured[]                                                         = 'path_location';
157 157
             }
158 158
 
159 159
             if (isset($this->config['resize_horizontal'])) {
160
-                $this->setting['theme_' . $this->setting['theme'] . '_resize_horizontal'] = $this->config['resize_horizontal'];
160
+                $this->setting['theme_'.$this->setting['theme'].'_resize_horizontal'] = $this->config['resize_horizontal'];
161 161
                 $configured[]                                                             = 'resize_horizontal';
162 162
             }
163 163
 
164 164
             if (isset($this->config['resizing'])) {
165
-                $this->setting['theme_' . $this->setting['theme'] . '_resizing'] = $this->config['resizing'];
165
+                $this->setting['theme_'.$this->setting['theme'].'_resizing'] = $this->config['resizing'];
166 166
                 $configured[]                                                    = 'resizing';
167 167
             }
168 168
 
169 169
             if (!empty($this->config['fonts'])) {
170
-                $this->setting['theme_' . $this->setting['theme'] . '_fonts'] = $this->config['fonts'];
170
+                $this->setting['theme_'.$this->setting['theme'].'_fonts'] = $this->config['fonts'];
171 171
                 $configured[]                                                 = 'fonts';
172 172
             }
173 173
 
174 174
             for ($i = 1; $i <= 4; ++$i) {
175 175
                 $buttons = array();
176
-                if (isset($this->setting['theme_' . $this->setting['theme'] . "_buttons{$i}"])) {
177
-                    $checklist = explode(',', $this->setting['theme_' . $this->setting['theme'] . "_buttons{$i}"]);
176
+                if (isset($this->setting['theme_'.$this->setting['theme']."_buttons{$i}"])) {
177
+                    $checklist = explode(',', $this->setting['theme_'.$this->setting['theme']."_buttons{$i}"]);
178 178
                     foreach ($checklist as $plugin) {
179 179
                         if (strpos(strtolower($plugin), 'xoops') != false) {
180 180
                             if (in_array($plugin, $this->xoopsPlugins)) {
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
                             $buttons[] = $plugin;
185 185
                         }
186 186
                     }
187
-                    $this->setting['theme_' . $this->setting['theme'] . "_buttons{$i}"] = implode(',', $buttons);
187
+                    $this->setting['theme_'.$this->setting['theme']."_buttons{$i}"] = implode(',', $buttons);
188 188
                 }
189 189
             }
190 190
         }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
             $this->setting[$key] = $val;
198 198
         }
199 199
 
200
-        if (!is_dir(XOOPS_ROOT_PATH . $this->rootpath . '/themes/' . $this->setting['theme'] . '/docs/' . $this->setting['language'] . '/')) {
200
+        if (!is_dir(XOOPS_ROOT_PATH.$this->rootpath.'/themes/'.$this->setting['theme'].'/docs/'.$this->setting['language'].'/')) {
201 201
             $this->setting['docs_language'] = 'en';
202 202
         }
203 203
 
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     public function loadPlugins()
214 214
     {
215 215
         $plugins      = array();
216
-        $plugins_list = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . $this->rootpath . '/plugins');
216
+        $plugins_list = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH.$this->rootpath.'/plugins');
217 217
         if (empty($this->setting['plugins'])) {
218 218
             $plugins = $plugins_list;
219 219
         } else {
@@ -236,10 +236,10 @@  discard block
 block discarded – undo
236 236
     public function get_xoopsPlugins()
237 237
     {
238 238
         $xoopsPlugins = array();
239
-        $allplugins   = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . $this->rootpath . '/plugins');
239
+        $allplugins   = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH.$this->rootpath.'/plugins');
240 240
         foreach ($allplugins as $plugin) {
241
-            if (strpos(strtolower($plugin), 'xoops') != false && file_exists(XOOPS_ROOT_PATH . $this->config['rootpath'] . "/include/$plugin.php")) {
242
-                if ($right = @include XOOPS_ROOT_PATH . $this->config['rootpath'] . "/include/$plugin.php") {
241
+            if (strpos(strtolower($plugin), 'xoops') != false && file_exists(XOOPS_ROOT_PATH.$this->config['rootpath']."/include/$plugin.php")) {
242
+                if ($right = @include XOOPS_ROOT_PATH.$this->config['rootpath']."/include/$plugin.php") {
243 243
                     $xoopsPlugins[$plugin] = $plugin;
244 244
                 }
245 245
             }
@@ -263,8 +263,8 @@  discard block
 block discarded – undo
263 263
         }
264 264
 
265 265
         $css         = array();
266
-        $css[]       = $css_url . '/' . $css_file;
267
-        $css_content = file_get_contents($css_path . '/' . $css_file);
266
+        $css[]       = $css_url.'/'.$css_file;
267
+        $css_content = file_get_contents($css_path.'/'.$css_file);
268 268
 
269 269
         // get all import css files
270 270
         if (preg_match_all("~\@import url\((.*\.css)\);~sUi", $css_content, $matches, PREG_PATTERN_ORDER)) {
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 
286 286
         $this->init();
287 287
         if (isset($this->setting['elements']) && self::$LastOfElementsTinymce != $this->setting['elements']) {
288
-            $ret = "\n<!-- 'tiny_mce.js' SCRIPT NOT YET " . $this->setting['elements'] . " -->\n"; //debug
288
+            $ret = "\n<!-- 'tiny_mce.js' SCRIPT NOT YET ".$this->setting['elements']." -->\n"; //debug
289 289
 
290 290
             return $ret;
291 291
         } else {
@@ -298,11 +298,11 @@  discard block
 block discarded – undo
298 298
             $callback = '';
299 299
         }
300 300
         if (!empty($this->setting['file_browser_callback'])) {
301
-            $fbc_name = XOOPS_ROOT_PATH . '/class/xoopseditor/tinymce/include/' . $this->setting['file_browser_callback'] . '.js';
301
+            $fbc_name = XOOPS_ROOT_PATH.'/class/xoopseditor/tinymce/include/'.$this->setting['file_browser_callback'].'.js';
302 302
             //suis passé la /lesrevespossibles/x244/class/xoopseditor/tinymce/tinymce/jscripts/include/openFinder.js
303
-            $file_browser_callback = "MyXoopsUrl ='" . XOOPS_URL . "';\n";
303
+            $file_browser_callback = "MyXoopsUrl ='".XOOPS_URL."';\n";
304 304
             $file_browser_callback .= file_get_contents($fbc_name);
305
-            $file_browser_callback .= "\n//suis passé la " . $fbc_name;
305
+            $file_browser_callback .= "\n//suis passé la ".$fbc_name;
306 306
             //unset($this->setting["file_browser_callback"]);
307 307
         } else {
308 308
             $file_browser_callback = '//suis absent';
@@ -350,14 +350,14 @@  discard block
 block discarded – undo
350 350
         if ($isTinyMceJsLoaded) {
351 351
             $ret .= "<!-- 'tiny_mce.js' SCRIPT IS ALREADY LOADED -->\n"; //debug
352 352
         } else {
353
-            $ret .= "<script type='text/javascript' src='" . XOOPS_URL . $this->rootpath . "/tiny_mce.js'></script>\n";
353
+            $ret .= "<script type='text/javascript' src='".XOOPS_URL.$this->rootpath."/tiny_mce.js'></script>\n";
354 354
             $isTinyMceJsLoaded = true;
355 355
         }
356 356
         $ret .= "<script type='text/javascript'>\n";
357 357
         $ret .= "tinyMCE.init({\n";
358 358
         // set options - start
359 359
         foreach ($this->setting as $key => $val) {
360
-            $ret .= $key . ':';
360
+            $ret .= $key.':';
361 361
             if ($val === true) {
362 362
                 $ret .= 'true,';
363 363
             } elseif ($val === false) {
@@ -370,11 +370,11 @@  discard block
 block discarded – undo
370 370
         // set options - end
371 371
         $ret .= "tinymceload: true\n";
372 372
         $ret .= "});\n";
373
-        $ret .= $callback . "\n";
374
-        $ret .= $file_browser_callback . "\n";
373
+        $ret .= $callback."\n";
374
+        $ret .= $file_browser_callback."\n";
375 375
         //$ret .= "function toggleEditor(id) {tinyMCE.execCommand('mceToggleEditor',false, id);}\n";
376 376
         $ret .= "</script>\n";
377
-        $ret .= "<!-- End TinyMce Rendering -->\n";//debug
377
+        $ret .= "<!-- End TinyMce Rendering -->\n"; //debug
378 378
         // create returned string - end
379 379
         return $ret;
380 380
     }
Please login to merge, or discard this patch.
tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsemotions/xoopsemotions.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     $current_path = str_replace(DIRECTORY_SEPARATOR, '/', $current_path);
19 19
 }
20 20
 $xoops_root_path = substr($current_path, 0, strpos(strtolower($current_path), '/class/xoopseditor/tinymce/'));
21
-include_once $xoops_root_path . '/mainfile.php';
21
+include_once $xoops_root_path.'/mainfile.php';
22 22
 defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
23 23
 // load mainfile.php - end
24 24
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 xoops_loadLanguage('misc');
32 32
 
33 33
 // include system category definitions - start
34
-include_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
34
+include_once XOOPS_ROOT_PATH.'/modules/system/constants.php';
35 35
 
36 36
 // check user/group
37 37
 $groups        = is_object($GLOBALS['xoopsUser']) ? $GLOBALS['xoopsUser']->getGroups() : array(XOOPS_GROUP_ANONYMOUS);
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         redirect_header($current_file, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
53 53
     }
54 54
     $db = XoopsDatabaseFactory::getDatabaseConnection();
55
-    include_once XOOPS_ROOT_PATH . '/class/uploader.php';
55
+    include_once XOOPS_ROOT_PATH.'/class/uploader.php';
56 56
     $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array(
57 57
         'image/gif',
58 58
         'image/jpeg',
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $smile_code    = $myts->stripSlashesGPC($_POST['smile_code']);
69 69
             $smile_desc    = $myts->stripSlashesGPC($_POST['smile_desc']);
70 70
             $smile_display = (int)$_POST['smile_display'] > 0 ? 1 : 0;
71
-            $newid         = $db->genId($db->prefix('smilies') . '_id_seq');
71
+            $newid         = $db->genId($db->prefix('smilies').'_id_seq');
72 72
             $sql           = sprintf('INSERT INTO %s (id, code, smile_url, emotion, display) VALUES (%d, %s, %s, %s, %d)', $db->prefix('smiles'), $newid, $db->quoteString($smile_code), $db->quoteString($smile_url), $db->quoteString($smile_desc), $smile_display);
73 73
             if (!$db->query($sql)) {
74 74
                 $err = 'Failed storing smiley data into the database';
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
 
95 95
 //xoops_header(false);
96 96
 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
97
-echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . _LANGCODE . '" lang="' . _LANGCODE . '">';
97
+echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'._LANGCODE.'" lang="'._LANGCODE.'">';
98 98
 echo '<head>';
99
-echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" />';
100
-echo '<meta http-equiv="content-language" content="' . _LANGCODE . '" />';
99
+echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />';
100
+echo '<meta http-equiv="content-language" content="'._LANGCODE.'" />';
101 101
 ?>
102 102
 <head>
103 103
     <title>{#xoopsemotions_dlg.title}</title>
@@ -141,22 +141,22 @@  discard block
 block discarded – undo
141 141
     <div id="emotionsbrowser_panel" class="panel current" style="overflow:auto;">
142 142
         <?php
143 143
         if ($smiles = $_SESSION['XoopsEmotions']) {
144
-            echo '<div><strong>' . _MSC_CLICKASMILIE . '</strong></div>';
144
+            echo '<div><strong>'._MSC_CLICKASMILIE.'</strong></div>';
145 145
             echo "<div class='xoopsEmotions'>";
146 146
             $count = count($smiles);
147 147
 
148 148
             for ($i = 0; $i < $count; ++$i) {
149 149
                 if ($op == '') {
150 150
                     if ($smiles[$i]['display']) {
151
-                        echo '<img class="xoopsEmotions" onclick="XoopsemotionsDialog.insert(this);" src="' . XOOPS_UPLOAD_URL . '/' . $smiles[$i]['smile_url'] . '" alt="' . $myts->htmlspecialchars($smiles[$i]['emotion']) . '" title="' . $myts->htmlspecialchars($smiles[$i]['emotion']) . '" />';
151
+                        echo '<img class="xoopsEmotions" onclick="XoopsemotionsDialog.insert(this);" src="'.XOOPS_UPLOAD_URL.'/'.$smiles[$i]['smile_url'].'" alt="'.$myts->htmlspecialchars($smiles[$i]['emotion']).'" title="'.$myts->htmlspecialchars($smiles[$i]['emotion']).'" />';
152 152
                     }
153 153
                 } else {
154
-                    echo '<img class="xoopsEmotions" onclick="XoopsemotionsDialog.insert(this);" src="' . XOOPS_UPLOAD_URL . '/' . $smiles[$i]['smile_url'] . '" alt="' . $myts->htmlspecialchars($smiles[$i]['emotion']) . '" title="' . $myts->htmlspecialchars($smiles[$i]['emotion']) . '" />';
154
+                    echo '<img class="xoopsEmotions" onclick="XoopsemotionsDialog.insert(this);" src="'.XOOPS_UPLOAD_URL.'/'.$smiles[$i]['smile_url'].'" alt="'.$myts->htmlspecialchars($smiles[$i]['emotion']).'" title="'.$myts->htmlspecialchars($smiles[$i]['emotion']).'" />';
155 155
                 }
156 156
             }
157 157
             if ($op == '') {
158 158
                 echo '<div class="xoopsEmotions">';
159
-                echo '<a class="xoopsEmotions" href="' . $current_file . '?op=' . _MORE . '">' . _MORE . '</a>';
159
+                echo '<a class="xoopsEmotions" href="'.$current_file.'?op='._MORE.'">'._MORE.'</a>';
160 160
                 echo '</div>';
161 161
             }
162 162
             echo '</div>';
@@ -172,15 +172,15 @@  discard block
 block discarded – undo
172 172
     <div id="emotionsadmin_panel" class="panel" style="overflow:auto;">
173 173
         <?php
174 174
         if ($admin) {
175
-            include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
175
+            include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
176 176
 
177 177
             $smile_form = new XoopsThemeForm(_AM_ADDSMILE, 'smileform', $current_file, 'post', true);
178 178
             $smile_form->setExtra('enctype="multipart/form-data"');
179 179
             $smile_form->addElement(new XoopsFormText(_AM_SMILECODE, 'smile_code', 26, 25, ''), true);
180 180
             $smile_form->addElement(new XoopsFormText(_AM_SMILEEMOTION, 'smile_desc', 26, 25, ''), true);
181 181
             $smile_select = new XoopsFormFile('', 'smile_url', 5000000);
182
-            $smile_label  = new XoopsFormLabel('', '<img src="' . XOOPS_UPLOAD_URL . '/blank.gif" alt="" />');
183
-            $smile_tray   = new XoopsFormElementTray(_IMAGEFILE . ':', '&nbsp;');
182
+            $smile_label  = new XoopsFormLabel('', '<img src="'.XOOPS_UPLOAD_URL.'/blank.gif" alt="" />');
183
+            $smile_tray   = new XoopsFormElementTray(_IMAGEFILE.':', '&nbsp;');
184 184
             $smile_tray->addElement($smile_select);
185 185
             $smile_tray->addElement($smile_label);
186 186
             $smile_form->addElement($smile_tray);
Please login to merge, or discard this patch.
tinymce/tinymce/jscripts/tiny_mce/plugins/xoopsmlcontent/xoopsmlcontent.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     $current_path = str_replace(DIRECTORY_SEPARATOR, '/', $current_path);
19 19
 }
20 20
 $xoops_root_path = substr($current_path, 0, strpos(strtolower($current_path), '/class/xoopseditor/tinymce/'));
21
-include_once $xoops_root_path . '/mainfile.php';
21
+include_once $xoops_root_path.'/mainfile.php';
22 22
 defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
23 23
 // load mainfile.php - end
24 24
 
@@ -28,21 +28,21 @@  discard block
 block discarded – undo
28 28
 
29 29
     $time = time();
30 30
     if (!isset($_SESSION['XoopsMLcontent']) && @$_SESSION['XoopsMLcontent_expire'] < $time) {
31
-        include_once XOOPS_ROOT_PATH . '/kernel/module.php';
31
+        include_once XOOPS_ROOT_PATH.'/kernel/module.php';
32 32
         $xlanguage = XoopsModule::getByDirname('xlanguage');
33 33
         if (is_object($xlanguage) && $xlanguage->getVar('isactive')) {
34
-            include_once(XOOPS_ROOT_PATH . '/modules/xlanguage/include/vars.php');
35
-            include_once(XOOPS_ROOT_PATH . '/modules/xlanguage/include/functions.php');
34
+            include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/vars.php');
35
+            include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/functions.php');
36 36
             $xlanguage_handler = xoops_getModuleHandler('language', 'xlanguage');
37 37
             $xlanguage_handler->loadConfig();
38
-            $lang_list =& $xlanguage_handler->getAllList();
38
+            $lang_list = & $xlanguage_handler->getAllList();
39 39
 
40 40
             $content .= '<select name="mlanguages" id="mlanguages">';
41 41
             $content .= '<option value="">{#xoopsmlcontent_dlg.sellang}</option>';
42 42
             if (is_array($lang_list) && count($lang_list) > 0) {
43 43
                 foreach (array_keys($lang_list) as $lang_name) {
44
-                    $lang =& $lang_list[$lang_name];
45
-                    $content .= '<option value="' . $lang['base']->getVar('lang_code') . '">' . $lang['base']->getVar('lang_name') . '</option>';
44
+                    $lang = & $lang_list[$lang_name];
45
+                    $content .= '<option value="'.$lang['base']->getVar('lang_code').'">'.$lang['base']->getVar('lang_name').'</option>';
46 46
                 }
47 47
             }
48 48
             $content .= '</select>';
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             $content .= '<select name="mlanguages" id="mlanguages">';
55 55
             $content .= '<option value="">{#xoopsmlcontent_dlg.sellang}</option>';
56 56
             foreach ($easiestml_langs as $l => $lang) {
57
-                $content .= '<option value="' . $lang . '">' . $langnames[$l] . '</option>';
57
+                $content .= '<option value="'.$lang.'">'.$langnames[$l].'</option>';
58 58
             }
59 59
             $content .= '</select>';
60 60
         } else {
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
 }
69 69
 
70 70
 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
71
-echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . _LANGCODE . '" lang="' . _LANGCODE . '">';
71
+echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'._LANGCODE.'" lang="'._LANGCODE.'">';
72 72
 echo '<head>';
73
-echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" />';
74
-echo '<meta http-equiv="content-language" content="' . _LANGCODE . '" />';
73
+echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />';
74
+echo '<meta http-equiv="content-language" content="'._LANGCODE.'" />';
75 75
 ?>
76 76
 <title>{#xoopsmlcontent_dlg.title}</title>
77 77
 <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
Please login to merge, or discard this patch.
tinymce/jscripts/tiny_mce/plugins/xoopsimagemanager/xoopsimagebrowser.php 1 patch
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     $current_path = str_replace(DIRECTORY_SEPARATOR, '/', $current_path);
19 19
 }
20 20
 $xoops_root_path = substr($current_path, 0, strpos(strtolower($current_path), '/class/xoopseditor/tinymce/'));
21
-include_once $xoops_root_path . '/mainfile.php';
21
+include_once $xoops_root_path.'/mainfile.php';
22 22
 defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
23 23
 
24 24
 /**
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
 // include
42 42
 xoops_load('xoopsformloader');
43 43
 //xoops_load("xoopsmodule");
44
-include_once XOOPS_ROOT_PATH . '/include/cp_functions.php';
45
-include_once XOOPS_ROOT_PATH . '/modules/system/constants.php';
44
+include_once XOOPS_ROOT_PATH.'/include/cp_functions.php';
45
+include_once XOOPS_ROOT_PATH.'/modules/system/constants.php';
46 46
 
47 47
 global $xoopsConfig;
48 48
 
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
 
56 56
 // check categories readability/writability
57 57
 $imgcat_handler = xoops_getHandler('imagecategory');
58
-$catreadlist    = $imgcat_handler->getList($groups, 'imgcat_read', 1);    // get readable categories
59
-$catwritelist   = $imgcat_handler->getList($groups, 'imgcat_write', 1);  // get writable categories
58
+$catreadlist    = $imgcat_handler->getList($groups, 'imgcat_read', 1); // get readable categories
59
+$catwritelist   = $imgcat_handler->getList($groups, 'imgcat_write', 1); // get writable categories
60 60
 
61
-$catreadcount  = count($catreadlist);        // count readable categories
62
-$catwritecount = count($catwritelist);      // count writable categories
61
+$catreadcount  = count($catreadlist); // count readable categories
62
+$catwritecount = count($catwritelist); // count writable categories
63 63
 
64 64
 // check/set parameters - start
65 65
 if (!isset($_REQUEST['target'])) {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     // Save Image modification - start
95 95
     if (!empty($_POST['op']) && $op === 'save') {
96 96
         if (!$GLOBALS['xoopsSecurity']->check()) {
97
-            redirect_header($current_file . '?target=' . $target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
97
+            redirect_header($current_file.'?target='.$target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
98 98
         }
99 99
         $count = count($image_id);
100 100
         if ($count > 0) {
@@ -116,23 +116,23 @@  discard block
 block discarded – undo
116 116
                 }
117 117
             }
118 118
             if (count($error) > 0) {
119
-                redirect_header($current_file . '?target=' . $target, 3, xoops_error(implode('<br>', $error)));
119
+                redirect_header($current_file.'?target='.$target, 3, xoops_error(implode('<br>', $error)));
120 120
             }
121 121
         }
122
-        redirect_header($current_file . '?target=' . $target, 3, _AM_SYSTEM_DBUPDATED);
122
+        redirect_header($current_file.'?target='.$target, 3, _AM_SYSTEM_DBUPDATED);
123 123
     }
124 124
     // Save Image modification - end
125 125
 
126 126
     // Add new image - start
127 127
     if (!empty($_POST['op']) && $op === 'addfile') {
128 128
         if (!$GLOBALS['xoopsSecurity']->check()) {
129
-            redirect_header($current_file . '?target=' . $target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
129
+            redirect_header($current_file.'?target='.$target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
130 130
         }
131 131
         $imgcat = $imgcat_handler->get((int)$imgcat_id);
132 132
         if (!is_object($imgcat)) {
133
-            redirect_header($current_file . '?target=' . $target, 3);
133
+            redirect_header($current_file.'?target='.$target, 3);
134 134
         }
135
-        include_once XOOPS_ROOT_PATH . '/class/uploader.php';
135
+        include_once XOOPS_ROOT_PATH.'/class/uploader.php';
136 136
 
137 137
         $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array(
138 138
             'image/gif',
@@ -176,16 +176,16 @@  discard block
 block discarded – undo
176 176
             }
177 177
         }
178 178
         if (count($err) > 0) {
179
-            redirect_header($current_file . '?target=' . $target, 3, xoops_error(implode('<br>', $err)));
179
+            redirect_header($current_file.'?target='.$target, 3, xoops_error(implode('<br>', $err)));
180 180
         }
181
-        redirect_header($current_file . '?target=' . $target, 3, _AM_SYSTEM_DBUPDATED);
181
+        redirect_header($current_file.'?target='.$target, 3, _AM_SYSTEM_DBUPDATED);
182 182
     }
183 183
     // Add new image - end
184 184
 
185 185
     // Add new category - start
186 186
     if (!empty($_POST['op']) && $op === 'addcat') {
187 187
         if (!$GLOBALS['xoopsSecurity']->check()) {
188
-            redirect_header($current_file . '?target=' . $target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
188
+            redirect_header($current_file.'?target='.$target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
189 189
         }
190 190
         $imgcat_handler = xoops_getHandler('imagecategory');
191 191
         $imagecategory  = $imgcat_handler->create();
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         $imagecategory->setVar('imgcat_storetype', $imgcat_storetype);
200 200
         $imagecategory->setVar('imgcat_type', 'C');
201 201
         if (!$imgcat_handler->insert($imagecategory)) {
202
-            redirect_header($current_file . '?target=' . $target, 3);
202
+            redirect_header($current_file.'?target='.$target, 3);
203 203
         }
204 204
         $newid                     = $imagecategory->getVar('imgcat_id');
205 205
         $imagecategoryperm_handler = xoops_getHandler('groupperm');
@@ -233,19 +233,19 @@  discard block
 block discarded – undo
233 233
             $imagecategoryperm_handler->insert($imagecategoryperm);
234 234
             unset($imagecategoryperm);
235 235
         }
236
-        redirect_header($current_file . '?target=' . $target, 3, _AM_SYSTEM_DBUPDATED);
236
+        redirect_header($current_file.'?target='.$target, 3, _AM_SYSTEM_DBUPDATED);
237 237
     }
238 238
     // Add new category - end
239 239
 
240 240
     // Update categorie - start
241 241
     if (!empty($_POST['op']) && $op === 'updatecat') {
242 242
         if (!$GLOBALS['xoopsSecurity']->check() || $imgcat_id <= 0) {
243
-            redirect_header($current_file . '?target=' . $target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
243
+            redirect_header($current_file.'?target='.$target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
244 244
         }
245 245
         $imgcat_handler = xoops_getHandler('imagecategory');
246 246
         $imagecategory  = $imgcat_handler->get($imgcat_id);
247 247
         if (!is_object($imagecategory)) {
248
-            redirect_header($current_file . '?target=' . $target, 3);
248
+            redirect_header($current_file.'?target='.$target, 3);
249 249
         }
250 250
         $imagecategory->setVar('imgcat_name', $imgcat_name);
251 251
         $imgcat_display = empty($imgcat_display) ? 0 : 1;
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         $imagecategory->setVar('imgcat_maxheight', $imgcat_maxheight);
256 256
         $imagecategory->setVar('imgcat_weight', $imgcat_weight);
257 257
         if (!$imgcat_handler->insert($imagecategory)) {
258
-            redirect_header($current_file . '?target=' . $target, 3);
258
+            redirect_header($current_file.'?target='.$target, 3);
259 259
         }
260 260
         $imagecategoryperm_handler = xoops_getHandler('groupperm');
261 261
         $criteria                  = new CriteriaCompo(new Criteria('gperm_itemid', $imgcat_id));
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
             $imagecategoryperm_handler->insert($imagecategoryperm);
295 295
             unset($imagecategoryperm);
296 296
         }
297
-        redirect_header($current_file . '?target=' . $target, 3, _AM_SYSTEM_DBUPDATED);
297
+        redirect_header($current_file.'?target='.$target, 3, _AM_SYSTEM_DBUPDATED);
298 298
     }
299 299
     // Update categorie - end
300 300
 
@@ -311,19 +311,19 @@  discard block
 block discarded – undo
311 311
     // Delete categorie - start
312 312
     if (!empty($_POST['op']) && $op === 'delcatok') {
313 313
         if (!$GLOBALS['xoopsSecurity']->check()) {
314
-            redirect_header($current_file . '?target=' . $target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
314
+            redirect_header($current_file.'?target='.$target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
315 315
         }
316 316
         $imgcat_id = (int)$imgcat_id;
317 317
         if ($imgcat_id <= 0) {
318
-            redirect_header($current_file . '?target=' . $target, 3);
318
+            redirect_header($current_file.'?target='.$target, 3);
319 319
         }
320 320
         $imgcat_handler = xoops_getHandler('imagecategory');
321 321
         $imagecategory  = $imgcat_handler->get($imgcat_id);
322 322
         if (!is_object($imagecategory)) {
323
-            redirect_header($current_file . '?target=' . $target, 3);
323
+            redirect_header($current_file.'?target='.$target, 3);
324 324
         }
325 325
         if ($imagecategory->getVar('imgcat_type') !== 'C') {
326
-            redirect_header($current_file . '?target=' . $target, 3, _MD_SCATDELNG);
326
+            redirect_header($current_file.'?target='.$target, 3, _MD_SCATDELNG);
327 327
         }
328 328
         $image_handler = xoops_getHandler('image');
329 329
         $images        = $image_handler->getObjects(new Criteria('imgcat_id', $imgcat_id), true, false);
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
             if (!$image_handler->delete($images[$i])) {
333 333
                 $errors[] = sprintf(_MD_FAILDEL, $i);
334 334
             } else {
335
-                if (file_exists(XOOPS_UPLOAD_PATH . '/' . $images[$i]->getVar('image_name')) && !unlink(XOOPS_UPLOAD_PATH . '/' . $images[$i]->getVar('image_name'))) {
335
+                if (file_exists(XOOPS_UPLOAD_PATH.'/'.$images[$i]->getVar('image_name')) && !unlink(XOOPS_UPLOAD_PATH.'/'.$images[$i]->getVar('image_name'))) {
336 336
                     $errors[] = sprintf(_MD_FAILUNLINK, $i);
337 337
                 }
338 338
             }
@@ -341,9 +341,9 @@  discard block
 block discarded – undo
341 341
             $errors[] = sprintf(_MD_FAILDELCAT, $imagecategory->getVar('imgcat_name'));
342 342
         }
343 343
         if (count($errors) > 0) {
344
-            redirect_header($current_file . '?target=' . $target, 3, xoops_error(implode('<br>', $error)));
344
+            redirect_header($current_file.'?target='.$target, 3, xoops_error(implode('<br>', $error)));
345 345
         }
346
-        redirect_header($current_file . '?target=' . $target, 3, _AM_SYSTEM_DBUPDATED);
346
+        redirect_header($current_file.'?target='.$target, 3, _AM_SYSTEM_DBUPDATED);
347 347
     }
348 348
     // Delete categorie - end
349 349
 
@@ -361,39 +361,39 @@  discard block
 block discarded – undo
361 361
     // Delete file - start
362 362
     if ($op === 'delfileok') {
363 363
         if (!$GLOBALS['xoopsSecurity']->check()) {
364
-            redirect_header($current_file . '?target=' . $target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
364
+            redirect_header($current_file.'?target='.$target, 3, implode('<br>', $GLOBALS['xoopsSecurity']->getErrors()));
365 365
         }
366 366
         $image_id = (int)$image_id;
367 367
         if ($image_id <= 0) {
368
-            redirect_header($current_file . '?target=' . $target, 3);
368
+            redirect_header($current_file.'?target='.$target, 3);
369 369
         }
370 370
         $image_handler = xoops_getHandler('image');
371 371
         $image         = $image_handler->get($image_id);
372 372
         if (!is_object($image)) {
373
-            redirect_header($current_file . '?target=' . $target, 3);
373
+            redirect_header($current_file.'?target='.$target, 3);
374 374
         }
375 375
         if (!$image_handler->delete($image)) {
376
-            redirect_header($current_file . '?target=' . $target, 3, xoops_error(sprintf(_MD_FAILDEL, $image->getVar('image_id'))));
376
+            redirect_header($current_file.'?target='.$target, 3, xoops_error(sprintf(_MD_FAILDEL, $image->getVar('image_id'))));
377 377
         }
378
-        @unlink(XOOPS_UPLOAD_PATH . '/' . $image->getVar('image_name'));
379
-        redirect_header($current_file . '?target=' . $target, 3, _AM_SYSTEM_DBUPDATED);
378
+        @unlink(XOOPS_UPLOAD_PATH.'/'.$image->getVar('image_name'));
379
+        redirect_header($current_file.'?target='.$target, 3, _AM_SYSTEM_DBUPDATED);
380 380
     }
381 381
     // Delete file - end
382 382
     // ************************* NOT USED ************************************
383 383
 }
384 384
 
385 385
 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
386
-echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="' . _LANGCODE . '" lang="' . _LANGCODE . '">';
386
+echo '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'._LANGCODE.'" lang="'._LANGCODE.'">';
387 387
 echo '<head>';
388
-echo '<meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" />';
389
-echo '<meta http-equiv="content-language" content="' . _LANGCODE . '" />';
388
+echo '<meta http-equiv="content-type" content="text/html; charset='._CHARSET.'" />';
389
+echo '<meta http-equiv="content-language" content="'._LANGCODE.'" />';
390 390
 echo '<title>{#xoopsimagebrowser_dlg.dialog_title}</title>';
391 391
 echo '<script type="text/javascript" src="../../tiny_mce_popup.js"></script>';
392 392
 echo '<script type="text/javascript" src="../../utils/mctabs.js"></script>';
393 393
 echo '<script type="text/javascript" src="../../utils/form_utils.js"></script>';
394 394
 echo '<script type="text/javascript" src="../../utils/validate.js"></script>';
395 395
 echo '<script type="text/javascript" src="js/xoopsimagebrowser.js"></script>';
396
-echo '<link href="' . xoops_getcss($xoopsConfig['theme_set']) . '" rel="stylesheet" type="text/css" />';
396
+echo '<link href="'.xoops_getcss($xoopsConfig['theme_set']).'" rel="stylesheet" type="text/css" />';
397 397
 echo '<link href="css/xoopsimagebrowser.css" rel="stylesheet" type="text/css" />';
398 398
 echo '<base target="_self" />';
399 399
 echo '</head>';
@@ -434,14 +434,14 @@  discard block
 block discarded – undo
434 434
                 // count images stored in this category
435 435
                 $this_imgcat_id   = $imagecategories[$i]->getVar('imgcat_id');
436 436
                 $countimagesincat = $image_handler->getCount(new Criteria('imgcat_id', $this_imgcat_id));
437
-                echo $this_imgcat_id . ' - ' . $imagecategories[$i]->getVar('imgcat_name') . ' (' . sprintf(_NUMIMAGES, '<strong>' . $countimagesincat . '</strong>') . ')';
437
+                echo $this_imgcat_id.' - '.$imagecategories[$i]->getVar('imgcat_name').' ('.sprintf(_NUMIMAGES, '<strong>'.$countimagesincat.'</strong>').')';
438 438
                 echo '</td><td class="even">';
439
-                echo '&nbsp;[<a href="' . $current_file . '?target=' . $target . '&amp;op=listimg&amp;imgcat_id=' . $this_imgcat_id . '">' . _LIST . '</a>]';
439
+                echo '&nbsp;[<a href="'.$current_file.'?target='.$target.'&amp;op=listimg&amp;imgcat_id='.$this_imgcat_id.'">'._LIST.'</a>]';
440 440
                 if ($isadmin) {
441
-                    echo '&nbsp;[<a href="' . $current_file . '?target=' . $target . '&amp;op=editcat&amp;imgcat_id=' . $this_imgcat_id . '">' . _EDIT . '</a>]';
441
+                    echo '&nbsp;[<a href="'.$current_file.'?target='.$target.'&amp;op=editcat&amp;imgcat_id='.$this_imgcat_id.'">'._EDIT.'</a>]';
442 442
                 }
443 443
                 if ($isadmin && $imagecategories[$i]->getVar('imgcat_type') === 'C') {
444
-                    echo '&nbsp;[<a href="' . $current_file . '?target=' . $target . '&amp;op=delcat&amp;imgcat_id=' . $this_imgcat_id . '">' . _DELETE . '</a>]';
444
+                    echo '&nbsp;[<a href="'.$current_file.'?target='.$target.'&amp;op=delcat&amp;imgcat_id='.$this_imgcat_id.'">'._DELETE.'</a>]';
445 445
                 }
446 446
             }
447 447
             echo '</td></tr>';
@@ -455,12 +455,12 @@  discard block
 block discarded – undo
455 455
 if ($op === 'listimg') {
456 456
     $imgcat_id = (int)$imgcat_id;
457 457
     if ($imgcat_id <= 0) {
458
-        redirect_header($current_file . '?target=' . $target, 1);
458
+        redirect_header($current_file.'?target='.$target, 1);
459 459
     }
460 460
     $imgcat_handler = xoops_getHandler('imagecategory');
461 461
     $imagecategory  = $imgcat_handler->get($imgcat_id);
462 462
     if (!is_object($imagecategory)) {
463
-        redirect_header($current_file . '?target=' . $target, 1);
463
+        redirect_header($current_file.'?target='.$target, 1);
464 464
     }
465 465
     $image_handler = xoops_getHandler('image');
466 466
 
@@ -473,69 +473,69 @@  discard block
 block discarded – undo
473 473
     $criteria->setLimit(20);
474 474
     $images = $image_handler->getObjects($criteria, true, false);
475 475
 
476
-    echo '<a href="' . $current_file . '?target=' . $target . '">' . _MD_IMGMAIN . '</a>&nbsp;<span style="font-weight:bold;">&gt;</span>&nbsp;' . $imagecategory->getVar('imgcat_name');
476
+    echo '<a href="'.$current_file.'?target='.$target.'">'._MD_IMGMAIN.'</a>&nbsp;<span style="font-weight:bold;">&gt;</span>&nbsp;'.$imagecategory->getVar('imgcat_name');
477 477
     echo '<br><br><strong>{#xoopsimagebrowser_dlg.select_image}</strong>';
478
-    echo '<form action="' . $current_file . '?target=' . $target . '" method="post">';
478
+    echo '<form action="'.$current_file.'?target='.$target.'" method="post">';
479 479
     $rowspan = $catwritelist ? 5 : 2;
480 480
     foreach (array_keys($images) as $i) {
481 481
         $image_src = '';
482 482
         // check if image stored in db/as file - start
483 483
         if ($imagecategory->getVar('imgcat_storetype') === 'db') {
484
-            $image_src = '' . XOOPS_URL . '/image.php?id=' . $i . '';
485
-            if (ini_get('allow_url_fopen') == true){
484
+            $image_src = ''.XOOPS_URL.'/image.php?id='.$i.'';
485
+            if (ini_get('allow_url_fopen') == true) {
486 486
                 $image_info = true;
487 487
                 $image_size = getimagesize($image_src);
488 488
             } else {
489 489
                 $image_info = false;
490 490
             }
491 491
         } else {
492
-            $image_src = '' . XOOPS_UPLOAD_URL . '/' . $images[$i]->getVar('image_name') . '';
493
-            $image_size = getimagesize(XOOPS_ROOT_PATH . '/uploads/' . $images[$i]->getVar('image_name'));
492
+            $image_src = ''.XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name').'';
493
+            $image_size = getimagesize(XOOPS_ROOT_PATH.'/uploads/'.$images[$i]->getVar('image_name'));
494 494
             $image_info = true;
495 495
         }
496 496
         
497 497
         // check if image stored in db/as file - end
498 498
         echo '<table width="100%" class="outer">';
499 499
         echo '<tr>';
500
-        echo '<td rowspan="' . $rowspan . '" class="xoopsimage">';
500
+        echo '<td rowspan="'.$rowspan.'" class="xoopsimage">';
501 501
 
502
-        echo '<img id="imageid' . $images[$i]->getVar('image_id') . '" src="' . $image_src . '" alt="' . $images[$i]->getVar('image_nicename', 'E') . '" title="' . $images[$i]->getVar('image_nicename', 'E') . '" onclick="XoopsimagebrowserDialog.insertAndClose(\'imageid' . $images[$i]->getVar('image_id') . '\');return false;"/>';
502
+        echo '<img id="imageid'.$images[$i]->getVar('image_id').'" src="'.$image_src.'" alt="'.$images[$i]->getVar('image_nicename', 'E').'" title="'.$images[$i]->getVar('image_nicename', 'E').'" onclick="XoopsimagebrowserDialog.insertAndClose(\'imageid'.$images[$i]->getVar('image_id').'\');return false;"/>';
503 503
         echo '<br>';
504
-        if ($image_info == true){
505
-            echo '' . $image_size[0] . 'x' . $image_size[1] . '';
504
+        if ($image_info == true) {
505
+            echo ''.$image_size[0].'x'.$image_size[1].'';
506 506
         }
507 507
         echo '</td>';
508
-        echo '<td class="head">' . _IMAGENAME, '</td>';
509
-        echo '<td class="even"><input type="hidden" name="image_id[]" value="' . $i . '" /><input type="text" name="image_nicename[]" value="' . $images[$i]->getVar('image_nicename', 'E') . '" size="20" maxlength="255" /></td>';
508
+        echo '<td class="head">'._IMAGENAME, '</td>';
509
+        echo '<td class="even"><input type="hidden" name="image_id[]" value="'.$i.'" /><input type="text" name="image_nicename[]" value="'.$images[$i]->getVar('image_nicename', 'E').'" size="20" maxlength="255" /></td>';
510 510
         echo '</tr>';
511 511
 
512 512
         echo '<tr>';
513
-        echo '<td class="head">' . _IMAGEMIME . '</td>';
514
-        echo '<td class="odd">' . $images[$i]->getVar('image_mimetype') . '</td>';
513
+        echo '<td class="head">'._IMAGEMIME.'</td>';
514
+        echo '<td class="odd">'.$images[$i]->getVar('image_mimetype').'</td>';
515 515
         echo '</tr>';
516 516
 
517 517
         if ($catwritelist) {
518 518
             echo '<tr>';
519
-            echo '<td class="head">' . _IMAGECAT . '</td>';
519
+            echo '<td class="head">'._IMAGECAT.'</td>';
520 520
             echo '<td class="even">';
521 521
             echo '<select name="imgcat_id[]" size="1">';
522 522
             $list = $imgcat_handler->getList($groups, null, null, $imagecategory->getVar('imgcat_storetype'));
523 523
             foreach ($list as $value => $name) {
524
-                echo '<option value="' . $value . '"' . (($value == $images[$i]->getVar('imgcat_id')) ? ' selected="selected"' : '') . '>' . $name . '</option>';
524
+                echo '<option value="'.$value.'"'.(($value == $images[$i]->getVar('imgcat_id')) ? ' selected="selected"' : '').'>'.$name.'</option>';
525 525
             }
526 526
             echo '</select>';
527 527
             echo '</td>';
528 528
             echo '</tr>';
529 529
 
530 530
             echo '<tr>';
531
-            echo '<td class="head">' . _IMGWEIGHT . '</td>';
532
-            echo '<td class="odd"><input type="text" name="image_weight[]" value="' . $images[$i]->getVar('image_weight') . '" size="3" maxlength="4" /></td>';
531
+            echo '<td class="head">'._IMGWEIGHT.'</td>';
532
+            echo '<td class="odd"><input type="text" name="image_weight[]" value="'.$images[$i]->getVar('image_weight').'" size="3" maxlength="4" /></td>';
533 533
             echo '</tr>';
534 534
 
535 535
             echo '<tr>';
536
-            echo '<td class="head">' . _IMGDISPLAY . '</td>';
536
+            echo '<td class="head">'._IMGDISPLAY.'</td>';
537 537
             echo '<td class="even">';
538
-            echo '<input type="checkbox" name="image_display[]" value="1"' . (($images[$i]->getVar('image_display') == 1) ? ' checked="checked"' : '') . ' />';
538
+            echo '<input type="checkbox" name="image_display[]" value="1"'.(($images[$i]->getVar('image_display') == 1) ? ' checked="checked"' : '').' />';
539 539
             echo '</td>';
540 540
             echo '</tr>';
541 541
         }
@@ -545,12 +545,12 @@  discard block
 block discarded – undo
545 545
 
546 546
     if ($imgcount > 0) {
547 547
         if ($imgcount > 20) {
548
-            include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
549
-            $nav = new XoopsPageNav($imgcount, 20, $start, 'start', 'op=listimg&amp;target=' . $target . '&amp;imgcat_id=' . $imgcat_id);
550
-            echo '<div text-align="right">' . $nav->renderNav() . '</div>';
548
+            include_once XOOPS_ROOT_PATH.'/class/pagenav.php';
549
+            $nav = new XoopsPageNav($imgcount, 20, $start, 'start', 'op=listimg&amp;target='.$target.'&amp;imgcat_id='.$imgcat_id);
550
+            echo '<div text-align="right">'.$nav->renderNav().'</div>';
551 551
         }
552 552
         if ($catwritelist) {
553
-            echo '<input type="hidden" name="op" value="save" />' . $GLOBALS['xoopsSecurity']->getTokenHTML() . '<input type="submit" name="submit" value="' . _SUBMIT . '" />';
553
+            echo '<input type="hidden" name="op" value="save" />'.$GLOBALS['xoopsSecurity']->getTokenHTML().'<input type="submit" name="submit" value="'._SUBMIT.'" />';
554 554
             echo '</form>';
555 555
         }
556 556
     }
@@ -560,16 +560,16 @@  discard block
 block discarded – undo
560 560
 //edit category - start
561 561
 if ($op === 'editcat') {
562 562
     if ($imgcat_id <= 0) {
563
-        redirect_header($current_file . '?target=' . $target, 1);
563
+        redirect_header($current_file.'?target='.$target, 1);
564 564
     }
565 565
     $imgcat_handler = xoops_getHandler('imagecategory');
566 566
     $imagecategory  = $imgcat_handler->get($imgcat_id);
567 567
     if (!is_object($imagecategory)) {
568
-        redirect_header($current_file . '?target=' . $target, 1);
568
+        redirect_header($current_file.'?target='.$target, 1);
569 569
     }
570
-    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
570
+    include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
571 571
     $imagecategoryperm_handler = xoops_getHandler('groupperm');
572
-    $form                      = new XoopsThemeForm(_MD_EDITIMGCAT, 'imagecat_form', '' . $current_file . '?target=' . $target . '', 'post', true);
572
+    $form                      = new XoopsThemeForm(_MD_EDITIMGCAT, 'imagecat_form', ''.$current_file.'?target='.$target.'', 'post', true);
573 573
     $form->addElement(new XoopsFormText(_MD_IMGCATNAME, 'imgcat_name', 50, 255, $imagecategory->getVar('imgcat_name')), true);
574 574
     $form->addElement(new XoopsFormSelectGroup(_MD_IMGCATRGRP, 'readgroup', true, $imagecategoryperm_handler->getGroupIds('imgcat_read', $imgcat_id), 5, true));
575 575
     $form->addElement(new XoopsFormSelectGroup(_MD_IMGCATWGRP, 'writegroup', true, $imagecategoryperm_handler->getGroupIds('imgcat_write', $imgcat_id), 5, true));
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
     $form->addElement(new XoopsFormHidden('imgcat_id', $imgcat_id));
584 584
     $form->addElement(new XoopsFormHidden('op', 'updatecat'));
585 585
     $form->addElement(new XoopsFormButton('', 'imgcat_button', _SUBMIT, 'submit'));
586
-    echo '<a href="' . $current_file . '?target=' . $target . '">' . _MD_IMGMAIN . '</a>&nbsp;<span style="font-weight:bold;">&gt;</span>&nbsp;' . $imagecategory->getVar('imgcat_name') . '<br><br>';
586
+    echo '<a href="'.$current_file.'?target='.$target.'">'._MD_IMGMAIN.'</a>&nbsp;<span style="font-weight:bold;">&gt;</span>&nbsp;'.$imagecategory->getVar('imgcat_name').'<br><br>';
587 587
     $form->display();
588 588
 }
589 589
 echo '<div class="mceActionPanel floatright" >';
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 //create Image - start
596 596
 if ($isadmin || !empty($catwritelist)) {
597 597
     echo '<div id="loadimage_panel" class="panel" style="overflow:auto;">';
598
-    $form = new XoopsThemeForm(_ADDIMAGE, 'image_form', '' . $current_file . '?target=' . $target . '', 'post', true);
598
+    $form = new XoopsThemeForm(_ADDIMAGE, 'image_form', ''.$current_file.'?target='.$target.'', 'post', true);
599 599
     $form->setExtra('enctype="multipart/form-data"');
600 600
     $form->addElement(new XoopsFormText(_IMAGENAME, 'image_nicename', 50, 255), true);
601 601
     $select = new XoopsFormSelect(_IMAGECAT, 'imgcat_id');
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 //create Category - start
622 622
 if ($isadmin) {
623 623
     echo '<div id="createcategory_panel" class="panel" style="overflow:auto;">';
624
-    $form = new XoopsThemeForm(_MD_ADDIMGCAT, 'imagecat_form', '' . $current_file . '?target=' . $target . '', 'post', true);
624
+    $form = new XoopsThemeForm(_MD_ADDIMGCAT, 'imagecat_form', ''.$current_file.'?target='.$target.'', 'post', true);
625 625
     $form->addElement(new XoopsFormText(_MD_IMGCATNAME, 'imgcat_name', 50, 255), true);
626 626
     $form->addElement(new XoopsFormSelectGroup(_MD_IMGCATRGRP, 'readgroup', true, XOOPS_GROUP_ADMIN, 5, true));
627 627
     $form->addElement(new XoopsFormSelectGroup(_MD_IMGCATWGRP, 'writegroup', true, XOOPS_GROUP_ADMIN, 5, true));
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
     $form->addElement(new XoopsFormText(_IMGMAXHEIGHT, 'imgcat_maxheight', 3, 4, 120));
631 631
     $form->addElement(new XoopsFormText(_MD_IMGCATWEIGHT, 'imgcat_weight', 3, 4, 0));
632 632
     $form->addElement(new XoopsFormRadioYN(_MD_IMGCATDISPLAY, 'imgcat_display', 1, _YES, _NO));
633
-    $storetype = new XoopsFormRadio(_MD_IMGCATSTRTYPE . '<br><span style="color:#ff0000;">' . _MD_STRTYOPENG . '</span>', 'imgcat_storetype', 'file');
633
+    $storetype = new XoopsFormRadio(_MD_IMGCATSTRTYPE.'<br><span style="color:#ff0000;">'._MD_STRTYOPENG.'</span>', 'imgcat_storetype', 'file');
634 634
     $storetype->addOptionArray(array('file' => _MD_ASFILE, 'db' => _MD_INDB));
635 635
     $form->addElement($storetype);
636 636
     $form->addElement(new XoopsFormHidden('op', 'addcat'));
Please login to merge, or discard this patch.