Passed
Push — master ( 834a16...1c3825 )
by Goffy
09:06 queued 04:27
created
testdata/mymodule2/admin/about.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
  * @min_xoops      2.5.9
20 20
  * @author         TDM XOOPS - Email:<[email protected]> - Website:<http://xoops.org>
21 21
  */
22
-require __DIR__ . '/header.php';
22
+require __DIR__.'/header.php';
23 23
 $templateMain = 'mymodule2_admin_about.tpl';
24 24
 $GLOBALS['xoopsTpl']->assign('navigation', $adminObject->displayNavigation('about.php'));
25 25
 $GLOBALS['xoopsTpl']->assign('about', $adminObject->renderAbout('6KJ7RW5DR3VTJ', false));
26
-require __DIR__ . '/footer.php';
26
+require __DIR__.'/footer.php';
Please login to merge, or discard this patch.
testdata/mymodule2/admin/permissions.php 2 patches
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -48,85 +48,85 @@
 block discarded – undo
48 48
 $permTableForm->addElement($formSelect);
49 49
 $permTableForm->display();
50 50
 switch($op) {
51
-	case 'global':
52
-	default:
53
-		$formTitle = _AM_MYMODULE2_PERMISSIONS_GLOBAL;
54
-		$permName = 'mymodule2_ac';
55
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_GLOBAL_DESC;
56
-		$globalPerms = array( '4' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_4, '8' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_8, '16' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_16 );
57
-	break;
58
-	case 'approve_articles':
59
-		$formTitle = _AM_MYMODULE2_PERMISSIONS_APPROVE;
60
-		$permName = 'mymodule2_approve_articles';
61
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_APPROVE_DESC . ' Articles';
62
-		$handler = $helper->getHandler('articles');
63
-	break;
64
-	case 'submit_articles':
65
-		$formTitle = _AM_MYMODULE2_PERMISSIONS_SUBMIT;
66
-		$permName = 'mymodule2_submit_articles';
67
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_SUBMIT_DESC . ' Articles';
68
-		$handler = $helper->getHandler('articles');
69
-	break;
70
-	case 'view_articles':
71
-		$formTitle = _AM_MYMODULE2_PERMISSIONS_VIEW;
72
-		$permName = 'mymodule2_view_articles';
73
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_VIEW_DESC . ' Articles';
74
-		$handler = $helper->getHandler('articles');
75
-	break;
76
-	case 'approve_testfields':
77
-		$formTitle = _AM_MYMODULE2_PERMISSIONS_APPROVE;
78
-		$permName = 'mymodule2_approve_testfields';
79
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_APPROVE_DESC . ' Testfields';
80
-		$handler = $helper->getHandler('testfields');
81
-	break;
82
-	case 'submit_testfields':
83
-		$formTitle = _AM_MYMODULE2_PERMISSIONS_SUBMIT;
84
-		$permName = 'mymodule2_submit_testfields';
85
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_SUBMIT_DESC . ' Testfields';
86
-		$handler = $helper->getHandler('testfields');
87
-	break;
88
-	case 'view_testfields':
89
-		$formTitle = _AM_MYMODULE2_PERMISSIONS_VIEW;
90
-		$permName = 'mymodule2_view_testfields';
91
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_VIEW_DESC . ' Testfields';
92
-		$handler = $helper->getHandler('testfields');
93
-	break;
51
+    case 'global':
52
+    default:
53
+        $formTitle = _AM_MYMODULE2_PERMISSIONS_GLOBAL;
54
+        $permName = 'mymodule2_ac';
55
+        $permDesc = _AM_MYMODULE2_PERMISSIONS_GLOBAL_DESC;
56
+        $globalPerms = array( '4' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_4, '8' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_8, '16' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_16 );
57
+    break;
58
+    case 'approve_articles':
59
+        $formTitle = _AM_MYMODULE2_PERMISSIONS_APPROVE;
60
+        $permName = 'mymodule2_approve_articles';
61
+        $permDesc = _AM_MYMODULE2_PERMISSIONS_APPROVE_DESC . ' Articles';
62
+        $handler = $helper->getHandler('articles');
63
+    break;
64
+    case 'submit_articles':
65
+        $formTitle = _AM_MYMODULE2_PERMISSIONS_SUBMIT;
66
+        $permName = 'mymodule2_submit_articles';
67
+        $permDesc = _AM_MYMODULE2_PERMISSIONS_SUBMIT_DESC . ' Articles';
68
+        $handler = $helper->getHandler('articles');
69
+    break;
70
+    case 'view_articles':
71
+        $formTitle = _AM_MYMODULE2_PERMISSIONS_VIEW;
72
+        $permName = 'mymodule2_view_articles';
73
+        $permDesc = _AM_MYMODULE2_PERMISSIONS_VIEW_DESC . ' Articles';
74
+        $handler = $helper->getHandler('articles');
75
+    break;
76
+    case 'approve_testfields':
77
+        $formTitle = _AM_MYMODULE2_PERMISSIONS_APPROVE;
78
+        $permName = 'mymodule2_approve_testfields';
79
+        $permDesc = _AM_MYMODULE2_PERMISSIONS_APPROVE_DESC . ' Testfields';
80
+        $handler = $helper->getHandler('testfields');
81
+    break;
82
+    case 'submit_testfields':
83
+        $formTitle = _AM_MYMODULE2_PERMISSIONS_SUBMIT;
84
+        $permName = 'mymodule2_submit_testfields';
85
+        $permDesc = _AM_MYMODULE2_PERMISSIONS_SUBMIT_DESC . ' Testfields';
86
+        $handler = $helper->getHandler('testfields');
87
+    break;
88
+    case 'view_testfields':
89
+        $formTitle = _AM_MYMODULE2_PERMISSIONS_VIEW;
90
+        $permName = 'mymodule2_view_testfields';
91
+        $permDesc = _AM_MYMODULE2_PERMISSIONS_VIEW_DESC . ' Testfields';
92
+        $handler = $helper->getHandler('testfields');
93
+    break;
94 94
 }
95 95
 $moduleId = $xoopsModule->getVar('mid');
96 96
 $permform = new \XoopsGroupPermForm($formTitle, $moduleId, $permName, $permDesc, 'admin/permissions.php');
97 97
 $permFound = false;
98 98
 if ($op === 'global') {
99
-	foreach($globalPerms as $gPermId => $gPermName) {
100
-		$permform->addItem($gPermId, $gPermName);
101
-	}
102
-	$GLOBALS['xoopsTpl']->assign('form', $permform->render());
103
-	$permFound = true;
99
+    foreach($globalPerms as $gPermId => $gPermName) {
100
+        $permform->addItem($gPermId, $gPermName);
101
+    }
102
+    $GLOBALS['xoopsTpl']->assign('form', $permform->render());
103
+    $permFound = true;
104 104
 }
105 105
 if ($op === 'approve_articles' || $op === 'submit_articles' || $op === 'view_articles') {
106
-	$articlesCount = $articlesHandler->getCountArticles();
107
-	if ($articlesCount > 0) {
108
-		$articlesAll = $articlesHandler->getAllArticles(0, 'art_title');
109
-		foreach(array_keys($articlesAll) as $i) {
110
-			$permform->addItem($articlesAll[$i]->getVar('art_id'), $articlesAll[$i]->getVar('art_title'));
111
-		}
112
-		$GLOBALS['xoopsTpl']->assign('form', $permform->render());
113
-	}
114
-	$permFound = true;
106
+    $articlesCount = $articlesHandler->getCountArticles();
107
+    if ($articlesCount > 0) {
108
+        $articlesAll = $articlesHandler->getAllArticles(0, 'art_title');
109
+        foreach(array_keys($articlesAll) as $i) {
110
+            $permform->addItem($articlesAll[$i]->getVar('art_id'), $articlesAll[$i]->getVar('art_title'));
111
+        }
112
+        $GLOBALS['xoopsTpl']->assign('form', $permform->render());
113
+    }
114
+    $permFound = true;
115 115
 }
116 116
 if ($op === 'approve_testfields' || $op === 'submit_testfields' || $op === 'view_testfields') {
117
-	$testfieldsCount = $testfieldsHandler->getCountTestfields();
118
-	if ($testfieldsCount > 0) {
119
-		$testfieldsAll = $testfieldsHandler->getAllTestfields(0, 'tf_text');
120
-		foreach(array_keys($testfieldsAll) as $i) {
121
-			$permform->addItem($testfieldsAll[$i]->getVar('tf_id'), $testfieldsAll[$i]->getVar('tf_text'));
122
-		}
123
-		$GLOBALS['xoopsTpl']->assign('form', $permform->render());
124
-	}
125
-	$permFound = true;
117
+    $testfieldsCount = $testfieldsHandler->getCountTestfields();
118
+    if ($testfieldsCount > 0) {
119
+        $testfieldsAll = $testfieldsHandler->getAllTestfields(0, 'tf_text');
120
+        foreach(array_keys($testfieldsAll) as $i) {
121
+            $permform->addItem($testfieldsAll[$i]->getVar('tf_id'), $testfieldsAll[$i]->getVar('tf_text'));
122
+        }
123
+        $GLOBALS['xoopsTpl']->assign('form', $permform->render());
124
+    }
125
+    $permFound = true;
126 126
 }
127 127
 unset($permform);
128 128
 if ($permFound !== true) {
129
-	redirect_header('permissions.php', 3, _AM_MYMODULE2_NO_PERMISSIONS_SET);
130
-	exit();
129
+    redirect_header('permissions.php', 3, _AM_MYMODULE2_NO_PERMISSIONS_SET);
130
+    exit();
131 131
 }
132 132
 require __DIR__ . '/footer.php';
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 use XoopsModules\Mymodule2;
25 25
 use XoopsModules\Mymodule2\Constants;
26 26
 
27
-require __DIR__ . '/header.php';
27
+require __DIR__.'/header.php';
28 28
 
29 29
 // Template Index
30 30
 $templateMain = 'mymodule2_admin_permissions.tpl';
@@ -33,62 +33,62 @@  discard block
 block discarded – undo
33 33
 $op = Request::getString('op', 'global');
34 34
 
35 35
 // Get Form
36
-include_once XOOPS_ROOT_PATH . '/class/xoopsform/grouppermform.php';
36
+include_once XOOPS_ROOT_PATH.'/class/xoopsform/grouppermform.php';
37 37
 xoops_load('XoopsFormLoader');
38 38
 $permTableForm = new \XoopsSimpleForm('', 'fselperm', 'permissions.php', 'post');
39 39
 $formSelect = new \XoopsFormSelect('', 'op', $op);
40 40
 $formSelect->setExtra('onchange="document.fselperm.submit()"');
41 41
 $formSelect->addOption('global', _AM_MYMODULE2_PERMISSIONS_GLOBAL);
42
-$formSelect->addOption('approve_articles', _AM_MYMODULE2_PERMISSIONS_APPROVE . ' Articles');
43
-$formSelect->addOption('submit_articles', _AM_MYMODULE2_PERMISSIONS_SUBMIT . ' Articles');
44
-$formSelect->addOption('view_articles', _AM_MYMODULE2_PERMISSIONS_VIEW . ' Articles');
45
-$formSelect->addOption('approve_testfields', _AM_MYMODULE2_PERMISSIONS_APPROVE . ' Testfields');
46
-$formSelect->addOption('submit_testfields', _AM_MYMODULE2_PERMISSIONS_SUBMIT . ' Testfields');
47
-$formSelect->addOption('view_testfields', _AM_MYMODULE2_PERMISSIONS_VIEW . ' Testfields');
42
+$formSelect->addOption('approve_articles', _AM_MYMODULE2_PERMISSIONS_APPROVE.' Articles');
43
+$formSelect->addOption('submit_articles', _AM_MYMODULE2_PERMISSIONS_SUBMIT.' Articles');
44
+$formSelect->addOption('view_articles', _AM_MYMODULE2_PERMISSIONS_VIEW.' Articles');
45
+$formSelect->addOption('approve_testfields', _AM_MYMODULE2_PERMISSIONS_APPROVE.' Testfields');
46
+$formSelect->addOption('submit_testfields', _AM_MYMODULE2_PERMISSIONS_SUBMIT.' Testfields');
47
+$formSelect->addOption('view_testfields', _AM_MYMODULE2_PERMISSIONS_VIEW.' Testfields');
48 48
 $permTableForm->addElement($formSelect);
49 49
 $permTableForm->display();
50
-switch($op) {
50
+switch ($op) {
51 51
 	case 'global':
52 52
 	default:
53 53
 		$formTitle = _AM_MYMODULE2_PERMISSIONS_GLOBAL;
54 54
 		$permName = 'mymodule2_ac';
55 55
 		$permDesc = _AM_MYMODULE2_PERMISSIONS_GLOBAL_DESC;
56
-		$globalPerms = array( '4' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_4, '8' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_8, '16' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_16 );
56
+		$globalPerms = array('4' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_4, '8' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_8, '16' => _AM_MYMODULE2_PERMISSIONS_GLOBAL_16);
57 57
 	break;
58 58
 	case 'approve_articles':
59 59
 		$formTitle = _AM_MYMODULE2_PERMISSIONS_APPROVE;
60 60
 		$permName = 'mymodule2_approve_articles';
61
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_APPROVE_DESC . ' Articles';
61
+		$permDesc = _AM_MYMODULE2_PERMISSIONS_APPROVE_DESC.' Articles';
62 62
 		$handler = $helper->getHandler('articles');
63 63
 	break;
64 64
 	case 'submit_articles':
65 65
 		$formTitle = _AM_MYMODULE2_PERMISSIONS_SUBMIT;
66 66
 		$permName = 'mymodule2_submit_articles';
67
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_SUBMIT_DESC . ' Articles';
67
+		$permDesc = _AM_MYMODULE2_PERMISSIONS_SUBMIT_DESC.' Articles';
68 68
 		$handler = $helper->getHandler('articles');
69 69
 	break;
70 70
 	case 'view_articles':
71 71
 		$formTitle = _AM_MYMODULE2_PERMISSIONS_VIEW;
72 72
 		$permName = 'mymodule2_view_articles';
73
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_VIEW_DESC . ' Articles';
73
+		$permDesc = _AM_MYMODULE2_PERMISSIONS_VIEW_DESC.' Articles';
74 74
 		$handler = $helper->getHandler('articles');
75 75
 	break;
76 76
 	case 'approve_testfields':
77 77
 		$formTitle = _AM_MYMODULE2_PERMISSIONS_APPROVE;
78 78
 		$permName = 'mymodule2_approve_testfields';
79
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_APPROVE_DESC . ' Testfields';
79
+		$permDesc = _AM_MYMODULE2_PERMISSIONS_APPROVE_DESC.' Testfields';
80 80
 		$handler = $helper->getHandler('testfields');
81 81
 	break;
82 82
 	case 'submit_testfields':
83 83
 		$formTitle = _AM_MYMODULE2_PERMISSIONS_SUBMIT;
84 84
 		$permName = 'mymodule2_submit_testfields';
85
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_SUBMIT_DESC . ' Testfields';
85
+		$permDesc = _AM_MYMODULE2_PERMISSIONS_SUBMIT_DESC.' Testfields';
86 86
 		$handler = $helper->getHandler('testfields');
87 87
 	break;
88 88
 	case 'view_testfields':
89 89
 		$formTitle = _AM_MYMODULE2_PERMISSIONS_VIEW;
90 90
 		$permName = 'mymodule2_view_testfields';
91
-		$permDesc = _AM_MYMODULE2_PERMISSIONS_VIEW_DESC . ' Testfields';
91
+		$permDesc = _AM_MYMODULE2_PERMISSIONS_VIEW_DESC.' Testfields';
92 92
 		$handler = $helper->getHandler('testfields');
93 93
 	break;
94 94
 }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 $permform = new \XoopsGroupPermForm($formTitle, $moduleId, $permName, $permDesc, 'admin/permissions.php');
97 97
 $permFound = false;
98 98
 if ($op === 'global') {
99
-	foreach($globalPerms as $gPermId => $gPermName) {
99
+	foreach ($globalPerms as $gPermId => $gPermName) {
100 100
 		$permform->addItem($gPermId, $gPermName);
101 101
 	}
102 102
 	$GLOBALS['xoopsTpl']->assign('form', $permform->render());
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	$articlesCount = $articlesHandler->getCountArticles();
107 107
 	if ($articlesCount > 0) {
108 108
 		$articlesAll = $articlesHandler->getAllArticles(0, 'art_title');
109
-		foreach(array_keys($articlesAll) as $i) {
109
+		foreach (array_keys($articlesAll) as $i) {
110 110
 			$permform->addItem($articlesAll[$i]->getVar('art_id'), $articlesAll[$i]->getVar('art_title'));
111 111
 		}
112 112
 		$GLOBALS['xoopsTpl']->assign('form', $permform->render());
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	$testfieldsCount = $testfieldsHandler->getCountTestfields();
118 118
 	if ($testfieldsCount > 0) {
119 119
 		$testfieldsAll = $testfieldsHandler->getAllTestfields(0, 'tf_text');
120
-		foreach(array_keys($testfieldsAll) as $i) {
120
+		foreach (array_keys($testfieldsAll) as $i) {
121 121
 			$permform->addItem($testfieldsAll[$i]->getVar('tf_id'), $testfieldsAll[$i]->getVar('tf_text'));
122 122
 		}
123 123
 		$GLOBALS['xoopsTpl']->assign('form', $permform->render());
@@ -129,4 +129,4 @@  discard block
 block discarded – undo
129 129
 	redirect_header('permissions.php', 3, _AM_MYMODULE2_NO_PERMISSIONS_SET);
130 130
 	exit();
131 131
 }
132
-require __DIR__ . '/footer.php';
132
+require __DIR__.'/footer.php';
Please login to merge, or discard this patch.
testdata/mymodule2/admin/footer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
  * @author         TDM XOOPS - Email:<[email protected]> - Website:<http://xoops.org>
21 21
  */
22 22
 if (isset($templateMain)) {
23
-	$GLOBALS['xoopsTpl']->assign('maintainedby', $helper->getConfig('maintainedby'));
24
-	$GLOBALS['xoopsTpl']->display("db:{$templateMain}");
23
+    $GLOBALS['xoopsTpl']->assign('maintainedby', $helper->getConfig('maintainedby'));
24
+    $GLOBALS['xoopsTpl']->display("db:{$templateMain}");
25 25
 }
26 26
 
27 27
 xoops_cp_footer();
Please login to merge, or discard this patch.
testdata/mymodule2/admin/header.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 $myts = MyTextSanitizer::getInstance();
37 37
 // 
38 38
 if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
39
-	include_once XOOPS_ROOT_PATH . '/class/template.php';
40
-	$xoopsTpl = new \XoopsTpl();
39
+    include_once XOOPS_ROOT_PATH . '/class/template.php';
40
+    $xoopsTpl = new \XoopsTpl();
41 41
 }
42 42
 
43 43
 // Load languages
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 
47 47
 // Local admin menu class
48 48
 if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))) {
49
-	include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
49
+    include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
50 50
 } else {
51
-	redirect_header('../../../admin.php', 5, _AM_MODULEADMIN_MISSING);
51
+    redirect_header('../../../admin.php', 5, _AM_MODULEADMIN_MISSING);
52 52
 }
53 53
 
54 54
 xoops_cp_header();
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
  * @min_xoops      2.5.9
20 20
  * @author         TDM XOOPS - Email:<[email protected]> - Website:<http://xoops.org>
21 21
  */
22
-include dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
23
-include_once dirname(__DIR__) . '/include/common.php';
22
+include dirname(dirname(dirname(__DIR__))).'/include/cp_header.php';
23
+include_once dirname(__DIR__).'/include/common.php';
24 24
 
25
-$sysPathIcon16   = '../' . $GLOBALS['xoopsModule']->getInfo('sysicons16');
26
-$sysPathIcon32   = '../' . $GLOBALS['xoopsModule']->getInfo('sysicons32');
25
+$sysPathIcon16   = '../'.$GLOBALS['xoopsModule']->getInfo('sysicons16');
26
+$sysPathIcon32   = '../'.$GLOBALS['xoopsModule']->getInfo('sysicons32');
27 27
 $pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
28
-$modPathIcon16   = MYMODULE2_URL . '/' . $GLOBALS['xoopsModule']->getInfo('modicons16') . '/';
29
-$modPathIcon32   = MYMODULE2_URL . '/' . $GLOBALS['xoopsModule']->getInfo('modicons32') . '/';
28
+$modPathIcon16   = MYMODULE2_URL.'/'.$GLOBALS['xoopsModule']->getInfo('modicons16').'/';
29
+$modPathIcon32   = MYMODULE2_URL.'/'.$GLOBALS['xoopsModule']->getInfo('modicons32').'/';
30 30
 
31 31
 // Get instance of module
32 32
 $helper = \XoopsModules\Mymodule2\Helper::getInstance();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 $myts = MyTextSanitizer::getInstance();
37 37
 // 
38 38
 if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
39
-	include_once XOOPS_ROOT_PATH . '/class/template.php';
39
+	include_once XOOPS_ROOT_PATH.'/class/template.php';
40 40
 	$xoopsTpl = new \XoopsTpl();
41 41
 }
42 42
 
@@ -60,4 +60,4 @@  discard block
 block discarded – undo
60 60
 $GLOBALS['xoopsTpl']->assign('modPathIcon32', $modPathIcon32);
61 61
 
62 62
 $adminObject = \Xmf\Module\Admin::getInstance();
63
-$style = MYMODULE2_URL . '/assets/css/admin/style.css';
63
+$style = MYMODULE2_URL.'/assets/css/admin/style.css';
Please login to merge, or discard this patch.
testdata/mymodule2/include/functions.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
     if(is_array($permissions) && array_key_exists($permtype, $permissions)) {
55 55
         return $permissions[$permtype];
56 56
     }
57
-	$moduleHandler = xoops_getHandler('module');
58
-	$mymodule2Module = $moduleHandler->getByDirname($dirname);
59
-	$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
60
-	$grouppermHandler = xoops_getHandler('groupperm');
61
-	$testfields = $grouppermHandler->getItemIds($permtype, $groups, $mymodule2Module->getVar('mid'));
57
+    $moduleHandler = xoops_getHandler('module');
58
+    $mymodule2Module = $moduleHandler->getByDirname($dirname);
59
+    $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
60
+    $grouppermHandler = xoops_getHandler('groupperm');
61
+    $testfields = $grouppermHandler->getItemIds($permtype, $groups, $mymodule2Module->getVar('mid'));
62 62
     return $testfields;
63 63
 }
64 64
 
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
         case 'none':
162 162
             if($topic_name) {
163
-                 $topic_name = 'topic=' . $topic_name . '&amp;';
163
+                    $topic_name = 'topic=' . $topic_name . '&amp;';
164 164
             }
165 165
             $rewrite_base = '/modules/';
166 166
             $page = 'page=' . $array['content_alias'];
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
             return XOOPS_URL . $rewrite_base . $module_name . $type . $topic_name  . $id . $page . $rewrite_ext;
191 191
             break;
192 192
 
193
-         case 'short':
193
+            case 'short':
194 194
             if($topic_name) {
195 195
                 $topic_name .= '/';
196 196
             }
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
  * @return string
29 29
  */
30 30
 function mymodule2_block_addCatSelect($cats) {
31
-    if(is_array($cats))
31
+    if (is_array($cats))
32 32
     {
33 33
         $cat_sql = '('.current($cats);
34 34
         array_shift($cats);
35
-        foreach($cats as $cat)
35
+        foreach ($cats as $cat)
36 36
         {
37 37
             $cat_sql .= ','.$cat;
38 38
         }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 {
52 52
     global $xoopsUser;
53 53
     static $permissions = array();
54
-    if(is_array($permissions) && array_key_exists($permtype, $permissions)) {
54
+    if (is_array($permissions) && array_key_exists($permtype, $permissions)) {
55 55
         return $permissions[$permtype];
56 56
     }
57 57
 	$moduleHandler = xoops_getHandler('module');
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
 function mymodule2NumbersOfEntries($mytree, $testfields, $entries, $cid)
74 74
 {
75 75
     $count = 0;
76
-    if(in_array($cid, $testfields)) {
76
+    if (in_array($cid, $testfields)) {
77 77
         $child = $mytree->getAllChild($cid);
78 78
         foreach (array_keys($entries) as $i) {
79
-            if ($entries[$i]->getVar('tf_id') == $cid){
79
+            if ($entries[$i]->getVar('tf_id') == $cid) {
80 80
                 $count++;
81 81
             }
82 82
             foreach (array_keys($child) as $j) {
83
-                if ($entries[$i]->getVar('tf_id') == $j){
83
+                if ($entries[$i]->getVar('tf_id') == $j) {
84 84
                     $count++;
85 85
                 }
86 86
             }
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 {
100 100
     global $xoopsTpl, $xoTheme;
101 101
     $myts = MyTextSanitizer::getInstance();
102
-    $content= $myts->undoHtmlSpecialChars($myts->displayTarea($content));
103
-    if(isset($xoTheme) && is_object($xoTheme)) {
104
-        $xoTheme->addMeta( 'meta', 'keywords', strip_tags($content));
102
+    $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content));
103
+    if (isset($xoTheme) && is_object($xoTheme)) {
104
+        $xoTheme->addMeta('meta', 'keywords', strip_tags($content));
105 105
     } else {    // Compatibility for old Xoops versions
106 106
         $xoopsTpl->assign('xoops_meta_keywords', strip_tags($content));
107 107
     }
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
     global $xoopsTpl, $xoTheme;
119 119
     $myts = MyTextSanitizer::getInstance();
120 120
     $content = $myts->undoHtmlSpecialChars($myts->displayTarea($content));
121
-    if(isset($xoTheme) && is_object($xoTheme)) {
122
-        $xoTheme->addMeta( 'meta', 'description', strip_tags($content));
121
+    if (isset($xoTheme) && is_object($xoTheme)) {
122
+        $xoTheme->addMeta('meta', 'description', strip_tags($content));
123 123
     } else {    // Compatibility for old Xoops versions
124 124
         $xoopsTpl->assign('xoops_meta_description', strip_tags($content));
125 125
     }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     if ($lenght_id != 0) {
145 145
         $id = $array['content_id'];
146 146
         while (strlen($id) < $lenght_id) {
147
-            $id = '0' . $id;
147
+            $id = '0'.$id;
148 148
         }
149 149
     } else {
150 150
         $id = $array['content_id'];
@@ -159,23 +159,23 @@  discard block
 block discarded – undo
159 159
     switch ($rewrite_url) {
160 160
 
161 161
         case 'none':
162
-            if($topic_name) {
163
-                 $topic_name = 'topic=' . $topic_name . '&amp;';
162
+            if ($topic_name) {
163
+                 $topic_name = 'topic='.$topic_name.'&amp;';
164 164
             }
165 165
             $rewrite_base = '/modules/';
166
-            $page = 'page=' . $array['content_alias'];
167
-            return XOOPS_URL . $rewrite_base . $module . '/' . $type . '.php?' . $topic_name . 'id=' . $id . '&amp;' . $page . $comment;
166
+            $page = 'page='.$array['content_alias'];
167
+            return XOOPS_URL.$rewrite_base.$module.'/'.$type.'.php?'.$topic_name.'id='.$id.'&amp;'.$page.$comment;
168 168
             break;
169 169
 
170 170
         case 'rewrite':
171
-            if($topic_name) {
171
+            if ($topic_name) {
172 172
                 $topic_name .= '/';
173 173
             }
174 174
             $rewrite_base = xoops_getModuleOption('rewrite_mode', $module);
175 175
             $rewrite_ext = xoops_getModuleOption('rewrite_ext', $module);
176 176
             $module_name = '';
177
-            if(xoops_getModuleOption('rewrite_name', $module)) {
178
-                $module_name = xoops_getModuleOption('rewrite_name', $module) . '/';
177
+            if (xoops_getModuleOption('rewrite_name', $module)) {
178
+                $module_name = xoops_getModuleOption('rewrite_name', $module).'/';
179 179
             }
180 180
             $page = $array['content_alias'];
181 181
             $type .= '/';
@@ -184,21 +184,21 @@  discard block
 block discarded – undo
184 184
                 $type = '';
185 185
             }
186 186
             if ($type === 'comment-edit/' || $type === 'comment-reply/' || $type === 'comment-delete/') {
187
-                return XOOPS_URL . $rewrite_base . $module_name . $type . $id . '/';
187
+                return XOOPS_URL.$rewrite_base.$module_name.$type.$id.'/';
188 188
             }
189 189
 
190
-            return XOOPS_URL . $rewrite_base . $module_name . $type . $topic_name  . $id . $page . $rewrite_ext;
190
+            return XOOPS_URL.$rewrite_base.$module_name.$type.$topic_name.$id.$page.$rewrite_ext;
191 191
             break;
192 192
 
193 193
          case 'short':
194
-            if($topic_name) {
194
+            if ($topic_name) {
195 195
                 $topic_name .= '/';
196 196
             }
197 197
             $rewrite_base = xoops_getModuleOption('rewrite_mode', $module);
198 198
             $rewrite_ext = xoops_getModuleOption('rewrite_ext', $module);
199 199
             $module_name = '';
200
-            if(xoops_getModuleOption('rewrite_name', $module)) {
201
-                $module_name = xoops_getModuleOption('rewrite_name', $module) . '/';
200
+            if (xoops_getModuleOption('rewrite_name', $module)) {
201
+                $module_name = xoops_getModuleOption('rewrite_name', $module).'/';
202 202
             }
203 203
             $page = $array['content_alias'];
204 204
             $type .= '/';
@@ -206,10 +206,10 @@  discard block
 block discarded – undo
206 206
                 $type = '';
207 207
             }
208 208
             if ($type === 'comment-edit/' || $type === 'comment-reply/' || $type === 'comment-delete/') {
209
-                return XOOPS_URL . $rewrite_base . $module_name . $type . $id . '/';
209
+                return XOOPS_URL.$rewrite_base.$module_name.$type.$id.'/';
210 210
             }
211 211
 
212
-            return XOOPS_URL . $rewrite_base . $module_name . $type . $topic_name . $page . $rewrite_ext;
212
+            return XOOPS_URL.$rewrite_base.$module_name.$type.$topic_name.$page.$rewrite_ext;
213 213
             break;
214 214
     }
215 215
     return null;
Please login to merge, or discard this patch.
testdata/mymodule2/include/notifications.inc.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
             $result = $xoopsDB->query($sql); // TODO: error check
64 64
             $result_array = $xoopsDB->fetchArray($result);
65 65
             $item['name'] = $result_array['tf_text'];
66
-			$item['url'] = MYMODULE2_URL . '/single.php?cid=' . $result_array['cid'] . '&amp;tf_id=' . $item_id;
67
-			return $item;
66
+            $item['url'] = MYMODULE2_URL . '/single.php?cid=' . $result_array['cid'] . '&amp;tf_id=' . $item_id;
67
+            return $item;
68 68
         break;
69 69
     }
70 70
     return null;
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
         $moduleHandler = xoops_getHandler('module');
37 37
         $module = $moduleHandler->getByDirname('mymodule2');
38 38
         $configHandler = xoops_getHandler('config');
39
-        $config =& $configHandler->getConfigsByCat(0, $module->getVar('mid'));
39
+        $config = & $configHandler->getConfigsByCat(0, $module->getVar('mid'));
40 40
     } else {
41 41
         $module = $xoopsModule;
42 42
         $config = $xoopsModuleConfig;
43 43
     }
44 44
     //
45
-    switch($category) {
45
+    switch ($category) {
46 46
         case 'global':
47 47
             $item['name'] = '';
48 48
             $item['url'] = '';
@@ -50,20 +50,20 @@  discard block
 block discarded – undo
50 50
         break;
51 51
         case 'category':
52 52
             // Assume we have a valid category id
53
-            $sql = 'SELECT tf_text FROM ' . $xoopsDB->prefix('mymodule2_testfields') . ' WHERE tf_id = '. $item_id;
53
+            $sql = 'SELECT tf_text FROM '.$xoopsDB->prefix('mymodule2_testfields').' WHERE tf_id = '.$item_id;
54 54
             $result = $xoopsDB->query($sql); // TODO: error check
55 55
             $result_array = $xoopsDB->fetchArray($result);
56 56
             $item['name'] = $result_array['tf_text'];
57
-            $item['url'] = MYMODULE2_URL . '/testfields.php?tf_id=' . $item_id;
57
+            $item['url'] = MYMODULE2_URL.'/testfields.php?tf_id='.$item_id;
58 58
             return $item;
59 59
         break;
60 60
         case 'testfield':
61 61
             // Assume we have a valid link id
62
-            $sql = 'SELECT tf_id, tf_text FROM '.$xoopsDB->prefix('mymodule2_testfields') . ' WHERE tf_id = ' . $item_id;
62
+            $sql = 'SELECT tf_id, tf_text FROM '.$xoopsDB->prefix('mymodule2_testfields').' WHERE tf_id = '.$item_id;
63 63
             $result = $xoopsDB->query($sql); // TODO: error check
64 64
             $result_array = $xoopsDB->fetchArray($result);
65 65
             $item['name'] = $result_array['tf_text'];
66
-			$item['url'] = MYMODULE2_URL . '/single.php?cid=' . $result_array['cid'] . '&amp;tf_id=' . $item_id;
66
+			$item['url'] = MYMODULE2_URL.'/single.php?cid='.$result_array['cid'].'&amp;tf_id='.$item_id;
67 67
 			return $item;
68 68
         break;
69 69
     }
Please login to merge, or discard this patch.
testdata/mymodule2/include/comment_new.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
  * @min_xoops      2.5.9
20 20
  * @author         TDM XOOPS - Email:<[email protected]> - Website:<http://xoops.org>
21 21
  */
22
-include __DIR__ . '/../../../mainfile.php';
22
+include __DIR__.'/../../../mainfile.php';
23 23
 include_once XOOPS_ROOT_PATH.'/modules/mymodule2/class/testfields.php';
24 24
 $com_itemid = isset($_REQUEST['com_itemid']) ? (int)$_REQUEST['com_itemid'] : 0;
25 25
 if ($com_itemid > 0) {
Please login to merge, or discard this patch.
testdata/mymodule2/include/common.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
  * @author         TDM XOOPS - Email:<[email protected]> - Website:<http://xoops.org>
21 21
  */
22 22
 if (!defined('XOOPS_ICONS32_PATH')) {
23
-    define('XOOPS_ICONS32_PATH', XOOPS_ROOT_PATH . '/Frameworks/moduleclasses/icons/32');
23
+    define('XOOPS_ICONS32_PATH', XOOPS_ROOT_PATH.'/Frameworks/moduleclasses/icons/32');
24 24
 }
25 25
 if (!defined('XOOPS_ICONS32_URL')) {
26
-    define('XOOPS_ICONS32_URL', XOOPS_URL . '/Frameworks/moduleclasses/icons/32');
26
+    define('XOOPS_ICONS32_URL', XOOPS_URL.'/Frameworks/moduleclasses/icons/32');
27 27
 }
28 28
 define('MYMODULE2_DIRNAME', 'mymodule2');
29 29
 define('MYMODULE2_PATH', XOOPS_ROOT_PATH.'/modules/'.MYMODULE2_DIRNAME);
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
 define('MYMODULE2_UPLOAD_IMAGE_URL', MYMODULE2_UPLOAD_URL.'/images');
41 41
 define('MYMODULE2_UPLOAD_SHOTS_PATH', MYMODULE2_UPLOAD_PATH.'/images/shots');
42 42
 define('MYMODULE2_UPLOAD_SHOTS_URL', MYMODULE2_UPLOAD_URL.'/images/shots');
43
-define('MYMODULE2_ADMIN', MYMODULE2_URL . '/admin/index.php');
44
-$localLogo = MYMODULE2_IMAGE_URL . '/tdmxoops_logo.png';
43
+define('MYMODULE2_ADMIN', MYMODULE2_URL.'/admin/index.php');
44
+$localLogo = MYMODULE2_IMAGE_URL.'/tdmxoops_logo.png';
45 45
 // Module Information
46 46
 $copyright = "<a href='http://xoops.org' title='XOOPS Project' target='_blank'><img src='".$localLogo."' alt='XOOPS Project' /></a>";
47
-include_once XOOPS_ROOT_PATH . '/class/xoopsrequest.php';
48
-include_once MYMODULE2_PATH . '/class/helper.php';
49
-include_once MYMODULE2_PATH . '/include/functions.php';
47
+include_once XOOPS_ROOT_PATH.'/class/xoopsrequest.php';
48
+include_once MYMODULE2_PATH.'/class/helper.php';
49
+include_once MYMODULE2_PATH.'/include/functions.php';
Please login to merge, or discard this patch.
testdata/mymodule2/include/comment_functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,6 +43,6 @@
 block discarded – undo
43 43
  * @param string  $comment
44 44
  * @return void
45 45
  */
46
-function mymodule2CommentsApprove(&$comment){
46
+function mymodule2CommentsApprove(&$comment) {
47 47
     // notification mail here
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.