Completed
Push — master ( bf34f3...88111b )
by Michael
03:08
created
blocks/addto.php 2 patches
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
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
12
-    require_once SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php';
13
-    $smartaddto = new XoopsModules\Smartobject\SmartAddTo($options[0]);
14
-    $block      = $smartaddto->renderForBlock();
11
+	require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
12
+	require_once SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php';
13
+	$smartaddto = new XoopsModules\Smartobject\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
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
25
+	require_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.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
  */
9 9
 function smartobject_addto_show($options)
10 10
 {
11
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
12
-    require_once SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php';
11
+    require_once XOOPS_ROOT_PATH.'/modules/smartobject/include/common.php';
12
+    require_once SMARTOBJECT_ROOT_PATH.'class/smartaddto.php';
13 13
     $smartaddto = new XoopsModules\Smartobject\SmartAddTo($options[0]);
14 14
     $block      = $smartaddto->renderForBlock();
15 15
 
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function smartobject_addto_edit($options)
24 24
 {
25
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
25
+    require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
26 26
 
27 27
     $form = '';
28 28
 
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     $layout_select->addOption(1, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION1);
32 32
     $layout_select->addOption(2, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2);
33 33
     $layout_select->addOption(3, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3);
34
-    $form .= $layout_select->getCaption() . ' ' . $layout_select->render() . '<br>';
34
+    $form .= $layout_select->getCaption().' '.$layout_select->render().'<br>';
35 35
 
36 36
     return $form;
37 37
 }
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
12 12
 
13
-require_once __DIR__ . '/preloads/autoloader.php';
13
+require_once __DIR__.'/preloads/autoloader.php';
14 14
 
15 15
 $modversion['version']       = '1.12';
16 16
 $modversion['module_status'] = 'RC 2';
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 //$modversion['status'] = "Final";
34 34
 $modversion['modicons16']          = 'assets/images/icons/16';
35 35
 $modversion['modicons32']          = 'assets/images/icons/32';
36
-$modversion['release_file']        = XOOPS_URL . '/modules/' . $modversion['dirname'] . '/docs/changelog.txt';
36
+$modversion['release_file']        = XOOPS_URL.'/modules/'.$modversion['dirname'].'/docs/changelog.txt';
37 37
 $modversion['module_website_url']  = 'www.xoops.org';
38 38
 $modversion['module_website_name'] = 'XOOPS';
39 39
 $modversion['min_php']             = '5.5';
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
 // ----- BUG: not read other language file -----
67 67
 //include_once(XOOPS_ROOT_PATH.'/modules/smartobject/language/english/common.php');
68 68
 global $xoopsConfig;
69
-$common_file = XOOPS_ROOT_PATH . '/modules/smartobject/language/' . $xoopsConfig['language'] . '/common.php';
69
+$common_file = XOOPS_ROOT_PATH.'/modules/smartobject/language/'.$xoopsConfig['language'].'/common.php';
70 70
 if (file_exists($common_file)) {
71 71
     $flag_common = true;
72 72
     require_once $common_file;
73 73
 } else {
74
-    require_once XOOPS_ROOT_PATH . '/modules/smartobject/language/english/common.php';
74
+    require_once XOOPS_ROOT_PATH.'/modules/smartobject/language/english/common.php';
75 75
 }
76 76
 // -----
77 77
 
Please login to merge, or discard this patch.
admin/link.php 3 patches
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -25,81 +25,81 @@
 block discarded – undo
25 25
 $op = '';
26 26
 
27 27
 if (isset($_GET['op'])) {
28
-    $op = $_GET['op'];
28
+	$op = $_GET['op'];
29 29
 }
30 30
 if (isset($_POST['op'])) {
31
-    $op = $_POST['op'];
31
+	$op = $_POST['op'];
32 32
 }
33 33
 
34 34
 switch ($op) {
35 35
 
36
-    case 'del':
37
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
38
-        $controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectLinkHandler);
39
-        $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM);
36
+	case 'del':
37
+		require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
38
+		$controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectLinkHandler);
39
+		$controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM);
40 40
 
41
-        break;
41
+		break;
42 42
 
43
-    case 'view':
44
-        $linkid  = isset($_GET['linkid']) ? $_GET['linkid'] : 0;
45
-        $linkObj = $smartobjectLinkHandler->get($linkid);
43
+	case 'view':
44
+		$linkid  = isset($_GET['linkid']) ? $_GET['linkid'] : 0;
45
+		$linkObj = $smartobjectLinkHandler->get($linkid);
46 46
 
47
-        if ($linkObj->isNew()) {
48
-            redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND);
49
-        }
47
+		if ($linkObj->isNew()) {
48
+			redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND);
49
+		}
50 50
 
51
-        smart_xoops_cp_header();
51
+		smart_xoops_cp_header();
52 52
 
53
-        //smart_adminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY);
53
+		//smart_adminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY);
54 54
 
55
-        smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO);
55
+		smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO);
56 56
 
57
-        require_once XOOPS_ROOT_PATH . '/class/template.php';
57
+		require_once XOOPS_ROOT_PATH . '/class/template.php';
58 58
 
59
-        // ---
60
-        // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated.
61
-        //      $xoopsTpl = new \XoopsTpl();
62
-        $xoopsTpl = new \XoopsTpl();
63
-        //---
59
+		// ---
60
+		// 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated.
61
+		//      $xoopsTpl = new \XoopsTpl();
62
+		$xoopsTpl = new \XoopsTpl();
63
+		//---
64 64
 
65
-        $xoopsTpl->assign('link', $linkObj->toArray());
66
-        $xoopsTpl->display('db:smartobject_sentlink_display.tpl');
65
+		$xoopsTpl->assign('link', $linkObj->toArray());
66
+		$xoopsTpl->display('db:smartobject_sentlink_display.tpl');
67 67
 
68
-        echo '<br>';
69
-        smart_close_collapsable('sentlinks');
70
-        echo '<br>';
68
+		echo '<br>';
69
+		smart_close_collapsable('sentlinks');
70
+		echo '<br>';
71 71
 
72
-        break;
72
+		break;
73 73
 
74
-    default:
74
+	default:
75 75
 
76
-        smart_xoops_cp_header();
76
+		smart_xoops_cp_header();
77 77
 
78
-        $adminObject->displayNavigation(basename(__FILE__));
78
+		$adminObject->displayNavigation(basename(__FILE__));
79 79
 
80
-        //smart_adminMenu(1, _AM_SOBJECT_SENT_LINKS);
80
+		//smart_adminMenu(1, _AM_SOBJECT_SENT_LINKS);
81 81
 
82
-        smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO);
82
+		smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO);
83 83
 
84
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
85
-        $objectTable = new XoopsModules\Smartobject\SmartObjectTable($smartobjectLinkHandler, null, ['delete']);
86
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('date'));
87
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo'));
88
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo'));
89
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('link'));
84
+		require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
85
+		$objectTable = new XoopsModules\Smartobject\SmartObjectTable($smartobjectLinkHandler, null, ['delete']);
86
+		$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('date'));
87
+		$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo'));
88
+		$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo'));
89
+		$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('link'));
90 90
 
91
-        $objectTable->addCustomAction('getViewItemLink');
91
+		$objectTable->addCustomAction('getViewItemLink');
92 92
 
93
-        $objectTable->setDefaultSort('date');
94
-        $objectTable->setDefaultOrder('DESC');
93
+		$objectTable->setDefaultSort('date');
94
+		$objectTable->setDefaultOrder('DESC');
95 95
 
96
-        $objectTable->render();
96
+		$objectTable->render();
97 97
 
98
-        echo '<br>';
99
-        smart_close_collapsable('sentlinks');
100
-        echo '<br>';
98
+		echo '<br>';
99
+		smart_close_collapsable('sentlinks');
100
+		echo '<br>';
101 101
 
102
-        break;
102
+		break;
103 103
 }
104 104
 
105 105
 //smart_modFooter();
Please login to merge, or discard this patch.
Switch Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -33,73 +33,73 @@
 block discarded – undo
33 33
 
34 34
 switch ($op) {
35 35
 
36
-    case 'del':
37
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
38
-        $controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectLinkHandler);
39
-        $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM);
36
+    	case 'del':
37
+        	require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
38
+        	$controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectLinkHandler);
39
+        	$controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM);
40 40
 
41
-        break;
41
+        	break;
42 42
 
43
-    case 'view':
44
-        $linkid  = isset($_GET['linkid']) ? $_GET['linkid'] : 0;
45
-        $linkObj = $smartobjectLinkHandler->get($linkid);
43
+    	case 'view':
44
+        	$linkid  = isset($_GET['linkid']) ? $_GET['linkid'] : 0;
45
+        	$linkObj = $smartobjectLinkHandler->get($linkid);
46 46
 
47
-        if ($linkObj->isNew()) {
48
-            redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND);
49
-        }
47
+        	if ($linkObj->isNew()) {
48
+            	redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND);
49
+        	}
50 50
 
51
-        smart_xoops_cp_header();
51
+        	smart_xoops_cp_header();
52 52
 
53
-        //smart_adminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY);
53
+        	//smart_adminMenu(1, _AM_SOBJECT_SENT_LINK_DISPLAY);
54 54
 
55
-        smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO);
55
+        	smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO);
56 56
 
57
-        require_once XOOPS_ROOT_PATH . '/class/template.php';
57
+        	require_once XOOPS_ROOT_PATH . '/class/template.php';
58 58
 
59
-        // ---
60
-        // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated.
61
-        //      $xoopsTpl = new \XoopsTpl();
62
-        $xoopsTpl = new \XoopsTpl();
63
-        //---
59
+        	// ---
60
+        	// 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated.
61
+        	//      $xoopsTpl = new \XoopsTpl();
62
+        	$xoopsTpl = new \XoopsTpl();
63
+        	//---
64 64
 
65
-        $xoopsTpl->assign('link', $linkObj->toArray());
66
-        $xoopsTpl->display('db:smartobject_sentlink_display.tpl');
65
+        	$xoopsTpl->assign('link', $linkObj->toArray());
66
+        	$xoopsTpl->display('db:smartobject_sentlink_display.tpl');
67 67
 
68
-        echo '<br>';
69
-        smart_close_collapsable('sentlinks');
70
-        echo '<br>';
68
+        	echo '<br>';
69
+        	smart_close_collapsable('sentlinks');
70
+        	echo '<br>';
71 71
 
72
-        break;
72
+        	break;
73 73
 
74
-    default:
74
+    	default:
75 75
 
76
-        smart_xoops_cp_header();
76
+        	smart_xoops_cp_header();
77 77
 
78
-        $adminObject->displayNavigation(basename(__FILE__));
78
+        	$adminObject->displayNavigation(basename(__FILE__));
79 79
 
80
-        //smart_adminMenu(1, _AM_SOBJECT_SENT_LINKS);
80
+        	//smart_adminMenu(1, _AM_SOBJECT_SENT_LINKS);
81 81
 
82
-        smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO);
82
+        	smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO);
83 83
 
84
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
85
-        $objectTable = new XoopsModules\Smartobject\SmartObjectTable($smartobjectLinkHandler, null, ['delete']);
86
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('date'));
87
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo'));
88
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo'));
89
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('link'));
84
+        	require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
85
+        	$objectTable = new XoopsModules\Smartobject\SmartObjectTable($smartobjectLinkHandler, null, ['delete']);
86
+        	$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('date'));
87
+        	$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo'));
88
+        	$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_TO, $align = 'left', $width = false, 'getToInfo'));
89
+        	$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('link'));
90 90
 
91
-        $objectTable->addCustomAction('getViewItemLink');
91
+        	$objectTable->addCustomAction('getViewItemLink');
92 92
 
93
-        $objectTable->setDefaultSort('date');
94
-        $objectTable->setDefaultOrder('DESC');
93
+        	$objectTable->setDefaultSort('date');
94
+        	$objectTable->setDefaultOrder('DESC');
95 95
 
96
-        $objectTable->render();
96
+        	$objectTable->render();
97 97
 
98
-        echo '<br>';
99
-        smart_close_collapsable('sentlinks');
100
-        echo '<br>';
98
+        	echo '<br>';
99
+        	smart_close_collapsable('sentlinks');
100
+        	echo '<br>';
101 101
 
102
-        break;
102
+        	break;
103 103
 }
104 104
 
105 105
 //smart_modFooter();
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 use XoopsModules\Smartobject\SmartObjectController;
16 16
 use XoopsModules\Smartobject\SmartObjectTable;
17 17
 
18
-require_once __DIR__ . '/admin_header.php';
19
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
20
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectlink.php';
18
+require_once __DIR__.'/admin_header.php';
19
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
20
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectlink.php';
21 21
 $adminObject = \Xmf\Module\Admin::getInstance();
22 22
 
23 23
 $smartobjectLinkHandler = xoops_getModuleHandler('link');
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 switch ($op) {
35 35
 
36 36
     case 'del':
37
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
37
+        require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php';
38 38
         $controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectLinkHandler);
39 39
         $controller->handleObjectDeletion(_AM_SOBJECT_SENT_LINK_DELETE_CONFIRM);
40 40
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $linkObj = $smartobjectLinkHandler->get($linkid);
46 46
 
47 47
         if ($linkObj->isNew()) {
48
-            redirect_header(SMARTOBJECT_URL . 'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND);
48
+            redirect_header(SMARTOBJECT_URL.'admin/link.php', 3, _AM_SOBJECT_LINK_NOT_FOUND);
49 49
         }
50 50
 
51 51
         smart_xoops_cp_header();
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINK_DISPLAY, _AM_SOBJECT_SENT_LINK_DISPLAY_INFO);
56 56
 
57
-        require_once XOOPS_ROOT_PATH . '/class/template.php';
57
+        require_once XOOPS_ROOT_PATH.'/class/template.php';
58 58
 
59 59
         // ---
60 60
         // 2012-01-01 PHP 5.3: Assigning the return value of new by reference is now deprecated.
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
         smart_collapsableBar('sentlinks', _AM_SOBJECT_SENT_LINKS, _AM_SOBJECT_SENT_LINKS_INFO);
83 83
 
84
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
84
+        require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
85 85
         $objectTable = new XoopsModules\Smartobject\SmartObjectTable($smartobjectLinkHandler, null, ['delete']);
86 86
         $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('date'));
87 87
         $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn(_AM_SOBJECT_SENT_LINKS_FROM, $align = 'left', $width = false, 'getFromInfo'));
@@ -104,4 +104,4 @@  discard block
 block discarded – undo
104 104
 
105 105
 //smart_modFooter();
106 106
 //xoops_cp_footer();
107
-require_once __DIR__ . '/admin_footer.php';
107
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/update.php 2 patches
Indentation   +273 added lines, -273 removed lines patch added patch discarded remove patch
@@ -19,180 +19,180 @@  discard block
 block discarded – undo
19 19
 // =========================================================================================
20 20
 function update_tables_to_300()
21 21
 {
22
-    $dbupdater = new Wfdownloads\Dbupdater();
22
+	$dbupdater = new Wfdownloads\Dbupdater();
23 23
 
24
-    if (!wfdownloads_TableExists('wfdownloads_meta')) {
25
-        // Create table wfdownloads_meta
26
-        $table = new Wfdownloads\DbupdaterTable('wfdownloads_meta');
27
-        $table->setStructure("CREATE TABLE `%s` (
24
+	if (!wfdownloads_TableExists('wfdownloads_meta')) {
25
+		// Create table wfdownloads_meta
26
+		$table = new Wfdownloads\DbupdaterTable('wfdownloads_meta');
27
+		$table->setStructure("CREATE TABLE `%s` (
28 28
                                 metakey varchar(50) NOT NULL default '',
29 29
                                 metavalue varchar(255) NOT NULL default '',
30 30
                                 PRIMARY KEY (metakey))
31 31
                                 ENGINE=MyISAM;");
32 32
 
33
-        $table->setData(sprintf("'version', %s", round($GLOBALS['xoopsModule']->getVar('version') / 100, 2)));
34
-        if ($dbupdater->updateTable($table)) {
35
-            echo 'wfdownloads_meta table created<br>';
36
-        }
37
-    }
33
+		$table->setData(sprintf("'version', %s", round($GLOBALS['xoopsModule']->getVar('version') / 100, 2)));
34
+		if ($dbupdater->updateTable($table)) {
35
+			echo 'wfdownloads_meta table created<br>';
36
+		}
37
+	}
38 38
 
39
-    $download_fields = [
40
-        'lid'           => ['Type' => 'int(11) unsigned NOT NULL auto_increment', 'Default' => false],
41
-        'cid'           => ['Type' => "int(5) unsigned NOT NULL default '0'", 'Default' => true],
42
-        'title'         => ['Type' => "varchar(100) NOT NULL default ''", 'Default' => true],
43
-        'url'           => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
44
-        'filename'      => ['Type' => "varchar(150) NOT NULL default ''", 'Default' => true],
45
-        'filetype'      => ['Type' => "varchar(100) NOT NULL default ''", 'Default' => true],
46
-        'homepage'      => ['Type' => "varchar(100) NOT NULL default ''", 'Default' => true],
47
-        'version'       => ['Type' => "varchar(20) NOT NULL default ''", 'Default' => true],
48
-        'size'          => ['Type' => "int(8) NOT NULL default '0'", 'Default' => true],
49
-        'platform'      => ['Type' => "varchar(50) NOT NULL default ''", 'Default' => true],
50
-        'screenshot'    => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
51
-        'submitter'     => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
52
-        'publisher'     => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
53
-        'status'        => ['Type' => "tinyint(2) NOT NULL default '0'", 'Default' => true],
54
-        'date'          => ['Type' => "int(10) NOT NULL default '0'", 'Default' => true],
55
-        'hits'          => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
56
-        'rating'        => ['Type' => "double(6,4) NOT NULL default '0.0000'", 'Default' => true],
57
-        'votes'         => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
58
-        'comments'      => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
59
-        'license'       => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
60
-        'mirror'        => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
61
-        'price'         => ['Type' => "varchar(10) NOT NULL default 'Free'", 'Default' => true],
62
-        'paypalemail'   => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
63
-        'features'      => ['Type' => 'text NOT NULL', 'Default' => false],
64
-        'requirements'  => ['Type' => 'text NOT NULL', 'Default' => false],
65
-        'homepagetitle' => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
66
-        'forumid'       => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
67
-        'limitations'   => ['Type' => "varchar(255) NOT NULL default '30 day trial'", 'Default' => true],
68
-        'dhistory'      => ['Type' => 'text NOT NULL', 'Default' => false],
69
-        'published'     => ['Type' => "int(11) NOT NULL default '1089662528'", 'Default' => true],
70
-        'expired'       => ['Type' => "int(10) NOT NULL default '0'", 'Default' => true],
71
-        'updated'       => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
72
-        'offline'       => ['Type' => "tinyint(1) NOT NULL default '0'", 'Default' => true],
73
-        'description'   => ['Type' => 'text NOT NULL', 'Default' => false],
74
-        'ipaddress'     => ['Type' => "varchar(120) NOT NULL default '0'", 'Default' => true],
75
-        'notifypub'     => ['Type' => "int(1) NOT NULL default '0'", 'Default' => true],
76
-        'summary'       => ['Type' => 'text NOT NULL', 'Default' => false]
77
-    ];
39
+	$download_fields = [
40
+		'lid'           => ['Type' => 'int(11) unsigned NOT NULL auto_increment', 'Default' => false],
41
+		'cid'           => ['Type' => "int(5) unsigned NOT NULL default '0'", 'Default' => true],
42
+		'title'         => ['Type' => "varchar(100) NOT NULL default ''", 'Default' => true],
43
+		'url'           => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
44
+		'filename'      => ['Type' => "varchar(150) NOT NULL default ''", 'Default' => true],
45
+		'filetype'      => ['Type' => "varchar(100) NOT NULL default ''", 'Default' => true],
46
+		'homepage'      => ['Type' => "varchar(100) NOT NULL default ''", 'Default' => true],
47
+		'version'       => ['Type' => "varchar(20) NOT NULL default ''", 'Default' => true],
48
+		'size'          => ['Type' => "int(8) NOT NULL default '0'", 'Default' => true],
49
+		'platform'      => ['Type' => "varchar(50) NOT NULL default ''", 'Default' => true],
50
+		'screenshot'    => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
51
+		'submitter'     => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
52
+		'publisher'     => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
53
+		'status'        => ['Type' => "tinyint(2) NOT NULL default '0'", 'Default' => true],
54
+		'date'          => ['Type' => "int(10) NOT NULL default '0'", 'Default' => true],
55
+		'hits'          => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
56
+		'rating'        => ['Type' => "double(6,4) NOT NULL default '0.0000'", 'Default' => true],
57
+		'votes'         => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
58
+		'comments'      => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
59
+		'license'       => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
60
+		'mirror'        => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
61
+		'price'         => ['Type' => "varchar(10) NOT NULL default 'Free'", 'Default' => true],
62
+		'paypalemail'   => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
63
+		'features'      => ['Type' => 'text NOT NULL', 'Default' => false],
64
+		'requirements'  => ['Type' => 'text NOT NULL', 'Default' => false],
65
+		'homepagetitle' => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
66
+		'forumid'       => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
67
+		'limitations'   => ['Type' => "varchar(255) NOT NULL default '30 day trial'", 'Default' => true],
68
+		'dhistory'      => ['Type' => 'text NOT NULL', 'Default' => false],
69
+		'published'     => ['Type' => "int(11) NOT NULL default '1089662528'", 'Default' => true],
70
+		'expired'       => ['Type' => "int(10) NOT NULL default '0'", 'Default' => true],
71
+		'updated'       => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
72
+		'offline'       => ['Type' => "tinyint(1) NOT NULL default '0'", 'Default' => true],
73
+		'description'   => ['Type' => 'text NOT NULL', 'Default' => false],
74
+		'ipaddress'     => ['Type' => "varchar(120) NOT NULL default '0'", 'Default' => true],
75
+		'notifypub'     => ['Type' => "int(1) NOT NULL default '0'", 'Default' => true],
76
+		'summary'       => ['Type' => 'text NOT NULL', 'Default' => false]
77
+	];
78 78
 
79
-    $renamed_fields = [
80
-        'logourl' => 'screenshot'
81
-    ];
79
+	$renamed_fields = [
80
+		'logourl' => 'screenshot'
81
+	];
82 82
 
83
-    echo '<br><b>Checking Download table</b><br>';
84
-    $downloadHandler = xoops_getModuleHandler('download', 'wfdownloads');
85
-    $download_table  = new Wfdownloads\DbupdaterTable('wfdownloads_downloads');
86
-    $fields          = get_table_info($downloadHandler->table, $download_fields);
87
-    // Check for renamed fields
88
-    rename_fields($download_table, $renamed_fields, $fields, $download_fields);
89
-    update_table($download_fields, $fields, $download_table);
90
-    if ($dbupdater->updateTable($download_table)) {
91
-        echo 'Downloads table updated<br>';
92
-    }
93
-    unset($fields);
83
+	echo '<br><b>Checking Download table</b><br>';
84
+	$downloadHandler = xoops_getModuleHandler('download', 'wfdownloads');
85
+	$download_table  = new Wfdownloads\DbupdaterTable('wfdownloads_downloads');
86
+	$fields          = get_table_info($downloadHandler->table, $download_fields);
87
+	// Check for renamed fields
88
+	rename_fields($download_table, $renamed_fields, $fields, $download_fields);
89
+	update_table($download_fields, $fields, $download_table);
90
+	if ($dbupdater->updateTable($download_table)) {
91
+		echo 'Downloads table updated<br>';
92
+	}
93
+	unset($fields);
94 94
 
95
-    $mod_fields = [
96
-        'requestid'       => ['Type' => 'int(11) NOT NULL auto_increment', 'Default' => false],
97
-        'lid'             => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
98
-        'cid'             => ['Type' => "int(5) unsigned NOT NULL default '0'", 'Default' => true],
99
-        'title'           => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
100
-        'url'             => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
101
-        'filename'        => ['Type' => "varchar(150) NOT NULL default ''", 'Default' => true],
102
-        'filetype'        => ['Type' => "varchar(100) NOT NULL default ''", 'Default' => true],
103
-        'homepage'        => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
104
-        'version'         => ['Type' => "varchar(20) NOT NULL default ''", 'Default' => true],
105
-        'size'            => ['Type' => "int(8) NOT NULL default '0'", 'Default' => true],
106
-        'platform'        => ['Type' => "varchar(50) NOT NULL default ''", 'Default' => true],
107
-        'screenshot'      => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
108
-        'submitter'       => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
109
-        'publisher'       => ['Type' => 'text NOT NULL', 'Default' => false],
110
-        'status'          => ['Type' => "tinyint(2) NOT NULL default '0'", 'Default' => true],
111
-        'date'            => ['Type' => "int(10) NOT NULL default '0'", 'Default' => true],
112
-        'hits'            => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
113
-        'rating'          => ['Type' => "double(6,4) NOT NULL default '0.0000'", 'Default' => true],
114
-        'votes'           => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
115
-        'comments'        => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
116
-        'license'         => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
117
-        'mirror'          => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
118
-        'price'           => ['Type' => "varchar(10) NOT NULL default 'Free'", 'Default' => true],
119
-        'paypalemail'     => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
120
-        'features'        => ['Type' => 'text NOT NULL', 'Default' => false],
121
-        'requirements'    => ['Type' => 'text NOT NULL', 'Default' => false],
122
-        'homepagetitle'   => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
123
-        'forumid'         => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
124
-        'limitations'     => ['Type' => "varchar(255) NOT NULL default '30 day trial'", 'Default' => true],
125
-        'dhistory'        => ['Type' => 'text NOT NULL', 'Default' => false],
126
-        'published'       => ['Type' => "int(10) NOT NULL default '0'", 'Default' => true],
127
-        'expired'         => ['Type' => "int(10) NOT NULL default '0'", 'Default' => true],
128
-        'updated'         => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
129
-        'offline'         => ['Type' => "tinyint(1) NOT NULL default '0'", 'Default' => true],
130
-        'summary'         => ['Type' => 'text NOT NULL', 'Default' => false],
131
-        'description'     => ['Type' => 'text NOT NULL', 'Default' => false],
132
-        'modifysubmitter' => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
133
-        'requestdate'     => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true]
134
-    ];
95
+	$mod_fields = [
96
+		'requestid'       => ['Type' => 'int(11) NOT NULL auto_increment', 'Default' => false],
97
+		'lid'             => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
98
+		'cid'             => ['Type' => "int(5) unsigned NOT NULL default '0'", 'Default' => true],
99
+		'title'           => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
100
+		'url'             => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
101
+		'filename'        => ['Type' => "varchar(150) NOT NULL default ''", 'Default' => true],
102
+		'filetype'        => ['Type' => "varchar(100) NOT NULL default ''", 'Default' => true],
103
+		'homepage'        => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
104
+		'version'         => ['Type' => "varchar(20) NOT NULL default ''", 'Default' => true],
105
+		'size'            => ['Type' => "int(8) NOT NULL default '0'", 'Default' => true],
106
+		'platform'        => ['Type' => "varchar(50) NOT NULL default ''", 'Default' => true],
107
+		'screenshot'      => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
108
+		'submitter'       => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
109
+		'publisher'       => ['Type' => 'text NOT NULL', 'Default' => false],
110
+		'status'          => ['Type' => "tinyint(2) NOT NULL default '0'", 'Default' => true],
111
+		'date'            => ['Type' => "int(10) NOT NULL default '0'", 'Default' => true],
112
+		'hits'            => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
113
+		'rating'          => ['Type' => "double(6,4) NOT NULL default '0.0000'", 'Default' => true],
114
+		'votes'           => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
115
+		'comments'        => ['Type' => "int(11) unsigned NOT NULL default '0'", 'Default' => true],
116
+		'license'         => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
117
+		'mirror'          => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
118
+		'price'           => ['Type' => "varchar(10) NOT NULL default 'Free'", 'Default' => true],
119
+		'paypalemail'     => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
120
+		'features'        => ['Type' => 'text NOT NULL', 'Default' => false],
121
+		'requirements'    => ['Type' => 'text NOT NULL', 'Default' => false],
122
+		'homepagetitle'   => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
123
+		'forumid'         => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
124
+		'limitations'     => ['Type' => "varchar(255) NOT NULL default '30 day trial'", 'Default' => true],
125
+		'dhistory'        => ['Type' => 'text NOT NULL', 'Default' => false],
126
+		'published'       => ['Type' => "int(10) NOT NULL default '0'", 'Default' => true],
127
+		'expired'         => ['Type' => "int(10) NOT NULL default '0'", 'Default' => true],
128
+		'updated'         => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
129
+		'offline'         => ['Type' => "tinyint(1) NOT NULL default '0'", 'Default' => true],
130
+		'summary'         => ['Type' => 'text NOT NULL', 'Default' => false],
131
+		'description'     => ['Type' => 'text NOT NULL', 'Default' => false],
132
+		'modifysubmitter' => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
133
+		'requestdate'     => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true]
134
+	];
135 135
 
136
-    $renamed_fields = [
137
-        'logourl' => 'screenshot'
138
-    ];
136
+	$renamed_fields = [
137
+		'logourl' => 'screenshot'
138
+	];
139 139
 
140
-    echo '<br><b>Checking Modified Downloads table</b><br>';
141
-    $moduleHandler = xoops_getModuleHandler('modification', 'wfdownloads');
142
-    $mod_table     = new Wfdownloads\DbupdaterTable('wfdownloads_mod');
143
-    $fields        = get_table_info($moduleHandler->table, $mod_fields);
144
-    rename_fields($mod_table, $renamed_fields, $fields, $mod_fields);
145
-    update_table($mod_fields, $fields, $mod_table);
146
-    if ($dbupdater->updateTable($mod_table)) {
147
-        echo 'Modified Downloads table updated <br>';
148
-    }
149
-    unset($fields);
140
+	echo '<br><b>Checking Modified Downloads table</b><br>';
141
+	$moduleHandler = xoops_getModuleHandler('modification', 'wfdownloads');
142
+	$mod_table     = new Wfdownloads\DbupdaterTable('wfdownloads_mod');
143
+	$fields        = get_table_info($moduleHandler->table, $mod_fields);
144
+	rename_fields($mod_table, $renamed_fields, $fields, $mod_fields);
145
+	update_table($mod_fields, $fields, $mod_table);
146
+	if ($dbupdater->updateTable($mod_table)) {
147
+		echo 'Modified Downloads table updated <br>';
148
+	}
149
+	unset($fields);
150 150
 
151
-    $cat_fields = [
152
-        'cid'          => ['Type' => 'int(5) unsigned NOT NULL auto_increment', 'Default' => false],
153
-        'pid'          => ['Type' => "int(5) unsigned NOT NULL default '0'", 'Default' => true],
154
-        'title'        => ['Type' => "varchar(50) NOT NULL default ''", 'Default' => true],
155
-        'imgurl'       => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
156
-        'description'  => ['Type' => 'text NULL', 'Default' => true],
157
-        'total'        => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
158
-        'summary'      => ['Type' => 'text NOT NULL', 'Default' => false],
159
-        'spotlighttop' => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
160
-        'spotlighthis' => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
161
-        'dohtml'       => ['Type' => "tinyint(1) NOT NULL default '1'", 'Default' => true],
162
-        'dosmiley'     => ['Type' => "tinyint(1) NOT NULL default '1'", 'Default' => true],
163
-        'doxcode'      => ['Type' => "tinyint(1) NOT NULL default '1'", 'Default' => true],
164
-        'doimage'      => ['Type' => "tinyint(1) NOT NULL default '1'", 'Default' => true],
165
-        'dobr'         => ['Type' => "tinyint(1) NOT NULL default '1'", 'Default' => true],
166
-        'weight'       => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true]
167
-    ];
168
-    echo '<br><b>Checking Category table</b><br>';
169
-    $catHandler = xoops_getModuleHandler('category', 'wfdownloads');
170
-    $cat_table  = new Wfdownloads\DbupdaterTable('wfdownloads_cat');
171
-    $fields     = get_table_info($catHandler->table, $cat_fields);
172
-    update_table($cat_fields, $fields, $cat_table);
173
-    if ($dbupdater->updateTable($cat_table)) {
174
-        echo 'Category table updated<br>';
175
-    }
176
-    unset($fields);
151
+	$cat_fields = [
152
+		'cid'          => ['Type' => 'int(5) unsigned NOT NULL auto_increment', 'Default' => false],
153
+		'pid'          => ['Type' => "int(5) unsigned NOT NULL default '0'", 'Default' => true],
154
+		'title'        => ['Type' => "varchar(50) NOT NULL default ''", 'Default' => true],
155
+		'imgurl'       => ['Type' => "varchar(255) NOT NULL default ''", 'Default' => true],
156
+		'description'  => ['Type' => 'text NULL', 'Default' => true],
157
+		'total'        => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
158
+		'summary'      => ['Type' => 'text NOT NULL', 'Default' => false],
159
+		'spotlighttop' => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
160
+		'spotlighthis' => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
161
+		'dohtml'       => ['Type' => "tinyint(1) NOT NULL default '1'", 'Default' => true],
162
+		'dosmiley'     => ['Type' => "tinyint(1) NOT NULL default '1'", 'Default' => true],
163
+		'doxcode'      => ['Type' => "tinyint(1) NOT NULL default '1'", 'Default' => true],
164
+		'doimage'      => ['Type' => "tinyint(1) NOT NULL default '1'", 'Default' => true],
165
+		'dobr'         => ['Type' => "tinyint(1) NOT NULL default '1'", 'Default' => true],
166
+		'weight'       => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true]
167
+	];
168
+	echo '<br><b>Checking Category table</b><br>';
169
+	$catHandler = xoops_getModuleHandler('category', 'wfdownloads');
170
+	$cat_table  = new Wfdownloads\DbupdaterTable('wfdownloads_cat');
171
+	$fields     = get_table_info($catHandler->table, $cat_fields);
172
+	update_table($cat_fields, $fields, $cat_table);
173
+	if ($dbupdater->updateTable($cat_table)) {
174
+		echo 'Category table updated<br>';
175
+	}
176
+	unset($fields);
177 177
 
178
-    $broken_fields = [
179
-        'reportid'     => ['Type' => 'int(5) NOT NULL auto_increment', 'Default' => false],
180
-        'lid'          => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
181
-        'sender'       => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
182
-        'ip'           => ['Type' => "varchar(20) NOT NULL default ''", 'Default' => true],
183
-        'date'         => ['Type' => "varchar(11) NOT NULL default '0'", 'Default' => true],
184
-        'confirmed'    => ['Type' => "enum('0','1') NOT NULL default '0'", 'Default' => true],
185
-        'acknowledged' => ['Type' => "enum('0','1') NOT NULL default '0'", 'Default' => true]
186
-    ];
187
-    echo '<br><b>Checking Broken Report table</b><br>';
188
-    $brokenHandler = xoops_getModuleHandler('report', 'wfdownloads');
189
-    $broken_table  = new Wfdownloads\DbupdaterTable('wfdownloads_broken');
190
-    $fields        = get_table_info($brokenHandler->table, $broken_fields);
191
-    update_table($broken_fields, $fields, $broken_table);
192
-    if ($dbupdater->updateTable($broken_table)) {
193
-        echo 'Broken Reports table updated<br>';
194
-    }
195
-    unset($fields);
178
+	$broken_fields = [
179
+		'reportid'     => ['Type' => 'int(5) NOT NULL auto_increment', 'Default' => false],
180
+		'lid'          => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
181
+		'sender'       => ['Type' => "int(11) NOT NULL default '0'", 'Default' => true],
182
+		'ip'           => ['Type' => "varchar(20) NOT NULL default ''", 'Default' => true],
183
+		'date'         => ['Type' => "varchar(11) NOT NULL default '0'", 'Default' => true],
184
+		'confirmed'    => ['Type' => "enum('0','1') NOT NULL default '0'", 'Default' => true],
185
+		'acknowledged' => ['Type' => "enum('0','1') NOT NULL default '0'", 'Default' => true]
186
+	];
187
+	echo '<br><b>Checking Broken Report table</b><br>';
188
+	$brokenHandler = xoops_getModuleHandler('report', 'wfdownloads');
189
+	$broken_table  = new Wfdownloads\DbupdaterTable('wfdownloads_broken');
190
+	$fields        = get_table_info($brokenHandler->table, $broken_fields);
191
+	update_table($broken_fields, $fields, $broken_table);
192
+	if ($dbupdater->updateTable($broken_table)) {
193
+		echo 'Broken Reports table updated<br>';
194
+	}
195
+	unset($fields);
196 196
 }
197 197
 
198 198
 // =========================================================================================
@@ -205,48 +205,48 @@  discard block
 block discarded – undo
205 205
  */
206 206
 function invert_nohtm_dohtml_values()
207 207
 {
208
-    $ret = [];
209
-    global $xoopsDB;
210
-    $catHandler = xoops_getModuleHandler('category', 'wfdownloads');
211
-    $result     = $xoopsDB->query('SHOW COLUMNS FROM ' . $catHandler->table);
212
-    while (false !== ($existing_field = $xoopsDB->fetchArray($result))) {
213
-        $fields[$existing_field['field']] = $existing_field['type'];
214
-    }
215
-    if (in_array('nohtml', array_keys($fields))) {
216
-        $dbupdater = new Wfdownloads\Dbupdater();
217
-        //Invert column values
218
-        // alter options in wfdownloads_cat
219
-        $table = new Wfdownloads\DbupdaterTable('wfdownloads_cat');
220
-        $table->addAlteredField('nohtml', "dohtml tinyint(1) NOT NULL DEFAULT '1'");
221
-        $table->addAlteredField('nosmiley', "dosmiley tinyint(1) NOT NULL DEFAULT '1'");
222
-        $table->addAlteredField('noxcodes', "doxcode tinyint(1) NOT NULL DEFAULT '1'");
223
-        $table->addAlteredField('noimages', "doimage tinyint(1) NOT NULL DEFAULT '1'");
224
-        $table->addAlteredField('nobreak', "dobr tinyint(1) NOT NULL DEFAULT '1'");
208
+	$ret = [];
209
+	global $xoopsDB;
210
+	$catHandler = xoops_getModuleHandler('category', 'wfdownloads');
211
+	$result     = $xoopsDB->query('SHOW COLUMNS FROM ' . $catHandler->table);
212
+	while (false !== ($existing_field = $xoopsDB->fetchArray($result))) {
213
+		$fields[$existing_field['field']] = $existing_field['type'];
214
+	}
215
+	if (in_array('nohtml', array_keys($fields))) {
216
+		$dbupdater = new Wfdownloads\Dbupdater();
217
+		//Invert column values
218
+		// alter options in wfdownloads_cat
219
+		$table = new Wfdownloads\DbupdaterTable('wfdownloads_cat');
220
+		$table->addAlteredField('nohtml', "dohtml tinyint(1) NOT NULL DEFAULT '1'");
221
+		$table->addAlteredField('nosmiley', "dosmiley tinyint(1) NOT NULL DEFAULT '1'");
222
+		$table->addAlteredField('noxcodes', "doxcode tinyint(1) NOT NULL DEFAULT '1'");
223
+		$table->addAlteredField('noimages', "doimage tinyint(1) NOT NULL DEFAULT '1'");
224
+		$table->addAlteredField('nobreak', "dobr tinyint(1) NOT NULL DEFAULT '1'");
225 225
 
226
-        //inverting values no=1 <=> do=0
227
-        // have to store teporarly as value = 2 to
228
-        // avoid putting everithing to same value
229
-        // if you change 1 to 0, then 0 to one,
230
-        // every value will be 1, follow me?
231
-        $table->addUpdatedWhere('dohtml', 2, '=1');
232
-        $table->addUpdatedWhere('dohtml', 1, '=0');
233
-        $table->addUpdatedWhere('dohtml', 0, '=2');
226
+		//inverting values no=1 <=> do=0
227
+		// have to store teporarly as value = 2 to
228
+		// avoid putting everithing to same value
229
+		// if you change 1 to 0, then 0 to one,
230
+		// every value will be 1, follow me?
231
+		$table->addUpdatedWhere('dohtml', 2, '=1');
232
+		$table->addUpdatedWhere('dohtml', 1, '=0');
233
+		$table->addUpdatedWhere('dohtml', 0, '=2');
234 234
 
235
-        $table->addUpdatedWhere('dosmiley', 2, '=1');
236
-        $table->addUpdatedWhere('dosmiley', 1, '=0');
237
-        $table->addUpdatedWhere('dosmiley', 0, '=2');
235
+		$table->addUpdatedWhere('dosmiley', 2, '=1');
236
+		$table->addUpdatedWhere('dosmiley', 1, '=0');
237
+		$table->addUpdatedWhere('dosmiley', 0, '=2');
238 238
 
239
-        $table->addUpdatedWhere('doxcode', 2, '=1');
240
-        $table->addUpdatedWhere('doxcode', 1, '=0');
241
-        $table->addUpdatedWhere('doxcode', 0, '=2');
239
+		$table->addUpdatedWhere('doxcode', 2, '=1');
240
+		$table->addUpdatedWhere('doxcode', 1, '=0');
241
+		$table->addUpdatedWhere('doxcode', 0, '=2');
242 242
 
243
-        $table->addUpdatedWhere('doimage', 2, '=1');
244
-        $table->addUpdatedWhere('doimage', 1, '=0');
245
-        $table->addUpdatedWhere('doimage', 0, '=2');
246
-        $ret = $dbupdater->updateTable($table);
247
-    }
243
+		$table->addUpdatedWhere('doimage', 2, '=1');
244
+		$table->addUpdatedWhere('doimage', 1, '=0');
245
+		$table->addUpdatedWhere('doimage', 0, '=2');
246
+		$ret = $dbupdater->updateTable($table);
247
+	}
248 248
 
249
-    return $ret;
249
+	return $ret;
250 250
 }
251 251
 
252 252
 /**
@@ -259,22 +259,22 @@  discard block
 block discarded – undo
259 259
  */
260 260
 function update_table($new_fields, $existing_fields, &$table)
261 261
 {
262
-    foreach ($new_fields as $field => $fieldinfo) {
263
-        $type = $fieldinfo['Type'];
264
-        if (!in_array($field, array_keys($existing_fields))) {
265
-            //Add field as it is missing
266
-            $table->addNewField($field, $type);
267
-        //$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type);
268
-            //echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br>";
269
-        } elseif ($existing_fields[$field] != $type) {
270
-            $table->addAlteredField($field, $field . ' ' . $type);
271
-        // check $fields[$field]['type'] for things like "int(10) unsigned"
272
-            //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type);
273
-            //echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br>";
274
-        } else {
275
-            //echo $field." <FONT COLOR='#0033FF'>Uptodate</FONT><br>";
276
-        }
277
-    }
262
+	foreach ($new_fields as $field => $fieldinfo) {
263
+		$type = $fieldinfo['Type'];
264
+		if (!in_array($field, array_keys($existing_fields))) {
265
+			//Add field as it is missing
266
+			$table->addNewField($field, $type);
267
+		//$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type);
268
+			//echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br>";
269
+		} elseif ($existing_fields[$field] != $type) {
270
+			$table->addAlteredField($field, $field . ' ' . $type);
271
+		// check $fields[$field]['type'] for things like "int(10) unsigned"
272
+			//$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type);
273
+			//echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br>";
274
+		} else {
275
+			//echo $field." <FONT COLOR='#0033FF'>Uptodate</FONT><br>";
276
+		}
277
+	}
278 278
 }
279 279
 
280 280
 /**
@@ -287,22 +287,22 @@  discard block
 block discarded – undo
287 287
  */
288 288
 function get_table_info($table, $default_fields)
289 289
 {
290
-    global $xoopsDB;
291
-    $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $table);
292
-    while (false !== ($existing_field = $xoopsDB->fetchArray($result))) {
293
-        $fields[$existing_field['Field']] = $existing_field['Type'];
294
-        if ('YES' !== $existing_field['Null']) {
295
-            $fields[$existing_field['Field']] .= ' NOT NULL';
296
-        }
297
-        if ($existing_field['Extra']) {
298
-            $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra'];
299
-        }
300
-        if ($default_fields[$existing_field['Field']]['Default']) {
301
-            $fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'";
302
-        }
303
-    }
290
+	global $xoopsDB;
291
+	$result = $xoopsDB->query('SHOW COLUMNS FROM ' . $table);
292
+	while (false !== ($existing_field = $xoopsDB->fetchArray($result))) {
293
+		$fields[$existing_field['Field']] = $existing_field['Type'];
294
+		if ('YES' !== $existing_field['Null']) {
295
+			$fields[$existing_field['Field']] .= ' NOT NULL';
296
+		}
297
+		if ($existing_field['Extra']) {
298
+			$fields[$existing_field['Field']] .= ' ' . $existing_field['Extra'];
299
+		}
300
+		if ($default_fields[$existing_field['Field']]['Default']) {
301
+			$fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'";
302
+		}
303
+	}
304 304
 
305
-    return $fields;
305
+	return $fields;
306 306
 }
307 307
 
308 308
 /**
@@ -316,60 +316,60 @@  discard block
 block discarded – undo
316 316
  */
317 317
 function rename_fields(&$table, $renamed_fields, &$fields, $new_fields)
318 318
 {
319
-    foreach (array_keys($fields) as $field) {
320
-        if (in_array($field, array_keys($renamed_fields))) {
321
-            $new_field_name = $renamed_fields[$field];
322
-            $new_field_type = $new_fields[$new_field_name]['Type'];
323
-            $table->addAltered($field, $new_field_name . ' ' . $new_field_type);
324
-            //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type);
325
-            //echo $field." Renamed to ".$new_field_name."<br>";
326
-            $fields[$new_field_name] = $new_field_type;
327
-        }
328
-    }
329
-    //return $fields;
319
+	foreach (array_keys($fields) as $field) {
320
+		if (in_array($field, array_keys($renamed_fields))) {
321
+			$new_field_name = $renamed_fields[$field];
322
+			$new_field_type = $new_fields[$new_field_name]['Type'];
323
+			$table->addAltered($field, $new_field_name . ' ' . $new_field_type);
324
+			//$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type);
325
+			//echo $field." Renamed to ".$new_field_name."<br>";
326
+			$fields[$new_field_name] = $new_field_type;
327
+		}
328
+	}
329
+	//return $fields;
330 330
 }
331 331
 
332 332
 $op = isset($_REQUEST['op']) ? (int)$_REQUEST['op'] : 0;
333 333
 switch ($op) {
334
-    case 1:
335
-        // Make sure that nohtml is properly changed to dohtml
336
-        invert_nohtm_dohtml_values();
337
-        // Ensure that the proper tables are present
338
-        update_tables_to_300();
339
-        // Import data from MyDownloads
340
-        import_mydownloads_to_wfdownloads();
341
-        break;
334
+	case 1:
335
+		// Make sure that nohtml is properly changed to dohtml
336
+		invert_nohtm_dohtml_values();
337
+		// Ensure that the proper tables are present
338
+		update_tables_to_300();
339
+		// Import data from MyDownloads
340
+		import_mydownloads_to_wfdownloads();
341
+		break;
342 342
 
343
-    case 2:
344
-        // Update WF-Downloads
345
-        $log = invert_nohtm_dohtml_values();
346
-        update_tables_to_300();
347
-        break;
343
+	case 2:
344
+		// Update WF-Downloads
345
+		$log = invert_nohtm_dohtml_values();
346
+		update_tables_to_300();
347
+		break;
348 348
 
349
-    default:
350
-        //ask what to do
351
-        include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
352
-        $form = new \XoopsThemeForm('Upgrade WF-Downloads', 'form', $_SERVER['REQUEST_URI']);
349
+	default:
350
+		//ask what to do
351
+		include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
352
+		$form = new \XoopsThemeForm('Upgrade WF-Downloads', 'form', $_SERVER['REQUEST_URI']);
353 353
 
354
-        //Is MyDownloads installed?
355
-        /** @var XoopsModuleHandler $moduleHandler */
356
-        $moduleHandler     = xoops_getHandler('module');
357
-        $mydownloadsModule = $moduleHandler->getByDirname('mydownloads');
358
-        if (is_object($mydownloadsModule)) {
359
-            $mydownloadsButton = new \XoopsFormButton('Import data from MyDownloads', 'myd_button', 'Import', 'submit');
360
-            $mydownloadsButton->setExtra("onclick='document.forms.form.op.value=\"1\"'");
361
-            $form->addElement($mydownloadsButton);
362
-        }
354
+		//Is MyDownloads installed?
355
+		/** @var XoopsModuleHandler $moduleHandler */
356
+		$moduleHandler     = xoops_getHandler('module');
357
+		$mydownloadsModule = $moduleHandler->getByDirname('mydownloads');
358
+		if (is_object($mydownloadsModule)) {
359
+			$mydownloadsButton = new \XoopsFormButton('Import data from MyDownloads', 'myd_button', 'Import', 'submit');
360
+			$mydownloadsButton->setExtra("onclick='document.forms.form.op.value=\"1\"'");
361
+			$form->addElement($mydownloadsButton);
362
+		}
363 363
 
364
-        if (!wfdownloads_TableExists('wfdownloads_meta')) {
365
-            $updateButton = new \XoopsFormButton('Update WF-Downloads', 'upd_button', 'Update', 'submit');
366
-            $updateButton->setExtra("onclick='document.forms.form.op.value=\"2\"'");
367
-            $form->addElement($updateButton);
368
-        }
364
+		if (!wfdownloads_TableExists('wfdownloads_meta')) {
365
+			$updateButton = new \XoopsFormButton('Update WF-Downloads', 'upd_button', 'Update', 'submit');
366
+			$updateButton->setExtra("onclick='document.forms.form.op.value=\"2\"'");
367
+			$form->addElement($updateButton);
368
+		}
369 369
 
370
-        $form->addElement(new \XoopsFormHidden('op', 0));
371
-        $form->display();
372
-        break;
370
+		$form->addElement(new \XoopsFormHidden('op', 0));
371
+		$form->display();
372
+		break;
373 373
 }
374 374
 //wfdownloads_modFooter();
375 375
 //xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
  */
9 9
 
10 10
 use XoopsModules\Wfdownloads;
11
-require_once __DIR__ . '/admin_header.php';
12
-require_once SMARTCONTENT_ROOT_PATH . 'class/dbupdater.php';
11
+require_once __DIR__.'/admin_header.php';
12
+require_once SMARTCONTENT_ROOT_PATH.'class/dbupdater.php';
13 13
 
14 14
 smartcontent_xoops_cp_header();
15 15
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     $ret = [];
209 209
     global $xoopsDB;
210 210
     $catHandler = xoops_getModuleHandler('category', 'wfdownloads');
211
-    $result     = $xoopsDB->query('SHOW COLUMNS FROM ' . $catHandler->table);
211
+    $result     = $xoopsDB->query('SHOW COLUMNS FROM '.$catHandler->table);
212 212
     while (false !== ($existing_field = $xoopsDB->fetchArray($result))) {
213 213
         $fields[$existing_field['field']] = $existing_field['type'];
214 214
     }
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         //$xoopsDB->query("ALTER TABLE ".$table." ADD ".$field." ".$type);
268 268
             //echo $field."(".$type.") <FONT COLOR='##22DD51'>Added</FONT><br>";
269 269
         } elseif ($existing_fields[$field] != $type) {
270
-            $table->addAlteredField($field, $field . ' ' . $type);
270
+            $table->addAlteredField($field, $field.' '.$type);
271 271
         // check $fields[$field]['type'] for things like "int(10) unsigned"
272 272
             //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$field." ".$type);
273 273
             //echo $field." <FONT COLOR='#FF6600'>Changed to</FONT> ".$type."<br>";
@@ -288,17 +288,17 @@  discard block
 block discarded – undo
288 288
 function get_table_info($table, $default_fields)
289 289
 {
290 290
     global $xoopsDB;
291
-    $result = $xoopsDB->query('SHOW COLUMNS FROM ' . $table);
291
+    $result = $xoopsDB->query('SHOW COLUMNS FROM '.$table);
292 292
     while (false !== ($existing_field = $xoopsDB->fetchArray($result))) {
293 293
         $fields[$existing_field['Field']] = $existing_field['Type'];
294 294
         if ('YES' !== $existing_field['Null']) {
295 295
             $fields[$existing_field['Field']] .= ' NOT NULL';
296 296
         }
297 297
         if ($existing_field['Extra']) {
298
-            $fields[$existing_field['Field']] .= ' ' . $existing_field['Extra'];
298
+            $fields[$existing_field['Field']] .= ' '.$existing_field['Extra'];
299 299
         }
300 300
         if ($default_fields[$existing_field['Field']]['Default']) {
301
-            $fields[$existing_field['Field']] .= " default '" . $existing_field['Default'] . "'";
301
+            $fields[$existing_field['Field']] .= " default '".$existing_field['Default']."'";
302 302
         }
303 303
     }
304 304
 
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
         if (in_array($field, array_keys($renamed_fields))) {
321 321
             $new_field_name = $renamed_fields[$field];
322 322
             $new_field_type = $new_fields[$new_field_name]['Type'];
323
-            $table->addAltered($field, $new_field_name . ' ' . $new_field_type);
323
+            $table->addAltered($field, $new_field_name.' '.$new_field_type);
324 324
             //$xoopsDB->query("ALTER TABLE ".$table." CHANGE ".$field." ".$new_field_name." ".$new_field_type);
325 325
             //echo $field." Renamed to ".$new_field_name."<br>";
326 326
             $fields[$new_field_name] = $new_field_type;
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
     //return $fields;
330 330
 }
331 331
 
332
-$op = isset($_REQUEST['op']) ? (int)$_REQUEST['op'] : 0;
332
+$op = isset($_REQUEST['op']) ? (int) $_REQUEST['op'] : 0;
333 333
 switch ($op) {
334 334
     case 1:
335 335
         // Make sure that nohtml is properly changed to dohtml
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
     default:
350 350
         //ask what to do
351
-        include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
351
+        include XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
352 352
         $form = new \XoopsThemeForm('Upgrade WF-Downloads', 'form', $_SERVER['REQUEST_URI']);
353 353
 
354 354
         //Is MyDownloads installed?
@@ -373,4 +373,4 @@  discard block
 block discarded – undo
373 373
 }
374 374
 //wfdownloads_modFooter();
375 375
 //xoops_cp_footer();
376
-require_once __DIR__ . '/admin_footer.php';
376
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/admin_header.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,6 +41,6 @@
 block discarded – undo
41 41
 $myts = \MyTextSanitizer::getInstance();
42 42
 
43 43
 if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof XoopsTpl)) {
44
-    require_once $GLOBALS['xoops']->path('class/template.php');
45
-    $xoopsTpl = new \XoopsTpl();
44
+	require_once $GLOBALS['xoops']->path('class/template.php');
45
+	$xoopsTpl = new \XoopsTpl();
46 46
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
 
20 20
 use XoopsModules\Smartobject;
21 21
 
22
-require_once __DIR__ . '/../../../include/cp_header.php';
22
+require_once __DIR__.'/../../../include/cp_header.php';
23 23
 //require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');
24 24
 
25 25
 // require_once __DIR__ . '/../class/Utility.php';
26
-require_once __DIR__ . '/../include/common.php';
26
+require_once __DIR__.'/../include/common.php';
27 27
 
28 28
 $moduleDirName = basename(dirname(__DIR__));
29 29
 $helper = Smartobject\Helper::getInstance();
Please login to merge, or discard this patch.
admin/rating.php 3 patches
Indentation   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -15,44 +15,44 @@  discard block
 block discarded – undo
15 15
 
16 16
 function editclass($showmenu = false, $ratingid = 0)
17 17
 {
18
-    global $smartobjectRatingHandler;
19
-
20
-    $ratingObj = $smartobjectRatingHandler->get($ratingid);
21
-
22
-    if (!$ratingObj->isNew()) {
23
-        if ($showmenu) {
24
-            //smart_adminMenu(4, _AM_SOBJECT_RATINGS . " > " . _AM_SOBJECT_EDITING);
25
-        }
26
-        smart_collapsableBar('ratingedit', _AM_SOBJECT_RATINGS_EDIT, _AM_SOBJECT_RATINGS_EDIT_INFO);
27
-
28
-        $sform = $ratingObj->getForm(_AM_SOBJECT_RATINGS_EDIT, 'addrating');
29
-        $sform->display();
30
-        smart_close_collapsable('ratingedit');
31
-    } else {
32
-        $ratingObj->hideFieldFromForm(['item', 'itemid', 'uid', 'date', 'rate']);
33
-
34
-        if (isset($_POST['op'])) {
35
-            $controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
36
-            $controller->postDataToObject($ratingObj);
37
-
38
-            if ('changedField' === $_POST['op']) {
39
-                switch ($_POST['changedField']) {
40
-                    case 'dirname':
41
-                        $ratingObj->showFieldOnForm(['item', 'itemid', 'uid', 'date', 'rate']);
42
-                        break;
43
-                }
44
-            }
45
-        }
46
-
47
-        if ($showmenu) {
48
-            //smart_adminMenu(4, _AM_SOBJECT_RATINGS . " > " . _CO_SOBJECT_CREATINGNEW);
49
-        }
50
-
51
-        smart_collapsableBar('ratingcreate', _AM_SOBJECT_RATINGS_CREATE, _AM_SOBJECT_RATINGS_CREATE_INFO);
52
-        $sform = $ratingObj->getForm(_AM_SOBJECT_RATINGS_CREATE, 'addrating');
53
-        $sform->display();
54
-        smart_close_collapsable('ratingcreate');
55
-    }
18
+	global $smartobjectRatingHandler;
19
+
20
+	$ratingObj = $smartobjectRatingHandler->get($ratingid);
21
+
22
+	if (!$ratingObj->isNew()) {
23
+		if ($showmenu) {
24
+			//smart_adminMenu(4, _AM_SOBJECT_RATINGS . " > " . _AM_SOBJECT_EDITING);
25
+		}
26
+		smart_collapsableBar('ratingedit', _AM_SOBJECT_RATINGS_EDIT, _AM_SOBJECT_RATINGS_EDIT_INFO);
27
+
28
+		$sform = $ratingObj->getForm(_AM_SOBJECT_RATINGS_EDIT, 'addrating');
29
+		$sform->display();
30
+		smart_close_collapsable('ratingedit');
31
+	} else {
32
+		$ratingObj->hideFieldFromForm(['item', 'itemid', 'uid', 'date', 'rate']);
33
+
34
+		if (isset($_POST['op'])) {
35
+			$controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
36
+			$controller->postDataToObject($ratingObj);
37
+
38
+			if ('changedField' === $_POST['op']) {
39
+				switch ($_POST['changedField']) {
40
+					case 'dirname':
41
+						$ratingObj->showFieldOnForm(['item', 'itemid', 'uid', 'date', 'rate']);
42
+						break;
43
+				}
44
+			}
45
+		}
46
+
47
+		if ($showmenu) {
48
+			//smart_adminMenu(4, _AM_SOBJECT_RATINGS . " > " . _CO_SOBJECT_CREATINGNEW);
49
+		}
50
+
51
+		smart_collapsableBar('ratingcreate', _AM_SOBJECT_RATINGS_CREATE, _AM_SOBJECT_RATINGS_CREATE_INFO);
52
+		$sform = $ratingObj->getForm(_AM_SOBJECT_RATINGS_CREATE, 'addrating');
53
+		$sform->display();
54
+		smart_close_collapsable('ratingcreate');
55
+	}
56 56
 }
57 57
 
58 58
 require_once __DIR__ . '/admin_header.php';
@@ -64,60 +64,60 @@  discard block
 block discarded – undo
64 64
 $op = '';
65 65
 
66 66
 if (isset($_GET['op'])) {
67
-    $op = $_GET['op'];
67
+	$op = $_GET['op'];
68 68
 }
69 69
 if (isset($_POST['op'])) {
70
-    $op = $_POST['op'];
70
+	$op = $_POST['op'];
71 71
 }
72 72
 
73 73
 switch ($op) {
74
-    case 'mod':
75
-    case 'changedField':
74
+	case 'mod':
75
+	case 'changedField':
76 76
 
77
-        $ratingid = isset($_GET['ratingid']) ? (int)$_GET['ratingid'] : 0;
77
+		$ratingid = isset($_GET['ratingid']) ? (int)$_GET['ratingid'] : 0;
78 78
 
79
-        smart_xoops_cp_header();
80
-        $adminObject->displayNavigation(basename(__FILE__));
79
+		smart_xoops_cp_header();
80
+		$adminObject->displayNavigation(basename(__FILE__));
81 81
 
82
-        editclass(true, $ratingid);
83
-        break;
82
+		editclass(true, $ratingid);
83
+		break;
84 84
 
85
-    case 'addrating':
86
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
87
-        $controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
88
-        $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php');
85
+	case 'addrating':
86
+		require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
87
+		$controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
88
+		$controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php');
89 89
 
90
-        break;
90
+		break;
91 91
 
92
-    case 'del':
93
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
94
-        $controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
95
-        $controller->handleObjectDeletion();
92
+	case 'del':
93
+		require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
94
+		$controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
95
+		$controller->handleObjectDeletion();
96 96
 
97
-        break;
97
+		break;
98 98
 
99
-    default:
99
+	default:
100 100
 
101
-        smart_xoops_cp_header();
102
-        $adminObject->displayNavigation(basename(__FILE__));
101
+		smart_xoops_cp_header();
102
+		$adminObject->displayNavigation(basename(__FILE__));
103 103
 
104
-        //smart_adminMenu(4, _AM_SOBJECT_RATINGS);
104
+		//smart_adminMenu(4, _AM_SOBJECT_RATINGS);
105 105
 
106
-        smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC);
106
+		smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC);
107 107
 
108
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
109
-        $objectTable = new XoopsModules\Smartobject\SmartObjectTable($smartobjectRatingHandler);
110
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('name', 'left'));
111
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('dirname', 'left'));
112
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('item', 'left', false, 'getItemValue'));
113
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('date', 'center', 150));
114
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('rate', 'center', 40, 'getRateValue'));
108
+		require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
109
+		$objectTable = new XoopsModules\Smartobject\SmartObjectTable($smartobjectRatingHandler);
110
+		$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('name', 'left'));
111
+		$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('dirname', 'left'));
112
+		$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('item', 'left', false, 'getItemValue'));
113
+		$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('date', 'center', 150));
114
+		$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('rate', 'center', 40, 'getRateValue'));
115 115
 
116
-        //      $objectTable->addCustomAction('getCreateItemLink');
117
-        //      $objectTable->addCustomAction('getCreateAttributLink');
116
+		//      $objectTable->addCustomAction('getCreateItemLink');
117
+		//      $objectTable->addCustomAction('getCreateAttributLink');
118 118
 
119
-        $objectTable->addIntroButton('addrating', 'rating.php?op=mod', _AM_SOBJECT_RATINGS_CREATE);
120
-        /*
119
+		$objectTable->addIntroButton('addrating', 'rating.php?op=mod', _AM_SOBJECT_RATINGS_CREATE);
120
+		/*
121 121
                 $criteria_upcoming = new \CriteriaCompo();
122 122
                 $criteria_upcoming->add(new \Criteria('start_date', time(), '>'));
123 123
                 $objectTable->addFilter(_AM_SOBJECT_FILTER_UPCOMING, array(
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
                 ));
143 143
         */
144 144
 
145
-        $objectTable->render();
145
+		$objectTable->render();
146 146
 
147
-        echo '<br>';
148
-        smart_close_collapsable('createdratings');
149
-        echo '<br>';
147
+		echo '<br>';
148
+		smart_close_collapsable('createdratings');
149
+		echo '<br>';
150 150
 
151
-        break;
151
+		break;
152 152
 }
153 153
 
154 154
 //smart_modFooter();
Please login to merge, or discard this patch.
Switch Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -71,53 +71,53 @@  discard block
 block discarded – undo
71 71
 }
72 72
 
73 73
 switch ($op) {
74
-    case 'mod':
75
-    case 'changedField':
74
+    	case 'mod':
75
+    	case 'changedField':
76 76
 
77
-        $ratingid = isset($_GET['ratingid']) ? (int)$_GET['ratingid'] : 0;
77
+        	$ratingid = isset($_GET['ratingid']) ? (int)$_GET['ratingid'] : 0;
78 78
 
79
-        smart_xoops_cp_header();
80
-        $adminObject->displayNavigation(basename(__FILE__));
79
+        	smart_xoops_cp_header();
80
+        	$adminObject->displayNavigation(basename(__FILE__));
81 81
 
82
-        editclass(true, $ratingid);
83
-        break;
82
+        	editclass(true, $ratingid);
83
+        	break;
84 84
 
85
-    case 'addrating':
86
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
87
-        $controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
88
-        $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php');
85
+    	case 'addrating':
86
+        	require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
87
+        	$controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
88
+        	$controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php');
89 89
 
90
-        break;
90
+        	break;
91 91
 
92
-    case 'del':
93
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
94
-        $controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
95
-        $controller->handleObjectDeletion();
92
+    	case 'del':
93
+        	require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
94
+        	$controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
95
+        	$controller->handleObjectDeletion();
96 96
 
97
-        break;
97
+        	break;
98 98
 
99
-    default:
99
+    	default:
100 100
 
101
-        smart_xoops_cp_header();
102
-        $adminObject->displayNavigation(basename(__FILE__));
101
+        	smart_xoops_cp_header();
102
+        	$adminObject->displayNavigation(basename(__FILE__));
103 103
 
104
-        //smart_adminMenu(4, _AM_SOBJECT_RATINGS);
104
+        	//smart_adminMenu(4, _AM_SOBJECT_RATINGS);
105 105
 
106
-        smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC);
106
+        	smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC);
107 107
 
108
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
109
-        $objectTable = new XoopsModules\Smartobject\SmartObjectTable($smartobjectRatingHandler);
110
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('name', 'left'));
111
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('dirname', 'left'));
112
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('item', 'left', false, 'getItemValue'));
113
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('date', 'center', 150));
114
-        $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('rate', 'center', 40, 'getRateValue'));
108
+        	require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
109
+        	$objectTable = new XoopsModules\Smartobject\SmartObjectTable($smartobjectRatingHandler);
110
+        	$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('name', 'left'));
111
+        	$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('dirname', 'left'));
112
+        	$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('item', 'left', false, 'getItemValue'));
113
+        	$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('date', 'center', 150));
114
+        	$objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('rate', 'center', 40, 'getRateValue'));
115 115
 
116
-        //      $objectTable->addCustomAction('getCreateItemLink');
117
-        //      $objectTable->addCustomAction('getCreateAttributLink');
116
+        	//      $objectTable->addCustomAction('getCreateItemLink');
117
+        	//      $objectTable->addCustomAction('getCreateAttributLink');
118 118
 
119
-        $objectTable->addIntroButton('addrating', 'rating.php?op=mod', _AM_SOBJECT_RATINGS_CREATE);
120
-        /*
119
+        	$objectTable->addIntroButton('addrating', 'rating.php?op=mod', _AM_SOBJECT_RATINGS_CREATE);
120
+        	/*
121 121
                 $criteria_upcoming = new \CriteriaCompo();
122 122
                 $criteria_upcoming->add(new \Criteria('start_date', time(), '>'));
123 123
                 $objectTable->addFilter(_AM_SOBJECT_FILTER_UPCOMING, array(
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
                 ));
143 143
         */
144 144
 
145
-        $objectTable->render();
145
+        	$objectTable->render();
146 146
 
147
-        echo '<br>';
148
-        smart_close_collapsable('createdratings');
149
-        echo '<br>';
147
+        	echo '<br>';
148
+        	smart_close_collapsable('createdratings');
149
+        	echo '<br>';
150 150
 
151
-        break;
151
+        	break;
152 152
 }
153 153
 
154 154
 //smart_modFooter();
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
     }
56 56
 }
57 57
 
58
-require_once __DIR__ . '/admin_header.php';
59
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
60
-require_once SMARTOBJECT_ROOT_PATH . 'class/rating.php';
58
+require_once __DIR__.'/admin_header.php';
59
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
60
+require_once SMARTOBJECT_ROOT_PATH.'class/rating.php';
61 61
 $smartobjectRatingHandler = xoops_getModuleHandler('rating');
62 62
 $indexAdmin               = \Xmf\Module\Admin::getInstance();
63 63
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     case 'mod':
75 75
     case 'changedField':
76 76
 
77
-        $ratingid = isset($_GET['ratingid']) ? (int)$_GET['ratingid'] : 0;
77
+        $ratingid = isset($_GET['ratingid']) ? (int) $_GET['ratingid'] : 0;
78 78
 
79 79
         smart_xoops_cp_header();
80 80
         $adminObject->displayNavigation(basename(__FILE__));
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
         break;
84 84
 
85 85
     case 'addrating':
86
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
86
+        require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php';
87 87
         $controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
88
-        $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL . 'admin/rating.php');
88
+        $controller->storeFromDefaultForm(_AM_SOBJECT_RATINGS_CREATED, _AM_SOBJECT_RATINGS_MODIFIED, SMARTOBJECT_URL.'admin/rating.php');
89 89
 
90 90
         break;
91 91
 
92 92
     case 'del':
93
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
93
+        require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php';
94 94
         $controller = new XoopsModules\Smartobject\SmartObjectController($smartobjectRatingHandler);
95 95
         $controller->handleObjectDeletion();
96 96
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         smart_collapsableBar('createdratings', _AM_SOBJECT_RATINGS, _AM_SOBJECT_RATINGS_DSC);
107 107
 
108
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
108
+        require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
109 109
         $objectTable = new XoopsModules\Smartobject\SmartObjectTable($smartobjectRatingHandler);
110 110
         $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('name', 'left'));
111 111
         $objectTable->addColumn(new XoopsModules\Smartobject\SmartObjectColumn('dirname', 'left'));
@@ -153,4 +153,4 @@  discard block
 block discarded – undo
153 153
 
154 154
 //smart_modFooter();
155 155
 //xoops_cp_footer();
156
-require_once __DIR__ . '/admin_footer.php';
156
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
admin/about2.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
  * Licence: GNU
8 8
  */
9 9
 //
10
-require_once __DIR__ . '/admin_header.php';
10
+require_once __DIR__.'/admin_header.php';
11 11
 
12
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjectabout.php';
12
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjectabout.php';
13 13
 $aboutObj = new XoopsModules\Smartobject\SmartobjectAbout();
14 14
 $aboutObj->render();
Please login to merge, or discard this patch.
admin/currency.php 2 patches
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.
Switch Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -54,29 +54,29 @@  discard block
 block discarded – undo
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.
admin/tag.php 2 patches
Indentation   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -16,45 +16,45 @@  discard block
 block discarded – undo
16 16
 
17 17
 function edittag($tagid = 0, $language = false, $fct = false)
18 18
 {
19
-    global $smartobjectTagHandler;
20
-
21
-    $tagObj = $smartobjectTagHandler->get($tagid);
22
-
23
-    if ($tagObj->isNew()) {
24
-        $breadcrumb            = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_CREATE;
25
-        $title                 = _AM_SOBJECT_TAG_CREATE;
26
-        $info                  = _AM_SOBJECT_TAG_CREATE_INFO;
27
-        $collaps_name          = 'tagcreate';
28
-        $form_name             = _AM_SOBJECT_TAG_CREATE;
29
-        $submit_button_caption = null;
30
-    //$tagObj->stripMultilanguageFields();
31
-    } else {
32
-        if ($language) {
33
-            $breadcrumb            = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_EDITING_LANGUAGE;
34
-            $title                 = _AM_SOBJECT_TAG_EDIT_LANGUAGE;
35
-            $info                  = _AM_SOBJECT_TAG_EDIT_LANGUAGE_INFO;
36
-            $collaps_name          = 'tageditlanguage';
37
-            $form_name             = _AM_SOBJECT_TAG_EDIT_LANGUAGE;
38
-            $submit_button_caption = null;
39
-            $tagObj->makeNonMLFieldReadOnly();
40
-        } else {
41
-            $breadcrumb            = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_EDITING;
42
-            $title                 = _AM_SOBJECT_TAG_EDIT;
43
-            $info                  = _AM_SOBJECT_TAG_EDIT_INFO;
44
-            $collaps_name          = 'tagedit';
45
-            $form_name             = _AM_SOBJECT_TAG_EDIT;
46
-            $submit_button_caption = null;
47
-            $tagObj->stripMultilanguageFields();
48
-        }
49
-    }
50
-
51
-    //smart_adminMenu(2, $breadcrumb);
52
-
53
-    smart_collapsableBar($collaps_name, $title, $info);
54
-
55
-    $sform = $tagObj->getForm($form_name, 'addtag', false, $submit_button_caption);
56
-    $sform->display();
57
-    smart_close_collapsable($collaps_name);
19
+	global $smartobjectTagHandler;
20
+
21
+	$tagObj = $smartobjectTagHandler->get($tagid);
22
+
23
+	if ($tagObj->isNew()) {
24
+		$breadcrumb            = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_CREATE;
25
+		$title                 = _AM_SOBJECT_TAG_CREATE;
26
+		$info                  = _AM_SOBJECT_TAG_CREATE_INFO;
27
+		$collaps_name          = 'tagcreate';
28
+		$form_name             = _AM_SOBJECT_TAG_CREATE;
29
+		$submit_button_caption = null;
30
+	//$tagObj->stripMultilanguageFields();
31
+	} else {
32
+		if ($language) {
33
+			$breadcrumb            = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_EDITING_LANGUAGE;
34
+			$title                 = _AM_SOBJECT_TAG_EDIT_LANGUAGE;
35
+			$info                  = _AM_SOBJECT_TAG_EDIT_LANGUAGE_INFO;
36
+			$collaps_name          = 'tageditlanguage';
37
+			$form_name             = _AM_SOBJECT_TAG_EDIT_LANGUAGE;
38
+			$submit_button_caption = null;
39
+			$tagObj->makeNonMLFieldReadOnly();
40
+		} else {
41
+			$breadcrumb            = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_EDITING;
42
+			$title                 = _AM_SOBJECT_TAG_EDIT;
43
+			$info                  = _AM_SOBJECT_TAG_EDIT_INFO;
44
+			$collaps_name          = 'tagedit';
45
+			$form_name             = _AM_SOBJECT_TAG_EDIT;
46
+			$submit_button_caption = null;
47
+			$tagObj->stripMultilanguageFields();
48
+		}
49
+	}
50
+
51
+	//smart_adminMenu(2, $breadcrumb);
52
+
53
+	smart_collapsableBar($collaps_name, $title, $info);
54
+
55
+	$sform = $tagObj->getForm($form_name, 'addtag', false, $submit_button_caption);
56
+	$sform->display();
57
+	smart_close_collapsable($collaps_name);
58 58
 }
59 59
 
60 60
 require_once __DIR__ . '/admin_header.php';
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 $op = '';
67 67
 
68 68
 if (isset($_GET['op'])) {
69
-    $op = $_GET['op'];
69
+	$op = $_GET['op'];
70 70
 }
71 71
 if (isset($_POST['op'])) {
72
-    $op = $_POST['op'];
72
+	$op = $_POST['op'];
73 73
 }
74 74
 
75 75
 $tagid    = isset($_GET['tagid']) ? $_GET['tagid'] : 0;
@@ -78,65 +78,65 @@  discard block
 block discarded – undo
78 78
 
79 79
 switch ($op) {
80 80
 
81
-    case 'del':
82
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
83
-        $controller = new SmartObjectController($smartobjectTagHandler);
84
-        $controller->handleObjectDeletion(_AM_SOBJECT_TAG_DELETE_CONFIRM);
81
+	case 'del':
82
+		require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
83
+		$controller = new SmartObjectController($smartobjectTagHandler);
84
+		$controller->handleObjectDeletion(_AM_SOBJECT_TAG_DELETE_CONFIRM);
85 85
 
86
-        break;
86
+		break;
87 87
 
88
-    case 'addtag':
89
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
90
-        $controller = new SmartObjectController($smartobjectTagHandler);
91
-        $tagObj     = $controller->storeSmartObject();
92
-        if ($tagObj->hasError()) {
93
-            redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
94
-        }
88
+	case 'addtag':
89
+		require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
90
+		$controller = new SmartObjectController($smartobjectTagHandler);
91
+		$tagObj     = $controller->storeSmartObject();
92
+		if ($tagObj->hasError()) {
93
+			redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
94
+		}
95 95
 
96
-        if ($tagObj->hasError()) {
97
-            redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
98
-        } else {
99
-            redirect_header(smart_get_page_before_form(), 3, _CO_SOBJECT_SAVE_SUCCESS);
100
-        }
101
-        exit;
102
-        break;
96
+		if ($tagObj->hasError()) {
97
+			redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
98
+		} else {
99
+			redirect_header(smart_get_page_before_form(), 3, _CO_SOBJECT_SAVE_SUCCESS);
100
+		}
101
+		exit;
102
+		break;
103 103
 
104
-    case 'mod':
105
-        smart_xoops_cp_header();
106
-        edittag($tagid, $language, $fct);
107
-        break;
104
+	case 'mod':
105
+		smart_xoops_cp_header();
106
+		edittag($tagid, $language, $fct);
107
+		break;
108 108
 
109
-    default:
109
+	default:
110 110
 
111
-        smart_xoops_cp_header();
111
+		smart_xoops_cp_header();
112 112
 
113
-        //smart_adminMenu(2, _AM_SOBJECT_TAGS);
113
+		//smart_adminMenu(2, _AM_SOBJECT_TAGS);
114 114
 
115
-        smart_collapsableBar('tags', _AM_SOBJECT_TAGS, _AM_SOBJECT_TAGS_INFO);
115
+		smart_collapsableBar('tags', _AM_SOBJECT_TAGS, _AM_SOBJECT_TAGS_INFO);
116 116
 
117
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
118
-        $objectTable = new SmartObjectTable($smartobjectTagHandler, false, ['delete']);
119
-        $objectTable->addColumn(new SmartObjectColumn('name'));
120
-        $objectTable->addColumn(new SmartObjectColumn('language'));
121
-        $objectTable->addColumn(new SmartObjectColumn('value'));
122
-        //      $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_TAGS_FROM, $align='left', $width=false, 'getFromInfo'));
117
+		require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
118
+		$objectTable = new SmartObjectTable($smartobjectTagHandler, false, ['delete']);
119
+		$objectTable->addColumn(new SmartObjectColumn('name'));
120
+		$objectTable->addColumn(new SmartObjectColumn('language'));
121
+		$objectTable->addColumn(new SmartObjectColumn('value'));
122
+		//      $objectTable->addColumn(new SmartObjectColumn(_AM_SOBJECT_SENT_TAGS_FROM, $align='left', $width=false, 'getFromInfo'));
123 123
 
124
-        $objectTable->addFilter('language', 'getLanguages');
124
+		$objectTable->addFilter('language', 'getLanguages');
125 125
 
126
-        $objectTable->addCustomAction('getEditLanguageLink');
127
-        $objectTable->addCustomAction('getEditItemLink');
126
+		$objectTable->addCustomAction('getEditLanguageLink');
127
+		$objectTable->addCustomAction('getEditItemLink');
128 128
 
129
-        $objectTable->setDefaultSort('tagid');
129
+		$objectTable->setDefaultSort('tagid');
130 130
 
131
-        $objectTable->addIntroButton('addtag', 'tag.php?op=mod', _AM_SOBJECT_TAG_CREATE);
131
+		$objectTable->addIntroButton('addtag', 'tag.php?op=mod', _AM_SOBJECT_TAG_CREATE);
132 132
 
133
-        $objectTable->render();
133
+		$objectTable->render();
134 134
 
135
-        echo '<br>';
136
-        smart_close_collapsable('tags');
137
-        echo '<br>';
135
+		echo '<br>';
136
+		smart_close_collapsable('tags');
137
+		echo '<br>';
138 138
 
139
-        break;
139
+		break;
140 140
 }
141 141
 
142 142
 //smart_modFooter();
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     $tagObj = $smartobjectTagHandler->get($tagid);
22 22
 
23 23
     if ($tagObj->isNew()) {
24
-        $breadcrumb            = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_CREATE;
24
+        $breadcrumb            = _AM_SOBJECT_TAGS.' > '._AM_SOBJECT_TAG_CREATE;
25 25
         $title                 = _AM_SOBJECT_TAG_CREATE;
26 26
         $info                  = _AM_SOBJECT_TAG_CREATE_INFO;
27 27
         $collaps_name          = 'tagcreate';
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     //$tagObj->stripMultilanguageFields();
31 31
     } else {
32 32
         if ($language) {
33
-            $breadcrumb            = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_TAG_EDITING_LANGUAGE;
33
+            $breadcrumb            = _AM_SOBJECT_TAGS.' > '._AM_SOBJECT_TAG_EDITING_LANGUAGE;
34 34
             $title                 = _AM_SOBJECT_TAG_EDIT_LANGUAGE;
35 35
             $info                  = _AM_SOBJECT_TAG_EDIT_LANGUAGE_INFO;
36 36
             $collaps_name          = 'tageditlanguage';
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             $submit_button_caption = null;
39 39
             $tagObj->makeNonMLFieldReadOnly();
40 40
         } else {
41
-            $breadcrumb            = _AM_SOBJECT_TAGS . ' > ' . _AM_SOBJECT_EDITING;
41
+            $breadcrumb            = _AM_SOBJECT_TAGS.' > '._AM_SOBJECT_EDITING;
42 42
             $title                 = _AM_SOBJECT_TAG_EDIT;
43 43
             $info                  = _AM_SOBJECT_TAG_EDIT_INFO;
44 44
             $collaps_name          = 'tagedit';
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
     smart_close_collapsable($collaps_name);
58 58
 }
59 59
 
60
-require_once __DIR__ . '/admin_header.php';
61
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
62
-require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttag.php';
60
+require_once __DIR__.'/admin_header.php';
61
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
62
+require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttag.php';
63 63
 
64 64
 $smartobjectTagHandler = xoops_getModuleHandler('tag');
65 65
 
@@ -79,22 +79,22 @@  discard block
 block discarded – undo
79 79
 switch ($op) {
80 80
 
81 81
     case 'del':
82
-        require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php';
82
+        require_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobjectcontroller.php';
83 83
         $controller = new SmartObjectController($smartobjectTagHandler);
84 84
         $controller->handleObjectDeletion(_AM_SOBJECT_TAG_DELETE_CONFIRM);
85 85
 
86 86
         break;
87 87
 
88 88
     case 'addtag':
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($smartobjectTagHandler);
91 91
         $tagObj     = $controller->storeSmartObject();
92 92
         if ($tagObj->hasError()) {
93
-            redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
93
+            redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR.$tagObj->getHtmlErrors());
94 94
         }
95 95
 
96 96
         if ($tagObj->hasError()) {
97
-            redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR . $tagObj->getHtmlErrors());
97
+            redirect_header($smart_previous_page, 3, _CO_SOBJECT_SAVE_ERROR.$tagObj->getHtmlErrors());
98 98
         } else {
99 99
             redirect_header(smart_get_page_before_form(), 3, _CO_SOBJECT_SAVE_SUCCESS);
100 100
         }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         smart_collapsableBar('tags', _AM_SOBJECT_TAGS, _AM_SOBJECT_TAGS_INFO);
116 116
 
117
-        require_once SMARTOBJECT_ROOT_PATH . 'class/smartobjecttable.php';
117
+        require_once SMARTOBJECT_ROOT_PATH.'class/smartobjecttable.php';
118 118
         $objectTable = new SmartObjectTable($smartobjectTagHandler, false, ['delete']);
119 119
         $objectTable->addColumn(new SmartObjectColumn('name'));
120 120
         $objectTable->addColumn(new SmartObjectColumn('language'));
@@ -141,4 +141,4 @@  discard block
 block discarded – undo
141 141
 
142 142
 //smart_modFooter();
143 143
 //xoops_cp_footer();
144
-require_once __DIR__ . '/admin_footer.php';
144
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.