Completed
Push — master ( 01b1a5...81f493 )
by Michael
04:03
created
include/captcha/captcha.php 1 patch
Indentation   +230 added lines, -230 removed lines patch added patch discarded remove patch
@@ -13,239 +13,239 @@
 block discarded – undo
13 13
  */
14 14
 class XoopsCaptcha
15 15
 {
16
-    public $active = true;
17
-    public $mode   = 'text';    // potential values: image, text
18
-    public $config = array();
19
-
20
-    public $message = array(); // Logging error messages
21
-
22
-    /**
23
-     * XoopsCaptcha constructor.
24
-     */
25
-    public function __construct()
26
-    {
27
-        // Loading default preferences
28
-        $this->config = @include __DIR__ . '/config.php';
29
-
30
-        $this->setMode($this->config['mode']);
31
-    }
32
-
33
-    /**
34
-     * @return XoopsCaptcha
35
-     */
36
-    public static function getInstance()
37
-    {
38
-        static $instance;
39
-        if (null === $instance) {
40
-            $instance = new static();
41
-        }
42
-
43
-        return $instance;
44
-    }
45
-
46
-    /**
47
-     * @param $name
48
-     * @param $val
49
-     * @return bool
50
-     */
51
-    public function setConfig($name, $val)
52
-    {
53
-        if ($name === 'mode') {
54
-            $this->setMode($val);
55
-        } elseif (isset($this->$name)) {
56
-            $this->$name = $val;
57
-        } else {
58
-            $this->config[$name] = $val;
59
-        }
60
-
61
-        return true;
62
-    }
63
-
64
-    /**
65
-     * Set CAPTCHA mode
66
-     *
67
-     * For future possible modes, right now force to use text or image
68
-     *
69
-     * @param string $mode if no mode is set, just verify current mode
70
-     */
71
-    public function setMode($mode = null)
72
-    {
73
-        if (!empty($mode) && in_array($mode, array('text', 'image'))) {
74
-            $this->mode = $mode;
75
-
76
-            if ($this->mode !== 'image') {
77
-                return;
78
-            }
79
-        }
80
-
81
-        // Disable image mode
82
-        if (!extension_loaded('gd')) {
83
-            $this->mode = 'text';
84
-        } else {
85
-            $required_functions = array('imagecreatetruecolor', 'imagecolorallocate', 'imagefilledrectangle', 'imagejpeg', 'imagedestroy', 'imageftbbox');
86
-            foreach ($required_functions as $func) {
87
-                if (!function_exists($func)) {
88
-                    $this->mode = 'text';
89
-                    break;
90
-                }
91
-            }
92
-        }
93
-    }
94
-
95
-    /**
96
-     * Initializing the CAPTCHA class
97
-     * @param string $name
98
-     * @param null   $skipmember
99
-     * @param null   $num_chars
100
-     * @param null   $fontsize_min
101
-     * @param null   $fontsize_max
102
-     * @param null   $background_type
103
-     * @param null   $background_num
104
-     */
105
-    public function init($name = 'xoopscaptcha', $skipmember = null, $num_chars = null, $fontsize_min = null, $fontsize_max = null, $background_type = null, $background_num = null)
106
-    {
107
-        // Loading RUN-TIME settings
108
-        foreach (array_keys($this->config) as $key) {
109
-            if (isset(${$key}) && ${$key} !== null) {
110
-                $this->config[$key] = ${$key};
111
-            }
112
-        }
113
-        $this->config['name'] = $name;
114
-
115
-        // Skip CAPTCHA for member if set
116
-        if ($this->config['skipmember'] && is_object($GLOBALS['xoopsUser'])) {
117
-            $this->active = false;
118
-        }
119
-    }
120
-
121
-    /**
122
-     * Verify user submission
123
-     * @param  null $skipMember
124
-     * @return bool
125
-     */
126
-    public function verify($skipMember = null)
127
-    {
128
-        $sessionName = @$_SESSION['XoopsCaptcha_name'];
129
-        $skipMember  = ($skipMember === null) ? @$_SESSION['XoopsCaptcha_skipmember'] : $skipMember;
130
-        $maxAttempts = (int)(@$_SESSION['XoopsCaptcha_maxattempts']);
131
-
132
-        $is_valid = false;
133
-
134
-        // Skip CAPTCHA for member if set
135
-        if (is_object($GLOBALS['xoopsUser']) && !empty($skipMember)) {
136
-            $is_valid = true;
137
-            // Kill too many attempts
138
-        } elseif (!empty($maxAttempts) && $_SESSION['XoopsCaptcha_attempt_' . $sessionName] > $maxAttempts) {
139
-            $this->message[] = XOOPS_CAPTCHA_TOOMANYATTEMPTS;
140
-
141
-            // Verify the code
142
-        } elseif (!empty($_SESSION['XoopsCaptcha_sessioncode'])) {
143
-            $func     = $this->config['casesensitive'] ? 'strcmp' : 'strcasecmp';
144
-            $is_valid = !$func(trim(@$_POST[$sessionName]), $_SESSION['XoopsCaptcha_sessioncode']);
145
-        }
146
-
147
-        if (!empty($maxAttempts)) {
148
-            if (!$is_valid) {
149
-                // Increase the attempt records on failure
150
-                $_SESSION['XoopsCaptcha_attempt_' . $sessionName]++;
151
-                // Log the error message
152
-                $this->message[] = XOOPS_CAPTCHA_INVALID_CODE;
153
-            } else {
154
-
155
-                // reset attempt records on success
156
-                $_SESSION['XoopsCaptcha_attempt_' . $sessionName] = null;
157
-            }
158
-        }
159
-        $this->destroyGarbage(true);
160
-
161
-        return $is_valid;
162
-    }
163
-
164
-    /**
165
-     * @return mixed|string
166
-     */
167
-    public function getCaption()
168
-    {
169
-        return defined('XOOPS_CAPTCHA_CAPTION') ? constant('XOOPS_CAPTCHA_CAPTION') : '';
170
-    }
171
-
172
-    /**
173
-     * @return string
174
-     */
175
-    public function getMessage()
176
-    {
177
-        return implode('<br>', $this->message);
178
-    }
179
-
180
-    /**
181
-     * Destory historical stuff
182
-     * @param  bool $clearSession
183
-     * @return bool
184
-     */
185
-    public function destroyGarbage($clearSession = false)
186
-    {
187
-        require_once __DIR__ . '/' . $this->mode . '.php';
188
-        $class          = 'XoopsCaptcha' . ucfirst($this->mode);
189
-        $captchaHandler = new $class();
190
-        if (method_exists($captchaHandler, 'destroyGarbage')) {
191
-            $captchaHandler->loadConfig($this->config);
192
-            $captchaHandler->destroyGarbage();
193
-        }
194
-
195
-        if ($clearSession) {
196
-            $_SESSION['XoopsCaptcha_name']        = null;
197
-            $_SESSION['XoopsCaptcha_skipmember']  = null;
198
-            $_SESSION['XoopsCaptcha_sessioncode'] = null;
199
-            $_SESSION['XoopsCaptcha_maxattempts'] = null;
200
-        }
201
-
202
-        return true;
203
-    }
204
-
205
-    /**
206
-     * @return mixed|string
207
-     */
208
-    public function render()
209
-    {
210
-        $form = '';
211
-
212
-        if (!$this->active || empty($this->config['name'])) {
213
-            return $form;
214
-        }
215
-
216
-        $_SESSION['XoopsCaptcha_name']        = $this->config['name'];
217
-        $_SESSION['XoopsCaptcha_skipmember']  = $this->config['skipmember'];
218
-        $maxAttempts                          = $this->config['maxattempt'];
219
-        $_SESSION['XoopsCaptcha_maxattempts'] = $maxAttempts;
220
-        /*
16
+	public $active = true;
17
+	public $mode   = 'text';    // potential values: image, text
18
+	public $config = array();
19
+
20
+	public $message = array(); // Logging error messages
21
+
22
+	/**
23
+	 * XoopsCaptcha constructor.
24
+	 */
25
+	public function __construct()
26
+	{
27
+		// Loading default preferences
28
+		$this->config = @include __DIR__ . '/config.php';
29
+
30
+		$this->setMode($this->config['mode']);
31
+	}
32
+
33
+	/**
34
+	 * @return XoopsCaptcha
35
+	 */
36
+	public static function getInstance()
37
+	{
38
+		static $instance;
39
+		if (null === $instance) {
40
+			$instance = new static();
41
+		}
42
+
43
+		return $instance;
44
+	}
45
+
46
+	/**
47
+	 * @param $name
48
+	 * @param $val
49
+	 * @return bool
50
+	 */
51
+	public function setConfig($name, $val)
52
+	{
53
+		if ($name === 'mode') {
54
+			$this->setMode($val);
55
+		} elseif (isset($this->$name)) {
56
+			$this->$name = $val;
57
+		} else {
58
+			$this->config[$name] = $val;
59
+		}
60
+
61
+		return true;
62
+	}
63
+
64
+	/**
65
+	 * Set CAPTCHA mode
66
+	 *
67
+	 * For future possible modes, right now force to use text or image
68
+	 *
69
+	 * @param string $mode if no mode is set, just verify current mode
70
+	 */
71
+	public function setMode($mode = null)
72
+	{
73
+		if (!empty($mode) && in_array($mode, array('text', 'image'))) {
74
+			$this->mode = $mode;
75
+
76
+			if ($this->mode !== 'image') {
77
+				return;
78
+			}
79
+		}
80
+
81
+		// Disable image mode
82
+		if (!extension_loaded('gd')) {
83
+			$this->mode = 'text';
84
+		} else {
85
+			$required_functions = array('imagecreatetruecolor', 'imagecolorallocate', 'imagefilledrectangle', 'imagejpeg', 'imagedestroy', 'imageftbbox');
86
+			foreach ($required_functions as $func) {
87
+				if (!function_exists($func)) {
88
+					$this->mode = 'text';
89
+					break;
90
+				}
91
+			}
92
+		}
93
+	}
94
+
95
+	/**
96
+	 * Initializing the CAPTCHA class
97
+	 * @param string $name
98
+	 * @param null   $skipmember
99
+	 * @param null   $num_chars
100
+	 * @param null   $fontsize_min
101
+	 * @param null   $fontsize_max
102
+	 * @param null   $background_type
103
+	 * @param null   $background_num
104
+	 */
105
+	public function init($name = 'xoopscaptcha', $skipmember = null, $num_chars = null, $fontsize_min = null, $fontsize_max = null, $background_type = null, $background_num = null)
106
+	{
107
+		// Loading RUN-TIME settings
108
+		foreach (array_keys($this->config) as $key) {
109
+			if (isset(${$key}) && ${$key} !== null) {
110
+				$this->config[$key] = ${$key};
111
+			}
112
+		}
113
+		$this->config['name'] = $name;
114
+
115
+		// Skip CAPTCHA for member if set
116
+		if ($this->config['skipmember'] && is_object($GLOBALS['xoopsUser'])) {
117
+			$this->active = false;
118
+		}
119
+	}
120
+
121
+	/**
122
+	 * Verify user submission
123
+	 * @param  null $skipMember
124
+	 * @return bool
125
+	 */
126
+	public function verify($skipMember = null)
127
+	{
128
+		$sessionName = @$_SESSION['XoopsCaptcha_name'];
129
+		$skipMember  = ($skipMember === null) ? @$_SESSION['XoopsCaptcha_skipmember'] : $skipMember;
130
+		$maxAttempts = (int)(@$_SESSION['XoopsCaptcha_maxattempts']);
131
+
132
+		$is_valid = false;
133
+
134
+		// Skip CAPTCHA for member if set
135
+		if (is_object($GLOBALS['xoopsUser']) && !empty($skipMember)) {
136
+			$is_valid = true;
137
+			// Kill too many attempts
138
+		} elseif (!empty($maxAttempts) && $_SESSION['XoopsCaptcha_attempt_' . $sessionName] > $maxAttempts) {
139
+			$this->message[] = XOOPS_CAPTCHA_TOOMANYATTEMPTS;
140
+
141
+			// Verify the code
142
+		} elseif (!empty($_SESSION['XoopsCaptcha_sessioncode'])) {
143
+			$func     = $this->config['casesensitive'] ? 'strcmp' : 'strcasecmp';
144
+			$is_valid = !$func(trim(@$_POST[$sessionName]), $_SESSION['XoopsCaptcha_sessioncode']);
145
+		}
146
+
147
+		if (!empty($maxAttempts)) {
148
+			if (!$is_valid) {
149
+				// Increase the attempt records on failure
150
+				$_SESSION['XoopsCaptcha_attempt_' . $sessionName]++;
151
+				// Log the error message
152
+				$this->message[] = XOOPS_CAPTCHA_INVALID_CODE;
153
+			} else {
154
+
155
+				// reset attempt records on success
156
+				$_SESSION['XoopsCaptcha_attempt_' . $sessionName] = null;
157
+			}
158
+		}
159
+		$this->destroyGarbage(true);
160
+
161
+		return $is_valid;
162
+	}
163
+
164
+	/**
165
+	 * @return mixed|string
166
+	 */
167
+	public function getCaption()
168
+	{
169
+		return defined('XOOPS_CAPTCHA_CAPTION') ? constant('XOOPS_CAPTCHA_CAPTION') : '';
170
+	}
171
+
172
+	/**
173
+	 * @return string
174
+	 */
175
+	public function getMessage()
176
+	{
177
+		return implode('<br>', $this->message);
178
+	}
179
+
180
+	/**
181
+	 * Destory historical stuff
182
+	 * @param  bool $clearSession
183
+	 * @return bool
184
+	 */
185
+	public function destroyGarbage($clearSession = false)
186
+	{
187
+		require_once __DIR__ . '/' . $this->mode . '.php';
188
+		$class          = 'XoopsCaptcha' . ucfirst($this->mode);
189
+		$captchaHandler = new $class();
190
+		if (method_exists($captchaHandler, 'destroyGarbage')) {
191
+			$captchaHandler->loadConfig($this->config);
192
+			$captchaHandler->destroyGarbage();
193
+		}
194
+
195
+		if ($clearSession) {
196
+			$_SESSION['XoopsCaptcha_name']        = null;
197
+			$_SESSION['XoopsCaptcha_skipmember']  = null;
198
+			$_SESSION['XoopsCaptcha_sessioncode'] = null;
199
+			$_SESSION['XoopsCaptcha_maxattempts'] = null;
200
+		}
201
+
202
+		return true;
203
+	}
204
+
205
+	/**
206
+	 * @return mixed|string
207
+	 */
208
+	public function render()
209
+	{
210
+		$form = '';
211
+
212
+		if (!$this->active || empty($this->config['name'])) {
213
+			return $form;
214
+		}
215
+
216
+		$_SESSION['XoopsCaptcha_name']        = $this->config['name'];
217
+		$_SESSION['XoopsCaptcha_skipmember']  = $this->config['skipmember'];
218
+		$maxAttempts                          = $this->config['maxattempt'];
219
+		$_SESSION['XoopsCaptcha_maxattempts'] = $maxAttempts;
220
+		/*
221 221
          if (!empty($maxAttempts)) {
222 222
          $_SESSION['XoopsCaptcha_maxattempts_'.$_SESSION['XoopsCaptcha_name']] = $maxAttempts;
223 223
          }
224 224
          */
225 225
 
226
-        // Fail on too many attempts
227
-        if (!empty($maxAttempts) && @$_SESSION['XoopsCaptcha_attempt_' . $this->config['name']] > $maxAttempts) {
228
-            $form = XOOPS_CAPTCHA_TOOMANYATTEMPTS;
229
-            // Load the form element
230
-        } else {
231
-            $form = $this->loadForm();
232
-        }
233
-
234
-        return $form;
235
-    }
236
-
237
-    /**
238
-     * @return mixed
239
-     */
240
-    public function loadForm()
241
-    {
242
-        require_once __DIR__ . '/' . $this->mode . '.php';
243
-        $class          = 'XoopsCaptcha' . ucfirst($this->mode);
244
-        $captchaHandler = new $class();
245
-        $captchaHandler->loadConfig($this->config);
246
-
247
-        $form = $captchaHandler->render();
248
-
249
-        return $form;
250
-    }
226
+		// Fail on too many attempts
227
+		if (!empty($maxAttempts) && @$_SESSION['XoopsCaptcha_attempt_' . $this->config['name']] > $maxAttempts) {
228
+			$form = XOOPS_CAPTCHA_TOOMANYATTEMPTS;
229
+			// Load the form element
230
+		} else {
231
+			$form = $this->loadForm();
232
+		}
233
+
234
+		return $form;
235
+	}
236
+
237
+	/**
238
+	 * @return mixed
239
+	 */
240
+	public function loadForm()
241
+	{
242
+		require_once __DIR__ . '/' . $this->mode . '.php';
243
+		$class          = 'XoopsCaptcha' . ucfirst($this->mode);
244
+		$captchaHandler = new $class();
245
+		$captchaHandler->loadConfig($this->config);
246
+
247
+		$form = $captchaHandler->render();
248
+
249
+		return $form;
250
+	}
251 251
 }
Please login to merge, or discard this patch.
include/captcha/image.php 1 patch
Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -7,82 +7,82 @@
 block discarded – undo
7 7
  */
8 8
 class XoopsCaptchaImage
9 9
 {
10
-    public $config = array();
10
+	public $config = array();
11 11
 
12
-    /**
13
-     * XoopsCaptchaImage constructor.
14
-     */
15
-    public function __construct()
16
-    {
17
-        //$this->name = md5( session_id() );
18
-    }
12
+	/**
13
+	 * XoopsCaptchaImage constructor.
14
+	 */
15
+	public function __construct()
16
+	{
17
+		//$this->name = md5( session_id() );
18
+	}
19 19
 
20
-    /**
21
-     * @return XoopsCaptchaImage
22
-     */
23
-    public static function getInstance()
24
-    {
25
-        static $instance;
26
-        if (null === $instance) {
27
-            $instance = new static();
28
-        }
20
+	/**
21
+	 * @return XoopsCaptchaImage
22
+	 */
23
+	public static function getInstance()
24
+	{
25
+		static $instance;
26
+		if (null === $instance) {
27
+			$instance = new static();
28
+		}
29 29
 
30
-        return $instance;
31
-    }
30
+		return $instance;
31
+	}
32 32
 
33
-    /**
34
-     * Loading configs from CAPTCHA class
35
-     * @param array $config
36
-     */
37
-    public function loadConfig($config = array())
38
-    {
39
-        // Loading default preferences
40
-        $this->config = $config;
41
-    }
33
+	/**
34
+	 * Loading configs from CAPTCHA class
35
+	 * @param array $config
36
+	 */
37
+	public function loadConfig($config = array())
38
+	{
39
+		// Loading default preferences
40
+		$this->config = $config;
41
+	}
42 42
 
43
-    /**
44
-     * @return string
45
-     */
46
-    public function render()
47
-    {
48
-        $form = "<input type='text' name='" .
49
-                $this->config['name'] .
50
-                "' id='" .
51
-                $this->config['name'] .
52
-                "' size='" .
53
-                $this->config['num_chars'] .
54
-                "' maxlength='" .
55
-                $this->config['num_chars'] .
56
-                "' value='' /> &nbsp; " .
57
-                $this->loadImage();
58
-        $rule = htmlspecialchars(XOOPS_CAPTCHA_REFRESH, ENT_QUOTES);
59
-        if ($this->config['maxattempt']) {
60
-            $rule .= ' | ' . sprintf(constant('XOOPS_CAPTCHA_MAXATTEMPTS'), $this->config['maxattempt']);
61
-        }
62
-        $form .= "&nbsp;&nbsp;<small>{$rule}</small>";
43
+	/**
44
+	 * @return string
45
+	 */
46
+	public function render()
47
+	{
48
+		$form = "<input type='text' name='" .
49
+				$this->config['name'] .
50
+				"' id='" .
51
+				$this->config['name'] .
52
+				"' size='" .
53
+				$this->config['num_chars'] .
54
+				"' maxlength='" .
55
+				$this->config['num_chars'] .
56
+				"' value='' /> &nbsp; " .
57
+				$this->loadImage();
58
+		$rule = htmlspecialchars(XOOPS_CAPTCHA_REFRESH, ENT_QUOTES);
59
+		if ($this->config['maxattempt']) {
60
+			$rule .= ' | ' . sprintf(constant('XOOPS_CAPTCHA_MAXATTEMPTS'), $this->config['maxattempt']);
61
+		}
62
+		$form .= "&nbsp;&nbsp;<small>{$rule}</small>";
63 63
 
64
-        return $form;
65
-    }
64
+		return $form;
65
+	}
66 66
 
67
-    /**
68
-     * @return string
69
-     */
70
-    public function loadImage()
71
-    {
72
-        $rule = $this->config['casesensitive'] ? constant('XOOPS_CAPTCHA_RULE_CASESENSITIVE') : constant('XOOPS_CAPTCHA_RULE_CASEINSENSITIVE');
73
-        $ret  = "<img id='captcha' src='" .
74
-                XOOPS_URL .
75
-                '/' .
76
-                $this->config['imageurl'] .
77
-                "' onclick=\"this.src='" .
78
-                XOOPS_URL .
79
-                '/' .
80
-                $this->config['imageurl'] .
81
-                "?refresh='+Math.random()" .
82
-                "\" align='absmiddle'  style='cursor: pointer;' alt='" .
83
-                htmlspecialchars($rule, ENT_QUOTES) .
84
-                "' />";
67
+	/**
68
+	 * @return string
69
+	 */
70
+	public function loadImage()
71
+	{
72
+		$rule = $this->config['casesensitive'] ? constant('XOOPS_CAPTCHA_RULE_CASESENSITIVE') : constant('XOOPS_CAPTCHA_RULE_CASEINSENSITIVE');
73
+		$ret  = "<img id='captcha' src='" .
74
+				XOOPS_URL .
75
+				'/' .
76
+				$this->config['imageurl'] .
77
+				"' onclick=\"this.src='" .
78
+				XOOPS_URL .
79
+				'/' .
80
+				$this->config['imageurl'] .
81
+				"?refresh='+Math.random()" .
82
+				"\" align='absmiddle'  style='cursor: pointer;' alt='" .
83
+				htmlspecialchars($rule, ENT_QUOTES) .
84
+				"' />";
85 85
 
86
-        return $ret;
87
-    }
86
+		return $ret;
87
+	}
88 88
 }
Please login to merge, or discard this patch.
include/xoops_core_common_functions.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -14,15 +14,15 @@  discard block
 block discarded – undo
14 14
  */
15 15
 function xoops_debug_dumbQuery($msg = '')
16 16
 {
17
-    global $xoopsDB;
18
-    $xoopsDB->query('SELECT * ' . $msg . ' FROM dudewhereismycar2');
17
+	global $xoopsDB;
18
+	$xoopsDB->query('SELECT * ' . $msg . ' FROM dudewhereismycar2');
19 19
 }
20 20
 
21 21
 function xoops_debug_initiateQueryCount()
22 22
 {
23
-    global $smartfactory_query_count_activated, $smartfactory_query_count;
24
-    $smartfactory_query_count_activated = true;
25
-    $smartfactory_query_count           = 0;
23
+	global $smartfactory_query_count_activated, $smartfactory_query_count;
24
+	$smartfactory_query_count_activated = true;
25
+	$smartfactory_query_count           = 0;
26 26
 }
27 27
 
28 28
 /**
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
  */
31 31
 function xoops_debug_getQueryCount($msg = '')
32 32
 {
33
-    global $smartfactory_query_count;
33
+	global $smartfactory_query_count;
34 34
 
35
-    return xoops_debug("xoops debug Query count ($msg): $smartfactory_query_count");
35
+	return xoops_debug("xoops debug Query count ($msg): $smartfactory_query_count");
36 36
 }
37 37
 
38 38
 /**
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
  */
42 42
 function xoops_debug($msg, $exit = false)
43 43
 {
44
-    echo "<div style='padding: 5px; color: red; font-weight: bold;'>debug:: $msg</div>";
45
-    if ($exit) {
46
-        die();
47
-    }
44
+	echo "<div style='padding: 5px; color: red; font-weight: bold;'>debug:: $msg</div>";
45
+	if ($exit) {
46
+		die();
47
+	}
48 48
 }
49 49
 
50 50
 /**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
  */
53 53
 function xoops_comment($msg)
54 54
 {
55
-    echo "<div style='padding: 5px; color: green; font-weight: bold;'>=> $msg</div>";
55
+	echo "<div style='padding: 5px; color: green; font-weight: bold;'>=> $msg</div>";
56 56
 }
57 57
 
58 58
 /**
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
  */
61 61
 function xoops_debug_vardump($var)
62 62
 {
63
-    if (class_exists('MyTextSanitizer')) {
64
-        $myts = MyTextSanitizer::getInstance();
65
-        xoops_debug($myts->displayTarea(var_export($var, true)));
66
-    } else {
67
-        xoops_debug(var_export($var, true));
68
-    }
63
+	if (class_exists('MyTextSanitizer')) {
64
+		$myts = MyTextSanitizer::getInstance();
65
+		xoops_debug($myts->displayTarea(var_export($var, true)));
66
+	} else {
67
+		xoops_debug(var_export($var, true));
68
+	}
69 69
 }
Please login to merge, or discard this patch.
blocks/addto.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@  discard block
 block discarded – undo
8 8
  */
9 9
 function smartobject_addto_show($options)
10 10
 {
11
-    include_once(XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php');
12
-    include_once(SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php');
13
-    $smartaddto = new SmartAddTo($options[0]);
14
-    $block      = $smartaddto->renderForBlock();
11
+	include_once(XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php');
12
+	include_once(SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php');
13
+	$smartaddto = new SmartAddTo($options[0]);
14
+	$block      = $smartaddto->renderForBlock();
15 15
 
16
-    return $block;
16
+	return $block;
17 17
 }
18 18
 
19 19
 /**
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function smartobject_addto_edit($options)
24 24
 {
25
-    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
25
+	include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
26 26
 
27
-    $form = '';
27
+	$form = '';
28 28
 
29
-    $layout_select = new XoopsFormSelect(_MB_SOBJECT_BLOCKS_ADDTO_LAYOUT, 'options[]', $options[0]);
30
-    $layout_select->addOption(0, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION0);
31
-    $layout_select->addOption(1, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION1);
32
-    $layout_select->addOption(2, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2);
33
-    $layout_select->addOption(3, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3);
34
-    $form .= $layout_select->getCaption() . ' ' . $layout_select->render() . '<br>';
29
+	$layout_select = new XoopsFormSelect(_MB_SOBJECT_BLOCKS_ADDTO_LAYOUT, 'options[]', $options[0]);
30
+	$layout_select->addOption(0, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION0);
31
+	$layout_select->addOption(1, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION1);
32
+	$layout_select->addOption(2, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2);
33
+	$layout_select->addOption(3, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3);
34
+	$form .= $layout_select->getCaption() . ' ' . $layout_select->render() . '<br>';
35 35
 
36
-    return $form;
36
+	return $form;
37 37
 }
Please login to merge, or discard this patch.
language/english/modinfo.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,4 +24,4 @@
 block discarded – undo
24 24
 
25 25
 define('_MI_SOBJECT_ADMFOOTER', 'Enabling admin footer for SmartModules');
26 26
 define('_MI_SOBJECT_ADMFOOTERDSC',
27
-       'By default SmartModules displays a footer in administrative pages to link on professionnal services available for this module. You can turn off the display of this footer here.');
27
+	   'By default SmartModules displays a footer in administrative pages to link on professionnal services available for this module. You can turn off the display of this footer here.');
Please login to merge, or discard this patch.
language/english/common.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
 define('_CO_SOBJECT_MAKE_SELECTION', 'Make a selection...');
103 103
 define('_CO_SOBJECT_META_DESCRIPTION', 'Meta Description');
104 104
 define('_CO_SOBJECT_META_DESCRIPTION_DSC',
105
-       'In order to help Search Engines, you can customize the meta description you would like to use for this article. If you leave this field empty when creating a category, it will automatically be populated with the Summary field of this article.');
105
+	   'In order to help Search Engines, you can customize the meta description you would like to use for this article. If you leave this field empty when creating a category, it will automatically be populated with the Summary field of this article.');
106 106
 define('_CO_SOBJECT_META_KEYWORDS', 'Meta Keywords');
107 107
 define('_CO_SOBJECT_META_KEYWORDS_DSC',
108
-       'In order to help Search Engines, you can customize the keywords you would like to use for this article. If you leave this field empty when creating an article, it will automatically be populated with words from the Summary field of this article.');
108
+	   'In order to help Search Engines, you can customize the keywords you would like to use for this article. If you leave this field empty when creating an article, it will automatically be populated with words from the Summary field of this article.');
109 109
 define('_CO_SOBJECT_MODIFY', 'Edit');
110 110
 define('_CO_SOBJECT_MODULE_BUG', 'Report a bug for this module');
111 111
 define('_CO_SOBJECT_MODULE_DEMO', 'Demo Site');
@@ -154,11 +154,11 @@  discard block
 block discarded – undo
154 154
 define('_CO_SOBJECT_UPLOAD_IMAGE', 'Upload a new image:');
155 155
 define('_CO_SOBJECT_VERSION_HISTORY', 'Version History');
156 156
 define('_CO_SOBJECT_WARNING_BETA',
157
-       'This module comes as is, without any guarantees whatsoever. This module is BETA, meaning it is still under active development. This release is meant for <b>testing purposes only</b> and we <b>strongly</b> recommend that you do not use it on a live website or in a production environment.');
157
+	   'This module comes as is, without any guarantees whatsoever. This module is BETA, meaning it is still under active development. This release is meant for <b>testing purposes only</b> and we <b>strongly</b> recommend that you do not use it on a live website or in a production environment.');
158 158
 define('_CO_SOBJECT_WARNING_FINAL',
159
-       'This module comes as is, without any guarantees whatsoever. Although this module is not beta, it is still under active development. This release can be used in a live website or a production environment, but its use is under your own responsibility, which means the author is not responsible.');
159
+	   'This module comes as is, without any guarantees whatsoever. Although this module is not beta, it is still under active development. This release can be used in a live website or a production environment, but its use is under your own responsibility, which means the author is not responsible.');
160 160
 define('_CO_SOBJECT_WARNING_RC',
161
-       'This module comes as is, without any guarantees whatsoever. This module is a Release Candidate and should not be used on a production web site. The module is still under active development and its use is under your own responsibility, which means the author is not responsible.');
161
+	   'This module comes as is, without any guarantees whatsoever. This module is a Release Candidate and should not be used on a production web site. The module is still under active development and its use is under your own responsibility, which means the author is not responsible.');
162 162
 define('_CO_SOBJECT_WEIGHT_FORM_CAPTION', 'Weight');
163 163
 define('_CO_SOBJECT_WEIGHT_FORM_DSC', '');
164 164
 
Please login to merge, or discard this patch.
language/english/smartdbupdater.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 define('_SDU_MSG_NEWFIELD', 'Successfully added field %s');
21 21
 define('_SDU_MSG_NEWFIELD_ERR', 'Error adding field %s');
22 22
 define('_SDU_NEEDUPDATE',
23
-       'Your database is out-of-date. Please upgrade your database tables!<br><b>Note: The SmartFactory strongly recommends you to backup all SmartSection tables before running this upgrade script.</b><br>');
23
+	   'Your database is out-of-date. Please upgrade your database tables!<br><b>Note: The SmartFactory strongly recommends you to backup all SmartSection tables before running this upgrade script.</b><br>');
24 24
 define('_SDU_NOUPDATE', 'Your database is up-to-date. No updates are necessary.');
25 25
 define('_SDU_UPDATE_DB', 'Updating Database');
26 26
 define('_SDU_UPDATE_ERR', 'Errors updating to version %s');
Please login to merge, or discard this patch.
sendlink.php 1 patch
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -26,82 +26,82 @@
 block discarded – undo
26 26
 $op = isset($_POST['op']) ? $_POST['op'] : '';
27 27
 
28 28
 switch ($op) {
29
-    case 'sendlink':
30
-
31
-        include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
32
-        $controller = new SmartObjectController($smartobjectLinkHandler);
33
-
34
-        $linkObj = $controller->storeSmartObject();
35
-        if ($linkObj->hasError()) {
36
-            /**
37
-             * @todo inform user and propose to close the window if a problem occured when saving the link
38
-             */
39
-        }
40
-
41
-        $xoopsMailer =& getMailer();
42
-        $xoopsMailer->useMail();
43
-        $xoopsMailer->setTemplateDir('language/' . $xoopsConfig['language'] . '/mail_template');
44
-
45
-        $xoopsMailer->setTemplate('sendlink.tpl');
46
-        $xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']);
47
-        $xoopsMailer->assign('TO_NAME', $linkObj->getVar('to_name'));
48
-        $xoopsMailer->assign('FROM_NAME', $linkObj->getVar('from_name'));
49
-        $xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
50
-        $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
51
-        $xoopsMailer->assign('MESSAGE', $_POST['body']);
52
-        $xoopsMailer->setToEmails($linkObj->getVar('to_email'));
53
-        $xoopsMailer->setFromEmail($linkObj->getVar('from_email'));
54
-        $xoopsMailer->setFromName($xoopsConfig['sitename']);
55
-        $xoopsMailer->setSubject(sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $myts->oopsStripSlashesGPC($xoopsConfig['sitename'])));
56
-
57
-        if (!$xoopsMailer->send(true)) {
58
-            $xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']) . '<br>' . $xoopsMailer->getErrors(true));
59
-        } else {
60
-            $xoopsTpl->assign('send_success', _CO_SOBJECT_SEND_SUCCESS);
61
-        }
62
-
63
-        break;
64
-
65
-    default:
66
-        if (isset($_GET['mid'])) {
67
-            $mid = $_GET['mid'];
68
-        } else {
69
-            /**
70
-             * @todo close the window if no mid is passed as GET
71
-             */
72
-        }
73
-
74
-        $hModule = xoops_getHandler('module');
75
-        $module  = $hModule->get($mid);
76
-        $linkObj->setVar('mid', $module->getVar('mid'));
77
-        $linkObj->setVar('mid_name', $module->getVar('name'));
78
-
79
-        if (isset($_GET['link'])) {
80
-            $link = $_GET['link'];
81
-        } else {
82
-            /**
83
-             * @todo close the window if no link is passed as GET
84
-             */
85
-        }
86
-        $linkObj->setVar('link', $link);
87
-
88
-        if (is_object($xoopsUser)) {
89
-            $linkObj->setVar('from_uid', $xoopsUser->getVar('uid'));
90
-            $linkObj->setVar('from_name', $xoopsUser->getVar('name') !== '' ? $xoopsUser->getVar('name') : $xoopsUser->getVar('uname'));
91
-            $linkObj->setVar('from_email', $xoopsUser->getVar('email'));
92
-        }
93
-
94
-        $linkObj->setVar('subject', sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $xoopsConfig['sitename']));
95
-        $linkObj->setVar('body', sprintf(_CO_SOBJECT_BODY_DEFAULT, $xoopsConfig['sitename'], $link));
96
-        $linkObj->setVar('date', time());
97
-        $linkObj->hideFieldFromForm(array('from_uid', 'to_uid', 'link', 'mid', 'mid_name'));
98
-
99
-        $form = $linkObj->getForm(_CO_SOBJECT_SEND_LINK_FORM, 'sendlink', false, _SEND, 'javascript:window.close();');
100
-
101
-        $form->assign($xoopsTpl);
102
-
103
-        $xoopsTpl->assign('showform', true);
104
-        break;
29
+	case 'sendlink':
30
+
31
+		include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
32
+		$controller = new SmartObjectController($smartobjectLinkHandler);
33
+
34
+		$linkObj = $controller->storeSmartObject();
35
+		if ($linkObj->hasError()) {
36
+			/**
37
+			 * @todo inform user and propose to close the window if a problem occured when saving the link
38
+			 */
39
+		}
40
+
41
+		$xoopsMailer =& getMailer();
42
+		$xoopsMailer->useMail();
43
+		$xoopsMailer->setTemplateDir('language/' . $xoopsConfig['language'] . '/mail_template');
44
+
45
+		$xoopsMailer->setTemplate('sendlink.tpl');
46
+		$xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']);
47
+		$xoopsMailer->assign('TO_NAME', $linkObj->getVar('to_name'));
48
+		$xoopsMailer->assign('FROM_NAME', $linkObj->getVar('from_name'));
49
+		$xoopsMailer->assign('SITEURL', XOOPS_URL . '/');
50
+		$xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
51
+		$xoopsMailer->assign('MESSAGE', $_POST['body']);
52
+		$xoopsMailer->setToEmails($linkObj->getVar('to_email'));
53
+		$xoopsMailer->setFromEmail($linkObj->getVar('from_email'));
54
+		$xoopsMailer->setFromName($xoopsConfig['sitename']);
55
+		$xoopsMailer->setSubject(sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $myts->oopsStripSlashesGPC($xoopsConfig['sitename'])));
56
+
57
+		if (!$xoopsMailer->send(true)) {
58
+			$xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']) . '<br>' . $xoopsMailer->getErrors(true));
59
+		} else {
60
+			$xoopsTpl->assign('send_success', _CO_SOBJECT_SEND_SUCCESS);
61
+		}
62
+
63
+		break;
64
+
65
+	default:
66
+		if (isset($_GET['mid'])) {
67
+			$mid = $_GET['mid'];
68
+		} else {
69
+			/**
70
+			 * @todo close the window if no mid is passed as GET
71
+			 */
72
+		}
73
+
74
+		$hModule = xoops_getHandler('module');
75
+		$module  = $hModule->get($mid);
76
+		$linkObj->setVar('mid', $module->getVar('mid'));
77
+		$linkObj->setVar('mid_name', $module->getVar('name'));
78
+
79
+		if (isset($_GET['link'])) {
80
+			$link = $_GET['link'];
81
+		} else {
82
+			/**
83
+			 * @todo close the window if no link is passed as GET
84
+			 */
85
+		}
86
+		$linkObj->setVar('link', $link);
87
+
88
+		if (is_object($xoopsUser)) {
89
+			$linkObj->setVar('from_uid', $xoopsUser->getVar('uid'));
90
+			$linkObj->setVar('from_name', $xoopsUser->getVar('name') !== '' ? $xoopsUser->getVar('name') : $xoopsUser->getVar('uname'));
91
+			$linkObj->setVar('from_email', $xoopsUser->getVar('email'));
92
+		}
93
+
94
+		$linkObj->setVar('subject', sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $xoopsConfig['sitename']));
95
+		$linkObj->setVar('body', sprintf(_CO_SOBJECT_BODY_DEFAULT, $xoopsConfig['sitename'], $link));
96
+		$linkObj->setVar('date', time());
97
+		$linkObj->hideFieldFromForm(array('from_uid', 'to_uid', 'link', 'mid', 'mid_name'));
98
+
99
+		$form = $linkObj->getForm(_CO_SOBJECT_SEND_LINK_FORM, 'sendlink', false, _SEND, 'javascript:window.close();');
100
+
101
+		$form->assign($xoopsTpl);
102
+
103
+		$xoopsTpl->assign('showform', true);
104
+		break;
105 105
 }
106 106
 
107 107
 $xoopsTpl->display('db:smartobject_sendlink.html');
Please login to merge, or discard this patch.
admin/currency.php 1 patch
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -10,29 +10,29 @@  discard block
 block discarded – undo
10 10
 
11 11
 function editclass($showmenu = false, $currencyid = 0)
12 12
 {
13
-    global $smartobjectCurrencyHandler;
14
-
15
-    $currencyObj = $smartobjectCurrencyHandler->get($currencyid);
16
-
17
-    if (!$currencyObj->isNew()) {
18
-        if ($showmenu) {
19
-            //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _AM_SOBJECT_EDITING);
20
-        }
21
-        smart_collapsableBar('currencyedit', _AM_SOBJECT_CURRENCIES_EDIT, _AM_SOBJECT_CURRENCIES_EDIT_INFO);
22
-
23
-        $sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_EDIT, 'addcurrency');
24
-        $sform->display();
25
-        smart_close_collapsable('currencyedit');
26
-    } else {
27
-        if ($showmenu) {
28
-            //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _CO_SOBJECT_CREATINGNEW);
29
-        }
30
-
31
-        smart_collapsableBar('currencycreate', _AM_SOBJECT_CURRENCIES_CREATE, _AM_SOBJECT_CURRENCIES_CREATE_INFO);
32
-        $sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_CREATE, 'addcurrency');
33
-        $sform->display();
34
-        smart_close_collapsable('currencycreate');
35
-    }
13
+	global $smartobjectCurrencyHandler;
14
+
15
+	$currencyObj = $smartobjectCurrencyHandler->get($currencyid);
16
+
17
+	if (!$currencyObj->isNew()) {
18
+		if ($showmenu) {
19
+			//smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _AM_SOBJECT_EDITING);
20
+		}
21
+		smart_collapsableBar('currencyedit', _AM_SOBJECT_CURRENCIES_EDIT, _AM_SOBJECT_CURRENCIES_EDIT_INFO);
22
+
23
+		$sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_EDIT, 'addcurrency');
24
+		$sform->display();
25
+		smart_close_collapsable('currencyedit');
26
+	} else {
27
+		if ($showmenu) {
28
+			//smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _CO_SOBJECT_CREATINGNEW);
29
+		}
30
+
31
+		smart_collapsableBar('currencycreate', _AM_SOBJECT_CURRENCIES_CREATE, _AM_SOBJECT_CURRENCIES_CREATE_INFO);
32
+		$sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_CREATE, 'addcurrency');
33
+		$sform->display();
34
+		smart_close_collapsable('currencycreate');
35
+	}
36 36
 }
37 37
 
38 38
 include_once __DIR__ . '/admin_header.php';
@@ -43,36 +43,36 @@  discard block
 block discarded – undo
43 43
 $op = '';
44 44
 
45 45
 if (isset($_GET['op'])) {
46
-    $op = $_GET['op'];
46
+	$op = $_GET['op'];
47 47
 }
48 48
 if (isset($_POST['op'])) {
49
-    $op = $_POST['op'];
49
+	$op = $_POST['op'];
50 50
 }
51 51
 
52 52
 switch ($op) {
53
-    case 'mod':
54
-        $currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0;
53
+	case 'mod':
54
+		$currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0;
55 55
 
56
-        smart_xoops_cp_header();
56
+		smart_xoops_cp_header();
57 57
 
58
-        editclass(true, $currencyid);
59
-        break;
58
+		editclass(true, $currencyid);
59
+		break;
60 60
 
61
-    case 'updateCurrencies':
61
+	case 'updateCurrencies':
62 62
 
63
-        if (!isset($_POST['SmartobjectCurrency_objects']) || count($_POST['SmartobjectCurrency_objects']) == 0) {
64
-            redirect_header($smart_previous_page, 3, _AM_SOBJECT_NO_RECORDS_TO_UPDATE);
65
-        }
63
+		if (!isset($_POST['SmartobjectCurrency_objects']) || count($_POST['SmartobjectCurrency_objects']) == 0) {
64
+			redirect_header($smart_previous_page, 3, _AM_SOBJECT_NO_RECORDS_TO_UPDATE);
65
+		}
66 66
 
67
-        if (isset($_POST['default_currency'])) {
68
-            $newDefaultCurrency = $_POST['default_currency'];
69
-            $sql                = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0';
70
-            $smartobjectCurrencyHandler->query($sql);
71
-            $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency;
72
-            $smartobjectCurrencyHandler->query($sql);
73
-        }
67
+		if (isset($_POST['default_currency'])) {
68
+			$newDefaultCurrency = $_POST['default_currency'];
69
+			$sql                = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0';
70
+			$smartobjectCurrencyHandler->query($sql);
71
+			$sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency;
72
+			$smartobjectCurrencyHandler->query($sql);
73
+		}
74 74
 
75
-        /*
75
+		/*
76 76
         $criteria = new CriteriaCompo();
77 77
         $criteria->add(new Criteria('currencyid', '(' . implode(', ', $_POST['SmartobjectCurrency_objects']) . ')', 'IN'));
78 78
         $currenciesObj = $smartobjectCurrencyHandler->getObjects($criteria, true);
@@ -82,49 +82,49 @@  discard block
 block discarded – undo
82 82
             $smartobjectCurrencyHandler->insert($currencyObj);
83 83
         }
84 84
         */
85
-        redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED);
86
-        break;
85
+		redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED);
86
+		break;
87 87
 
88
-    case 'addcurrency':
89
-        include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
90
-        $controller = new SmartObjectController($smartobjectCurrencyHandler);
91
-        $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php');
88
+	case 'addcurrency':
89
+		include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
90
+		$controller = new SmartObjectController($smartobjectCurrencyHandler);
91
+		$controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php');
92 92
 
93
-        break;
93
+		break;
94 94
 
95
-    case 'del':
96
-        include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
97
-        $controller = new SmartObjectController($smartobjectCurrencyHandler);
98
-        $controller->handleObjectDeletion();
95
+	case 'del':
96
+		include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
97
+		$controller = new SmartObjectController($smartobjectCurrencyHandler);
98
+		$controller->handleObjectDeletion();
99 99
 
100
-        break;
100
+		break;
101 101
 
102
-    default:
102
+	default:
103 103
 
104
-        smart_xoops_cp_header();
104
+		smart_xoops_cp_header();
105 105
 
106
-        //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES);
106
+		//smart_adminMenu(5, _AM_SOBJECT_CURRENCIES);
107 107
 
108
-        smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC);
108
+		smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC);
109 109
 
110
-        include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
111
-        $objectTable = new SmartObjectTable($smartobjectCurrencyHandler);
112
-        $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink'));
113
-        $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150));
114
-        $objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150));
115
-        $objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefaultCurrencyControl'));
110
+		include_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
111
+		$objectTable = new SmartObjectTable($smartobjectCurrencyHandler);
112
+		$objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink'));
113
+		$objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150));
114
+		$objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150));
115
+		$objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefaultCurrencyControl'));
116 116
 
117
-        $objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE);
117
+		$objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE);
118 118
 
119
-        $objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL);
119
+		$objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL);
120 120
 
121
-        $objectTable->render();
121
+		$objectTable->render();
122 122
 
123
-        echo '<br>';
124
-        smart_close_collapsable('createdcurrencies');
125
-        echo '<br>';
123
+		echo '<br>';
124
+		smart_close_collapsable('createdcurrencies');
125
+		echo '<br>';
126 126
 
127
-        break;
127
+		break;
128 128
 }
129 129
 
130 130
 //smart_modFooter();
Please login to merge, or discard this patch.