Completed
Push — master ( bf34f3...88111b )
by Michael
03:08
created
include/custom_code/footer_start.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 
3 3
 function smarthook_footer_start()
4 4
 {
5
-    // code...
5
+	// code...
6 6
 }
Please login to merge, or discard this patch.
include/common.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,22 +14,22 @@
 block discarded – undo
14 14
  * SmartObject library path
15 15
  */
16 16
 if (!defined('SMARTOBJECT_URL')) {
17
-    define('SMARTOBJECT_URL', XOOPS_URL . '/modules/smartobject/');
17
+	define('SMARTOBJECT_URL', XOOPS_URL . '/modules/smartobject/');
18 18
 }
19 19
 if (!defined('SMARTOBJECT_ROOT_PATH')) {
20
-    define('SMARTOBJECT_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/smartobject/');
20
+	define('SMARTOBJECT_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/smartobject/');
21 21
 }
22 22
 if (!defined('SMARTOBJECT_IMAGES_URL')) {
23
-    define('SMARTOBJECT_IMAGES_URL', SMARTOBJECT_URL . 'assets/images/');
23
+	define('SMARTOBJECT_IMAGES_URL', SMARTOBJECT_URL . 'assets/images/');
24 24
 }
25 25
 if (!defined('SMARTOBJECT_IMAGES_ROOT_PATH')) {
26
-    define('SMARTOBJECT_IMAGES_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/');
26
+	define('SMARTOBJECT_IMAGES_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/');
27 27
 }
28 28
 if (!defined('SMARTOBJECT_IMAGES_ACTIONS_URL')) {
29
-    define('SMARTOBJECT_IMAGES_ACTIONS_URL', SMARTOBJECT_URL . 'assets/images/actions/');
29
+	define('SMARTOBJECT_IMAGES_ACTIONS_URL', SMARTOBJECT_URL . 'assets/images/actions/');
30 30
 }
31 31
 if (!defined('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH')) {
32
-    define('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/actions/');
32
+	define('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/actions/');
33 33
 }
34 34
 
35 35
 /**
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,30 +14,30 @@  discard block
 block discarded – undo
14 14
  * SmartObject library path
15 15
  */
16 16
 if (!defined('SMARTOBJECT_URL')) {
17
-    define('SMARTOBJECT_URL', XOOPS_URL . '/modules/smartobject/');
17
+    define('SMARTOBJECT_URL', XOOPS_URL.'/modules/smartobject/');
18 18
 }
19 19
 if (!defined('SMARTOBJECT_ROOT_PATH')) {
20
-    define('SMARTOBJECT_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/smartobject/');
20
+    define('SMARTOBJECT_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/smartobject/');
21 21
 }
22 22
 if (!defined('SMARTOBJECT_IMAGES_URL')) {
23
-    define('SMARTOBJECT_IMAGES_URL', SMARTOBJECT_URL . 'assets/images/');
23
+    define('SMARTOBJECT_IMAGES_URL', SMARTOBJECT_URL.'assets/images/');
24 24
 }
25 25
 if (!defined('SMARTOBJECT_IMAGES_ROOT_PATH')) {
26
-    define('SMARTOBJECT_IMAGES_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/');
26
+    define('SMARTOBJECT_IMAGES_ROOT_PATH', SMARTOBJECT_ROOT_PATH.'assets/images/');
27 27
 }
28 28
 if (!defined('SMARTOBJECT_IMAGES_ACTIONS_URL')) {
29
-    define('SMARTOBJECT_IMAGES_ACTIONS_URL', SMARTOBJECT_URL . 'assets/images/actions/');
29
+    define('SMARTOBJECT_IMAGES_ACTIONS_URL', SMARTOBJECT_URL.'assets/images/actions/');
30 30
 }
31 31
 if (!defined('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH')) {
32
-    define('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/actions/');
32
+    define('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH', SMARTOBJECT_ROOT_PATH.'assets/images/actions/');
33 33
 }
34 34
 
35 35
 /**
36 36
  * Version of the SmartObject Framework
37 37
  */
38
-require_once SMARTOBJECT_ROOT_PATH . 'include/version.php';
39
-require_once SMARTOBJECT_ROOT_PATH . 'include/functions.php';
40
-require_once SMARTOBJECT_ROOT_PATH . 'include/xoops_core_common_functions.php';
38
+require_once SMARTOBJECT_ROOT_PATH.'include/version.php';
39
+require_once SMARTOBJECT_ROOT_PATH.'include/functions.php';
40
+require_once SMARTOBJECT_ROOT_PATH.'include/xoops_core_common_functions.php';
41 41
 
42 42
 /**
43 43
  * Some constants used by the SmartObjects
@@ -66,4 +66,4 @@  discard block
 block discarded – undo
66 66
 // get previous page
67 67
 $smart_previous_page = smart_getenv('HTTP_REFERER');
68 68
 
69
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartloader.php';
69
+require_once SMARTOBJECT_ROOT_PATH.'class/smartloader.php';
Please login to merge, or discard this patch.
include/currency.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,13 +17,13 @@
 block discarded – undo
17 17
 $smartobjectCurrencyHandler = xoops_getModuleHandler('currency', 'smartobject');
18 18
 
19 19
 if (!$smartobjectCurrenciesObj) {
20
-    $smartobjectCurrenciesObj = $smartobjectCurrencyHandler->getCurrencies();
20
+	$smartobjectCurrenciesObj = $smartobjectCurrencyHandler->getCurrencies();
21 21
 }
22 22
 if (!$smartobjectCurrenciesArray) {
23
-    foreach ($smartobjectCurrenciesObj as $currencyid => $currencyObj) {
24
-        if ($currencyObj->getVar('default_currency', 'e')) {
25
-            $smartobjectDefaultCurrency = $currencyObj;
26
-        }
27
-        $smartobjectCurrenciesArray[$currencyid] = $currencyObj->getCode();
28
-    }
23
+	foreach ($smartobjectCurrenciesObj as $currencyid => $currencyObj) {
24
+		if ($currencyObj->getVar('default_currency', 'e')) {
25
+			$smartobjectDefaultCurrency = $currencyObj;
26
+		}
27
+		$smartobjectCurrenciesArray[$currencyid] = $currencyObj->getCode();
28
+	}
29 29
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
 smart_loadCommonLanguageFile();
12 12
 
13
-require_once SMARTOBJECT_ROOT_PATH . 'class/currency.php';
13
+require_once SMARTOBJECT_ROOT_PATH.'class/currency.php';
14 14
 
15 15
 static $smartobjectCurrenciesObj, $smartobjectCurrenciesArray, $smartobjectDefaultCurrency;
16 16
 
Please login to merge, or discard this patch.
include/xoops_core_common_functions.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 function xoops_debug_dumbQuery($msg = '')
16 16
 {
17 17
     global $xoopsDB;
18
-    $xoopsDB->query('SELECT * ' . $msg . ' FROM dudewhereismycar2');
18
+    $xoopsDB->query('SELECT * '.$msg.' FROM dudewhereismycar2');
19 19
 }
20 20
 
21 21
 function xoops_debug_initiateQueryCount()
Please login to merge, or discard this 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.
language/english/common.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
 define('_CO_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2', 'Vertical with icons');
179 179
 define('_CO_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3', 'Vertical no icon');
180 180
 define('_CO_SOBJECT_CURRENT_FILE', 'Current file: ');
181
-define('_CO_SOBJECT_URL_FILE_DSC', "Alternatively, you can use an URL. If you select a file via 'Browse' button, URL will be ignored. You can use the tag {XOOPS_URL} to print " . XOOPS_URL);
181
+define('_CO_SOBJECT_URL_FILE_DSC', "Alternatively, you can use an URL. If you select a file via 'Browse' button, URL will be ignored. You can use the tag {XOOPS_URL} to print ".XOOPS_URL);
182 182
 define('_CO_SOBJECT_URL_FILE', 'URL: ');
183 183
 define('_CO_SOBJECT_UPLOAD', 'Select a file to upload: ');
184 184
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -152,16 +152,16 @@
 block discarded – undo
152 152
 define('_CO_SOBJECT_UPLOAD_IMAGE', 'Upload a new image:');
153 153
 define('_CO_SOBJECT_VERSION_HISTORY', 'Version History');
154 154
 define(
155
-    '_CO_SOBJECT_WARNING_BETA',
156
-       '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.'
155
+	'_CO_SOBJECT_WARNING_BETA',
156
+	   '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 157
 );
158 158
 define(
159
-    '_CO_SOBJECT_WARNING_FINAL',
160
-       '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
+	'_CO_SOBJECT_WARNING_FINAL',
160
+	   '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.'
161 161
 );
162 162
 define(
163
-    '_CO_SOBJECT_WARNING_RC',
164
-       '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.'
163
+	'_CO_SOBJECT_WARNING_RC',
164
+	   '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.'
165 165
 );
166 166
 define('_CO_SOBJECT_WEIGHT_FORM_CAPTION', 'Weight');
167 167
 define('_CO_SOBJECT_WEIGHT_FORM_DSC', '');
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * Licence: GNU
7 7
  */
8 8
 
9
-include __DIR__ . '/../../mainfile.php';
10
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
9
+include __DIR__.'/../../mainfile.php';
10
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
11 11
 
12 12
 smart_loadCommonLanguageFile();
Please login to merge, or discard this patch.
admin/admin_header2.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  * Licence: GNU
8 8
  */
9 9
 
10
-require_once __DIR__ . '/../../../include/cp_header.php';
10
+require_once __DIR__.'/../../../include/cp_header.php';
11 11
 
12
-require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
12
+require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
13 13
 smart_loadCommonLanguageFile();
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../../include/cp_header.php';
21
-require_once __DIR__ . '/admin_header.php';
20
+require_once __DIR__.'/../../../include/cp_header.php';
21
+require_once __DIR__.'/admin_header.php';
22 22
 
23 23
 xoops_cp_header();
24 24
 
@@ -27,4 +27,4 @@  discard block
 block discarded – undo
27 27
 $adminObject->displayNavigation(basename(__FILE__));
28 28
 $adminObject->displayIndex();
29 29
 
30
-require_once __DIR__ . '/admin_footer.php';
30
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/currency.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
     }
36 36
 }
37 37
 
38
-require_once __DIR__ . '/admin_header.php';
39
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
40
-require_once SMARTOBJECT_ROOT_PATH . 'class/currency.php';
38
+require_once __DIR__.'/admin_header.php';
39
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
40
+require_once SMARTOBJECT_ROOT_PATH.'class/currency.php';
41 41
 $smartobjectCurrencyHandler = xoops_getModuleHandler('currency');
42 42
 
43 43
 $op = '';
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 switch ($op) {
53 53
     case 'mod':
54
-        $currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0;
54
+        $currencyid = isset($_GET['currencyid']) ? (int) $_GET['currencyid'] : 0;
55 55
 
56 56
         smart_xoops_cp_header();
57 57
 
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
         if (isset($_POST['default_currency'])) {
68 68
             $newDefaultCurrency = $_POST['default_currency'];
69
-            $sql                = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0';
69
+            $sql                = 'UPDATE '.$smartobjectCurrencyHandler->table.' SET default_currency=0';
70 70
             $smartobjectCurrencyHandler->query($sql);
71
-            $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency;
71
+            $sql = 'UPDATE '.$smartobjectCurrencyHandler->table.' SET default_currency=1 WHERE currencyid='.$newDefaultCurrency;
72 72
             $smartobjectCurrencyHandler->query($sql);
73 73
         }
74 74
 
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
         break;
87 87
 
88 88
     case 'addcurrency':
89
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
89
+        require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php';
90 90
         $controller = new SmartObjectController($smartobjectCurrencyHandler);
91
-        $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php');
91
+        $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL.'admin/currency.php');
92 92
 
93 93
         break;
94 94
 
95 95
     case 'del':
96
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
96
+        require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php';
97 97
         $controller = new SmartObjectController($smartobjectCurrencyHandler);
98 98
         $controller->handleObjectDeletion();
99 99
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC);
109 109
 
110
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
110
+        require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
111 111
         $objectTable = new SmartObjectTable($smartobjectCurrencyHandler);
112 112
         $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink'));
113 113
         $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150));
@@ -129,4 +129,4 @@  discard block
 block discarded – undo
129 129
 
130 130
 //smart_modFooter();
131 131
 //xoops_cp_footer();
132
-require_once __DIR__ . '/admin_footer.php';
132
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -14,29 +14,29 @@  discard block
 block discarded – undo
14 14
 
15 15
 function editclass($showmenu = false, $currencyid = 0)
16 16
 {
17
-    global $smartobjectCurrencyHandler;
18
-
19
-    $currencyObj = $smartobjectCurrencyHandler->get($currencyid);
20
-
21
-    if (!$currencyObj->isNew()) {
22
-        if ($showmenu) {
23
-            //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _AM_SOBJECT_EDITING);
24
-        }
25
-        smart_collapsableBar('currencyedit', _AM_SOBJECT_CURRENCIES_EDIT, _AM_SOBJECT_CURRENCIES_EDIT_INFO);
26
-
27
-        $sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_EDIT, 'addcurrency');
28
-        $sform->display();
29
-        smart_close_collapsable('currencyedit');
30
-    } else {
31
-        if ($showmenu) {
32
-            //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _CO_SOBJECT_CREATINGNEW);
33
-        }
34
-
35
-        smart_collapsableBar('currencycreate', _AM_SOBJECT_CURRENCIES_CREATE, _AM_SOBJECT_CURRENCIES_CREATE_INFO);
36
-        $sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_CREATE, 'addcurrency');
37
-        $sform->display();
38
-        smart_close_collapsable('currencycreate');
39
-    }
17
+	global $smartobjectCurrencyHandler;
18
+
19
+	$currencyObj = $smartobjectCurrencyHandler->get($currencyid);
20
+
21
+	if (!$currencyObj->isNew()) {
22
+		if ($showmenu) {
23
+			//smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _AM_SOBJECT_EDITING);
24
+		}
25
+		smart_collapsableBar('currencyedit', _AM_SOBJECT_CURRENCIES_EDIT, _AM_SOBJECT_CURRENCIES_EDIT_INFO);
26
+
27
+		$sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_EDIT, 'addcurrency');
28
+		$sform->display();
29
+		smart_close_collapsable('currencyedit');
30
+	} else {
31
+		if ($showmenu) {
32
+			//smart_adminMenu(5, _AM_SOBJECT_CURRENCIES . " > " . _CO_SOBJECT_CREATINGNEW);
33
+		}
34
+
35
+		smart_collapsableBar('currencycreate', _AM_SOBJECT_CURRENCIES_CREATE, _AM_SOBJECT_CURRENCIES_CREATE_INFO);
36
+		$sform = $currencyObj->getForm(_AM_SOBJECT_CURRENCIES_CREATE, 'addcurrency');
37
+		$sform->display();
38
+		smart_close_collapsable('currencycreate');
39
+	}
40 40
 }
41 41
 
42 42
 require_once __DIR__ . '/admin_header.php';
@@ -47,36 +47,36 @@  discard block
 block discarded – undo
47 47
 $op = '';
48 48
 
49 49
 if (isset($_GET['op'])) {
50
-    $op = $_GET['op'];
50
+	$op = $_GET['op'];
51 51
 }
52 52
 if (isset($_POST['op'])) {
53
-    $op = $_POST['op'];
53
+	$op = $_POST['op'];
54 54
 }
55 55
 
56 56
 switch ($op) {
57
-    case 'mod':
58
-        $currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0;
57
+	case 'mod':
58
+		$currencyid = isset($_GET['currencyid']) ? (int)$_GET['currencyid'] : 0;
59 59
 
60
-        smart_xoops_cp_header();
60
+		smart_xoops_cp_header();
61 61
 
62
-        editclass(true, $currencyid);
63
-        break;
62
+		editclass(true, $currencyid);
63
+		break;
64 64
 
65
-    case 'updateCurrencies':
65
+	case 'updateCurrencies':
66 66
 
67
-        if (!isset($_POST['SmartobjectCurrency_objects']) || 0 == count($_POST['SmartobjectCurrency_objects'])) {
68
-            redirect_header($smart_previous_page, 3, _AM_SOBJECT_NO_RECORDS_TO_UPDATE);
69
-        }
67
+		if (!isset($_POST['SmartobjectCurrency_objects']) || 0 == count($_POST['SmartobjectCurrency_objects'])) {
68
+			redirect_header($smart_previous_page, 3, _AM_SOBJECT_NO_RECORDS_TO_UPDATE);
69
+		}
70 70
 
71
-        if (isset($_POST['default_currency'])) {
72
-            $newDefaultCurrency = $_POST['default_currency'];
73
-            $sql                = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0';
74
-            $smartobjectCurrencyHandler->query($sql);
75
-            $sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency;
76
-            $smartobjectCurrencyHandler->query($sql);
77
-        }
71
+		if (isset($_POST['default_currency'])) {
72
+			$newDefaultCurrency = $_POST['default_currency'];
73
+			$sql                = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=0';
74
+			$smartobjectCurrencyHandler->query($sql);
75
+			$sql = 'UPDATE ' . $smartobjectCurrencyHandler->table . ' SET default_currency=1 WHERE currencyid=' . $newDefaultCurrency;
76
+			$smartobjectCurrencyHandler->query($sql);
77
+		}
78 78
 
79
-        /*
79
+		/*
80 80
         $criteria = new \CriteriaCompo();
81 81
         $criteria->add(new \Criteria('currencyid', '(' . implode(', ', $_POST['SmartobjectCurrency_objects']) . ')', 'IN'));
82 82
         $currenciesObj = $smartobjectCurrencyHandler->getObjects($criteria, true);
@@ -86,49 +86,49 @@  discard block
 block discarded – undo
86 86
             $smartobjectCurrencyHandler->insert($currencyObj);
87 87
         }
88 88
         */
89
-        redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED);
90
-        break;
89
+		redirect_header($smart_previous_page, 3, _AM_SOBJECT_RECORDS_UPDATED);
90
+		break;
91 91
 
92
-    case 'addcurrency':
93
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
94
-        $controller = new SmartObjectController($smartobjectCurrencyHandler);
95
-        $controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php');
92
+	case 'addcurrency':
93
+		require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
94
+		$controller = new SmartObjectController($smartobjectCurrencyHandler);
95
+		$controller->storeFromDefaultForm(_AM_SOBJECT_CURRENCIES_CREATED, _AM_SOBJECT_CURRENCIES_MODIFIED, SMARTOBJECT_URL . 'admin/currency.php');
96 96
 
97
-        break;
97
+		break;
98 98
 
99
-    case 'del':
100
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
101
-        $controller = new SmartObjectController($smartobjectCurrencyHandler);
102
-        $controller->handleObjectDeletion();
99
+	case 'del':
100
+		require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
101
+		$controller = new SmartObjectController($smartobjectCurrencyHandler);
102
+		$controller->handleObjectDeletion();
103 103
 
104
-        break;
104
+		break;
105 105
 
106
-    default:
106
+	default:
107 107
 
108
-        smart_xoops_cp_header();
108
+		smart_xoops_cp_header();
109 109
 
110
-        //smart_adminMenu(5, _AM_SOBJECT_CURRENCIES);
110
+		//smart_adminMenu(5, _AM_SOBJECT_CURRENCIES);
111 111
 
112
-        smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC);
112
+		smart_collapsableBar('createdcurrencies', _AM_SOBJECT_CURRENCIES, _AM_SOBJECT_CURRENCIES_DSC);
113 113
 
114
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
115
-        $objectTable = new SmartObjectTable($smartobjectCurrencyHandler);
116
-        $objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink'));
117
-        $objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150));
118
-        $objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150));
119
-        $objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefaultCurrencyControl'));
114
+		require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
115
+		$objectTable = new SmartObjectTable($smartobjectCurrencyHandler);
116
+		$objectTable->addColumn(new SmartObjectColumn('name', 'left', false, 'getCurrencyLink'));
117
+		$objectTable->addColumn(new SmartObjectColumn('rate', 'center', 150));
118
+		$objectTable->addColumn(new SmartObjectColumn('iso4217', 'center', 150));
119
+		$objectTable->addColumn(new SmartObjectColumn('default_currency', 'center', 150, 'getDefaultCurrencyControl'));
120 120
 
121
-        $objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE);
121
+		$objectTable->addIntroButton('addcurrency', 'currency.php?op=mod', _AM_SOBJECT_CURRENCIES_CREATE);
122 122
 
123
-        $objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL);
123
+		$objectTable->addActionButton('updateCurrencies', _SUBMIT, _AM_SOBJECT_CURRENCY_UPDATE_ALL);
124 124
 
125
-        $objectTable->render();
125
+		$objectTable->render();
126 126
 
127
-        echo '<br>';
128
-        smart_close_collapsable('createdcurrencies');
129
-        echo '<br>';
127
+		echo '<br>';
128
+		smart_close_collapsable('createdcurrencies');
129
+		echo '<br>';
130 130
 
131
-        break;
131
+		break;
132 132
 }
133 133
 
134 134
 //smart_modFooter();
Please login to merge, or discard this patch.