Completed
Push — master ( 716a76...3f8338 )
by Richard
21s queued 12s
created
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.
htdocs/class/captcha/xoopscaptcha.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,8 +73,8 @@
 block discarded – undo
73 73
     protected function __construct()
74 74
     {
75 75
         // Load static configurations
76
-		$xoops_root_path = \XoopsBaseConfig::get('root-path');
77
-		$xoops_var_path = \XoopsBaseConfig::get('var-path');
76
+        $xoops_root_path = \XoopsBaseConfig::get('root-path');
77
+        $xoops_var_path = \XoopsBaseConfig::get('var-path');
78 78
         $this->path_basic = $xoops_root_path . '/class/captcha';
79 79
         $this->path_plugin = $xoops_root_path . '/Frameworks/captcha';
80 80
         $this->configPath = $xoops_var_path . '/configs/';
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
         // Load static configurations
76 76
 		$xoops_root_path = \XoopsBaseConfig::get('root-path');
77 77
 		$xoops_var_path = \XoopsBaseConfig::get('var-path');
78
-        $this->path_basic = $xoops_root_path . '/class/captcha';
79
-        $this->path_plugin = $xoops_root_path . '/Frameworks/captcha';
80
-        $this->configPath = $xoops_var_path . '/configs/';
78
+        $this->path_basic = $xoops_root_path.'/class/captcha';
79
+        $this->path_plugin = $xoops_root_path.'/Frameworks/captcha';
80
+        $this->configPath = $xoops_var_path.'/configs/';
81 81
         $this->config = $this->loadConfig();
82 82
         $this->name = $this->config['name'];
83 83
     }
@@ -104,15 +104,15 @@  discard block
 block discarded – undo
104 104
      *
105 105
      * @return array
106 106
      */
107
-    function loadConfig( $name = 'config') {
108
-        if ( $name === 'config' ) {
107
+    function loadConfig($name = 'config') {
108
+        if ($name === 'config') {
109 109
             $filename = 'captcha.config';
110 110
         } else {
111
-            $filename = 'captcha.config.' . $name;
111
+            $filename = 'captcha.config.'.$name;
112 112
         }
113
-        if ( !$config = $this->readConfig($filename) ) {
114
-            $config = $this->loadBasicConfig( $name );
115
-            $this->writeConfig($filename, $config );
113
+        if (!$config = $this->readConfig($filename)) {
114
+            $config = $this->loadBasicConfig($name);
115
+            $this->writeConfig($filename, $config);
116 116
         }
117 117
 
118 118
         return $config;
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $basic_config = array();
131 131
         $plugin_config = array();
132
-        $filename = ($filename === 'config') ? 'config.php' : 'config.' . $filename . '.php';
133
-        if (XoopsLoad::fileExists($file = $this->path_basic . '/' . $filename)) {
132
+        $filename = ($filename === 'config') ? 'config.php' : 'config.'.$filename.'.php';
133
+        if (XoopsLoad::fileExists($file = $this->path_basic.'/'.$filename)) {
134 134
             $basic_config = include $file;
135 135
         }
136
-        if (XoopsLoad::fileExists($file = $this->path_plugin . '/' . $filename)) {
136
+        if (XoopsLoad::fileExists($file = $this->path_plugin.'/'.$filename)) {
137 137
             $plugin_config = include $file;
138 138
         }
139 139
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     function readConfig($filename = 'config')
152 152
     {
153
-        $path_file = $this->configPath . $filename . '.php';
153
+        $path_file = $this->configPath.$filename.'.php';
154 154
         $file = XoopsFile::getHandler('file', $path_file);
155 155
         return eval(@$file->read());
156 156
     }
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
      */
166 166
     function writeConfig($filename = 'config', $config)
167 167
     {
168
-        $path_file = $this->configPath . $filename . '.php';
168
+        $path_file = $this->configPath.$filename.'.php';
169 169
         $file = XoopsFile::getHandler('file', $path_file);
170
-        return $file->write( 'return ' . var_export($config, true) . ';');
170
+        return $file->write('return '.var_export($config, true).';');
171 171
     }
172 172
 
173 173
     /**
@@ -207,22 +207,22 @@  discard block
 block discarded – undo
207 207
     public function loadHandler($name = null)
208 208
     {
209 209
         $name = !empty($name) ? $name : (empty($this->config['mode']) ? 'text' : $this->config['mode']);
210
-        $class = 'XoopsCaptcha' . ucfirst($name);
210
+        $class = 'XoopsCaptcha'.ucfirst($name);
211 211
         if (!empty($this->handler) && get_class($this->handler) == $class) {
212 212
             return $this->handler;
213 213
         }
214 214
         $this->handler = null;
215
-        if (XoopsLoad::fileExists($file = $this->path_basic . '/' . $name . '.php')) {
215
+        if (XoopsLoad::fileExists($file = $this->path_basic.'/'.$name.'.php')) {
216 216
             require_once $file;
217 217
         } else {
218
-            if (XoopsLoad::fileExists($file = $this->path_plugin . '/' . $name . '.php')) {
218
+            if (XoopsLoad::fileExists($file = $this->path_plugin.'/'.$name.'.php')) {
219 219
                 require_once $file;
220 220
             }
221 221
         }
222 222
 
223 223
         if (!class_exists($class)) {
224 224
             $class = 'XoopsCaptchaText';
225
-            require_once $this->path_basic . '/text.php';
225
+            require_once $this->path_basic.'/text.php';
226 226
         }
227 227
         /* @var $handler XoopsCaptchaMethod */
228 228
         $handler = new $class($this);
@@ -348,8 +348,8 @@  discard block
 block discarded – undo
348 348
         $this->handler->destroyGarbage();
349 349
 
350 350
         if ($clearSession) {
351
-            foreach ($this->config as $k => $config ) {
352
-                $_SESSION[$this->name . '_' . $k] = null;
351
+            foreach ($this->config as $k => $config) {
352
+                $_SESSION[$this->name.'_'.$k] = null;
353 353
             }
354 354
         }
355 355
         return true;
@@ -363,9 +363,9 @@  discard block
 block discarded – undo
363 363
     public function render()
364 364
     {
365 365
         $sessionName = $this->config['name'];
366
-        $_SESSION[$sessionName . '_name'] = $sessionName;
367
-        foreach ($this->config as $k => $config ) {
368
-            $_SESSION[$sessionName . '_' . $k] = $config;
366
+        $_SESSION[$sessionName.'_name'] = $sessionName;
367
+        foreach ($this->config as $k => $config) {
368
+            $_SESSION[$sessionName.'_'.$k] = $config;
369 369
         }
370 370
         $form = '';
371 371
         if (!$this->active || empty($this->config['name'])) {
@@ -373,8 +373,8 @@  discard block
 block discarded – undo
373 373
         }
374 374
 
375 375
         $maxAttempts = $this->config['maxattempts'];
376
-        $attempt = isset($_SESSION[$sessionName . '_attempt']) ? $_SESSION[$sessionName . '_attempt'] : 0;
377
-        $_SESSION[$sessionName . '_attempt'] = $attempt;
376
+        $attempt = isset($_SESSION[$sessionName.'_attempt']) ? $_SESSION[$sessionName.'_attempt'] : 0;
377
+        $_SESSION[$sessionName.'_attempt'] = $attempt;
378 378
 
379 379
         // Failure on too many attempts
380 380
         if (!empty($maxAttempts) && $attempt > $maxAttempts) {
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
     {
411 411
         $code = ($code === null) ? $this->handler->getCode() : $code;
412 412
         if (!empty($code)) {
413
-            $_SESSION[$this->name . '_code'] = $code;
413
+            $_SESSION[$this->name.'_code'] = $code;
414 414
             return true;
415 415
         }
416 416
         return false;
Please login to merge, or discard this patch.
htdocs/class/captcha/xoopscaptchamethod.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,12 +75,13 @@
 block discarded – undo
75 75
      */
76 76
     public function loadConfig($name = '')
77 77
     {
78
-        if (!is_object($this->handler))
79
-            $this->config = array();
80
-        else
81
-            $this->config = empty($name)
78
+        if (!is_object($this->handler)) {
79
+                    $this->config = array();
80
+        } else {
81
+                    $this->config = empty($name)
82 82
                 ? $this->handler->config
83 83
                 : array_merge($this->handler->config, $this->handler->loadConfig($name));
84
+        }
84 85
     }
85 86
 
86 87
     /**
Please login to merge, or discard this patch.
htdocs/class/captcha/recaptcha/recaptchalib.php 2 patches
Indentation   +7 added lines, -8 removed lines patch added patch discarded remove patch
@@ -105,7 +105,6 @@  discard block
 block discarded – undo
105 105
  * @param string $pubkey A public key for reCAPTCHA
106 106
  * @param string $error The error given by reCAPTCHA (optional, default is null)
107 107
  * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false)
108
-
109 108
  * @return string - The HTML to be embedded in the user's form.
110 109
  */
111 110
 function recaptcha_get_html($pubkey, $error = null, $use_ssl = false)
@@ -172,13 +171,13 @@  discard block
 block discarded – undo
172 171
     }
173 172
 
174 173
     $response = _recaptcha_http_post(RECAPTCHA_VERIFY_SERVER,
175
-		"/recaptcha/api/verify",
176
-		array(
177
-			   'privatekey' => $privkey,
178
-			   'remoteip' => $remoteip,
179
-			   'challenge' => $challenge,
180
-			   'response' => $response
181
-		   ) + $extra_params);
174
+        "/recaptcha/api/verify",
175
+        array(
176
+                'privatekey' => $privkey,
177
+                'remoteip' => $remoteip,
178
+                'challenge' => $challenge,
179
+                'response' => $response
180
+            ) + $extra_params);
182 181
 
183 182
     $answers = explode("\n", $response [1]);
184 183
     $recaptcha_response = new ReCaptchaResponse();
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 {
51 51
     $req = "";
52 52
     foreach ($data as $key => $value) {
53
-        $req .= $key . '=' . urlencode(stripslashes($value)) . '&';
53
+        $req .= $key.'='.urlencode(stripslashes($value)).'&';
54 54
     }
55 55
 
56 56
     // Cut the last '&'
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     $http_request = "POST $path HTTP/1.0\r\n";
77 77
     $http_request .= "Host: $host\r\n";
78 78
     $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
79
-    $http_request .= "Content-Length: " . strlen($req) . "\r\n";
79
+    $http_request .= "Content-Length: ".strlen($req)."\r\n";
80 80
     $http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
81 81
     $http_request .= "\r\n";
82 82
     $http_request .= $req;
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 
123 123
     $errorpart = "";
124 124
     if ($error) {
125
-        $errorpart = "&amp;error=" . $error;
125
+        $errorpart = "&amp;error=".$error;
126 126
     }
127
-    return '<script type="text/javascript" src="' . $server . '/challenge?k=' . $pubkey . $errorpart . '"></script>
127
+    return '<script type="text/javascript" src="'.$server.'/challenge?k='.$pubkey.$errorpart.'"></script>
128 128
 
129 129
     <noscript>
130
-        <iframe src="' . $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
130
+        <iframe src="' . $server.'/noscript?k='.$pubkey.$errorpart.'" height="300" width="500" frameborder="0"></iframe><br/>
131 131
         <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
132 132
         <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
133 133
     </noscript>';
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
  */
204 204
 function recaptcha_get_signup_url($domain = null, $appname = null)
205 205
 {
206
-    return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode(
206
+    return "https://www.google.com/recaptcha/admin/create?"._recaptcha_qsencode(
207 207
         array('domains' => $domain, 'app' => $appname));
208 208
 }
209 209
 
@@ -256,13 +256,13 @@  discard block
 block discarded – undo
256 256
 function recaptcha_mailhide_url($pubkey, $privkey, $email)
257 257
 {
258 258
     if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) {
259
-        die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . "you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
259
+        die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, "."you can do so at <a href='http://www.google.com/recaptcha/mailhide/apikey'>http://www.google.com/recaptcha/mailhide/apikey</a>");
260 260
     }
261 261
 
262 262
     $ky = pack('H*', $privkey);
263 263
     $cryptmail = _recaptcha_aes_encrypt($email, $ky);
264 264
 
265
-    return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64($cryptmail);
265
+    return "http://www.google.com/recaptcha/mailhide/d?k=".$pubkey."&c="._recaptcha_mailhide_urlbase64($cryptmail);
266 266
 }
267 267
 
268 268
 /**
@@ -305,5 +305,5 @@  discard block
 block discarded – undo
305 305
     $emailparts = _recaptcha_mailhide_email_parts($email);
306 306
     $url = recaptcha_mailhide_url($pubkey, $privkey, $email);
307 307
 
308
-    return htmlentities($emailparts[0]) . "<a href='" . htmlentities($url) . "' onclick=\"window.open('" . htmlentities($url) . "', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@" . htmlentities($emailparts [1]);
308
+    return htmlentities($emailparts[0])."<a href='".htmlentities($url)."' onclick=\"window.open('".htmlentities($url)."', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;\" title=\"Reveal this e-mail address\">...</a>@".htmlentities($emailparts [1]);
309 309
 }
Please login to merge, or discard this patch.