Passed
Push — master ( ed55b2...84c1d9 )
by Michael
12:36 queued 12s
created
include/config.php 2 patches
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -21,63 +21,63 @@
 block discarded – undo
21 21
 $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
22 22
 
23 23
 return (object)[
24
-    'name'           => $moduleDirNameUpper . ' Module Configurator',
25
-    'paths'          => [
26
-        'dirname'    => $moduleDirName,
27
-        'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
28
-        'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
29
-        'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
30
-        'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
31
-        'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
32
-    ],
33
-    'uploadFolders'  => [
34
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
35
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
36
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
37
-        //XOOPS_UPLOAD_PATH . '/flags'
38
-    ],
39
-    'copyBlankFiles' => [
40
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
41
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
42
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
43
-        //XOOPS_UPLOAD_PATH . '/flags'
44
-    ],
24
+	'name'           => $moduleDirNameUpper . ' Module Configurator',
25
+	'paths'          => [
26
+		'dirname'    => $moduleDirName,
27
+		'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
28
+		'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
29
+		'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
30
+		'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
31
+		'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
32
+	],
33
+	'uploadFolders'  => [
34
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
35
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
36
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
37
+		//XOOPS_UPLOAD_PATH . '/flags'
38
+	],
39
+	'copyBlankFiles' => [
40
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
41
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
42
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
43
+		//XOOPS_UPLOAD_PATH . '/flags'
44
+	],
45 45
 
46
-    'copyTestFolders' => [
47
-        //[
48
-        //    constant($moduleDirNameUpper . '_PATH') . '/testdata/images',
49
-        //    XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/images',
50
-        //]
51
-    ],
46
+	'copyTestFolders' => [
47
+		//[
48
+		//    constant($moduleDirNameUpper . '_PATH') . '/testdata/images',
49
+		//    XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/images',
50
+		//]
51
+	],
52 52
 
53
-    'templateFolders' => [
54
-        '/templates/',
55
-        '/templates/blocks/',
56
-        '/templates/admin/',
57
-    ],
58
-    'oldFiles'        => [
59
-        '/class/request.php',
60
-        '/class/registry.php',
61
-        '/class/utilities.php',
62
-        '/class/util.php',
63
-        // '/include/constants.php',
64
-        // '/include/functions.php',
65
-        '/ajaxrating.txt',
66
-    ],
67
-    'oldFolders'      => [
68
-        '/images',
69
-        '/css',
70
-        '/js',
71
-        '/tcpdf',
72
-        '/images',
73
-    ],
74
-    'renameTables'    => [//         'XX_archive'     => 'ZZZZ_archive',
75
-    ],
76
-    'moduleStats'     => [
77
-        //            'totalcategories' => $helper->getHandler('Category')->getCategoriesCount(-1),
78
-        //            'totalitems'      => $helper->getHandler('Item')->getItemsCount(),
79
-        //            'totalsubmitted'  => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]),
80
-    ],
81
-    'modCopyright'    => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
53
+	'templateFolders' => [
54
+		'/templates/',
55
+		'/templates/blocks/',
56
+		'/templates/admin/',
57
+	],
58
+	'oldFiles'        => [
59
+		'/class/request.php',
60
+		'/class/registry.php',
61
+		'/class/utilities.php',
62
+		'/class/util.php',
63
+		// '/include/constants.php',
64
+		// '/include/functions.php',
65
+		'/ajaxrating.txt',
66
+	],
67
+	'oldFolders'      => [
68
+		'/images',
69
+		'/css',
70
+		'/js',
71
+		'/tcpdf',
72
+		'/images',
73
+	],
74
+	'renameTables'    => [//         'XX_archive'     => 'ZZZZ_archive',
75
+	],
76
+	'moduleStats'     => [
77
+		//            'totalcategories' => $helper->getHandler('Category')->getCategoriesCount(-1),
78
+		//            'totalitems'      => $helper->getHandler('Item')->getItemsCount(),
79
+		//            'totalsubmitted'  => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]),
80
+	],
81
+	'modCopyright'    => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
82 82
                      <img src='" . Admin::iconUrl('xoopsmicrobutton.gif') . "' alt='XOOPS Project'></a>",
83 83
 ];
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -20,26 +20,26 @@  discard block
 block discarded – undo
20 20
 $moduleDirName      = \basename(\dirname(__DIR__));
21 21
 $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
22 22
 
23
-return (object)[
24
-    'name'           => $moduleDirNameUpper . ' Module Configurator',
23
+return (object) [
24
+    'name'           => $moduleDirNameUpper.' Module Configurator',
25 25
     'paths'          => [
26 26
         'dirname'    => $moduleDirName,
27
-        'admin'      => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
28
-        'modPath'    => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
29
-        'modUrl'     => XOOPS_URL . '/modules/' . $moduleDirName,
30
-        'uploadPath' => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
31
-        'uploadUrl'  => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
27
+        'admin'      => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin',
28
+        'modPath'    => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName,
29
+        'modUrl'     => XOOPS_URL.'/modules/'.$moduleDirName,
30
+        'uploadPath' => XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
31
+        'uploadUrl'  => XOOPS_UPLOAD_URL.'/'.$moduleDirName,
32 32
     ],
33 33
     'uploadFolders'  => [
34
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
35
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
36
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
34
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
35
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/category',
36
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots',
37 37
         //XOOPS_UPLOAD_PATH . '/flags'
38 38
     ],
39 39
     'copyBlankFiles' => [
40
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
41
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
42
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
40
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
41
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/category',
42
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots',
43 43
         //XOOPS_UPLOAD_PATH . '/flags'
44 44
     ],
45 45
 
@@ -79,5 +79,5 @@  discard block
 block discarded – undo
79 79
         //            'totalsubmitted'  => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]),
80 80
     ],
81 81
     'modCopyright'    => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
82
-                     <img src='" . Admin::iconUrl('xoopsmicrobutton.gif') . "' alt='XOOPS Project'></a>",
82
+                     <img src='" . Admin::iconUrl('xoopsmicrobutton.gif')."' alt='XOOPS Project'></a>",
83 83
 ];
Please login to merge, or discard this patch.
include/common.php 2 patches
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -39,19 +39,19 @@  discard block
 block discarded – undo
39 39
 //$downloadHandler     = new Songlist\DownloadHandler($db);
40 40
 
41 41
 if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) {
42
-    define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__)));
43
-    define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
44
-    define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
45
-    define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/');
46
-    define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/');
47
-    define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images');
48
-    define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/');
49
-    define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/');
50
-    define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php');
51
-    define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png');
52
-    define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash
53
-    define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash
54
-    define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1);
42
+	define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__)));
43
+	define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
44
+	define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
45
+	define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/');
46
+	define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/');
47
+	define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images');
48
+	define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/');
49
+	define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/');
50
+	define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php');
51
+	define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png');
52
+	define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash
53
+	define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash
54
+	define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1);
55 55
 }
56 56
 
57 57
 $pathIcon16 = Admin::iconUrl('', '16');
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
 //$pathModIcon32 = \XoopsModules\Songlist\Helper::getInstance()->getModule()->getInfo('modicons32');
61 61
 
62 62
 $icons = [
63
-    'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . "' align='middle'>",
64
-    'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>",
65
-    'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>",
66
-    'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>",
67
-    'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>",
68
-    'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>",
69
-    'add'     => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>",
70
-    '0'       => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>",
71
-    '1'       => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>",
63
+	'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . "' align='middle'>",
64
+	'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>",
65
+	'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>",
66
+	'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>",
67
+	'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>",
68
+	'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>",
69
+	'add'     => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>",
70
+	'0'       => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>",
71
+	'1'       => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>",
72 72
 ];
73 73
 
74 74
 $debug = false;
@@ -77,23 +77,23 @@  discard block
 block discarded – undo
77 77
 $myts = \MyTextSanitizer::getInstance();
78 78
 
79 79
 if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof \XoopsTpl)) {
80
-    require_once $GLOBALS['xoops']->path('class/template.php');
81
-    $GLOBALS['xoopsTpl'] = new \XoopsTpl();
80
+	require_once $GLOBALS['xoops']->path('class/template.php');
81
+	$GLOBALS['xoopsTpl'] = new \XoopsTpl();
82 82
 }
83 83
 
84 84
 $GLOBALS['xoopsTpl']->assign('mod_url', $helper->url());
85 85
 // Local icons path
86 86
 if (is_object($helper->getModule())) {
87
-    $pathModIcon16 = $helper->getModule()->getInfo('modicons16');
88
-    $pathModIcon32 = $helper->getModule()->getInfo('modicons32');
87
+	$pathModIcon16 = $helper->getModule()->getInfo('modicons16');
88
+	$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
89 89
 
90
-    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16);
91
-    $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32);
90
+	$GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16);
91
+	$GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32);
92 92
 }
93 93
 
94 94
 xoops_loadLanguage('main', $moduleDirName);
95 95
 if (class_exists('D3LanguageManager')) {
96
-    require_once XOOPS_TRUST_PATH . "/libs/altsys/class/D3LanguageManager.class.php";
97
-    $langman = D3LanguageManager::getInstance();
98
-    $langman->read('main.php', $moduleDirName);
96
+	require_once XOOPS_TRUST_PATH . "/libs/altsys/class/D3LanguageManager.class.php";
97
+	$langman = D3LanguageManager::getInstance();
98
+	$langman->read('main.php', $moduleDirName);
99 99
 }
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 use XoopsModules\Songlist;
20 20
 use XoopsModules\Songlist\Helper;
21 21
 
22
-require_once \dirname(__DIR__) . '/preloads/autoloader.php';
22
+require_once \dirname(__DIR__).'/preloads/autoloader.php';
23 23
 
24 24
 $moduleDirName      = \basename(\dirname(__DIR__));
25 25
 $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
@@ -38,20 +38,20 @@  discard block
 block discarded – undo
38 38
 //$categoryHandler     = new Songlist\CategoryHandler($db);
39 39
 //$downloadHandler     = new Songlist\DownloadHandler($db);
40 40
 
41
-if (!defined($moduleDirNameUpper . '_CONSTANTS_DEFINED')) {
42
-    define($moduleDirNameUpper . '_DIRNAME', basename(dirname(__DIR__)));
43
-    define($moduleDirNameUpper . '_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
44
-    define($moduleDirNameUpper . '_PATH', XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/');
45
-    define($moduleDirNameUpper . '_URL', XOOPS_URL . '/modules/' . $moduleDirName . '/');
46
-    define($moduleDirNameUpper . '_IMAGE_URL', constant($moduleDirNameUpper . '_URL') . '/assets/images/');
47
-    define($moduleDirNameUpper . '_IMAGE_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/assets/images');
48
-    define($moduleDirNameUpper . '_ADMIN_URL', constant($moduleDirNameUpper . '_URL') . '/admin/');
49
-    define($moduleDirNameUpper . '_ADMIN_PATH', constant($moduleDirNameUpper . '_ROOT_PATH') . '/admin/');
50
-    define($moduleDirNameUpper . '_ADMIN', constant($moduleDirNameUpper . '_URL') . '/admin/index.php');
51
-    define($moduleDirNameUpper . '_AUTHOR_LOGOIMG', constant($moduleDirNameUpper . '_URL') . '/assets/images/logoModule.png');
52
-    define($moduleDirNameUpper . '_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . $moduleDirName); // WITHOUT Trailing slash
53
-    define($moduleDirNameUpper . '_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . $moduleDirName); // WITHOUT Trailing slash
54
-    define($moduleDirNameUpper . '_CONSTANTS_DEFINED', 1);
41
+if (!defined($moduleDirNameUpper.'_CONSTANTS_DEFINED')) {
42
+    define($moduleDirNameUpper.'_DIRNAME', basename(dirname(__DIR__)));
43
+    define($moduleDirNameUpper.'_ROOT_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/');
44
+    define($moduleDirNameUpper.'_PATH', XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/');
45
+    define($moduleDirNameUpper.'_URL', XOOPS_URL.'/modules/'.$moduleDirName.'/');
46
+    define($moduleDirNameUpper.'_IMAGE_URL', constant($moduleDirNameUpper.'_URL').'/assets/images/');
47
+    define($moduleDirNameUpper.'_IMAGE_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/assets/images');
48
+    define($moduleDirNameUpper.'_ADMIN_URL', constant($moduleDirNameUpper.'_URL').'/admin/');
49
+    define($moduleDirNameUpper.'_ADMIN_PATH', constant($moduleDirNameUpper.'_ROOT_PATH').'/admin/');
50
+    define($moduleDirNameUpper.'_ADMIN', constant($moduleDirNameUpper.'_URL').'/admin/index.php');
51
+    define($moduleDirNameUpper.'_AUTHOR_LOGOIMG', constant($moduleDirNameUpper.'_URL').'/assets/images/logoModule.png');
52
+    define($moduleDirNameUpper.'_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.$moduleDirName); // WITHOUT Trailing slash
53
+    define($moduleDirNameUpper.'_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.$moduleDirName); // WITHOUT Trailing slash
54
+    define($moduleDirNameUpper.'_CONSTANTS_DEFINED', 1);
55 55
 }
56 56
 
57 57
 $pathIcon16 = Admin::iconUrl('', '16');
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
 //$pathModIcon32 = \XoopsModules\Songlist\Helper::getInstance()->getModule()->getInfo('modicons32');
61 61
 
62 62
 $icons = [
63
-    'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . "' align='middle'>",
64
-    'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt='" . _DELETE . "' align='middle'>",
65
-    'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt='" . _CLONE . "' align='middle'>",
66
-    'preview' => "<img src='" . $pathIcon16 . "/view.png' alt='" . _PREVIEW . "' align='middle'>",
67
-    'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt='" . _CLONE . "' align='middle'>",
68
-    'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt='" . _CLONE . "' align='middle'>",
69
-    'add'     => "<img src='" . $pathIcon16 . "/add.png' alt='" . _ADD . "' align='middle'>",
70
-    '0'       => "<img src='" . $pathIcon16 . "/0.png' alt='" . 0 . "' align='middle'>",
71
-    '1'       => "<img src='" . $pathIcon16 . "/1.png' alt='" . 1 . "' align='middle'>",
63
+    'edit'    => "<img src='".$pathIcon16."/edit.png'  alt="._EDIT."' align='middle'>",
64
+    'delete'  => "<img src='".$pathIcon16."/delete.png' alt='"._DELETE."' align='middle'>",
65
+    'clone'   => "<img src='".$pathIcon16."/editcopy.png' alt='"._CLONE."' align='middle'>",
66
+    'preview' => "<img src='".$pathIcon16."/view.png' alt='"._PREVIEW."' align='middle'>",
67
+    'print'   => "<img src='".$pathIcon16."/printer.png' alt='"._CLONE."' align='middle'>",
68
+    'pdf'     => "<img src='".$pathIcon16."/pdf.png' alt='"._CLONE."' align='middle'>",
69
+    'add'     => "<img src='".$pathIcon16."/add.png' alt='"._ADD."' align='middle'>",
70
+    '0'       => "<img src='".$pathIcon16."/0.png' alt='".0."' align='middle'>",
71
+    '1'       => "<img src='".$pathIcon16."/1.png' alt='".1."' align='middle'>",
72 72
 ];
73 73
 
74 74
 $debug = false;
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
     $pathModIcon16 = $helper->getModule()->getInfo('modicons16');
88 88
     $pathModIcon32 = $helper->getModule()->getInfo('modicons32');
89 89
 
90
-    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL . '/modules/' . $moduleDirName . '/' . $pathModIcon16);
90
+    $GLOBALS['xoopsTpl']->assign('pathModIcon16', XOOPS_URL.'/modules/'.$moduleDirName.'/'.$pathModIcon16);
91 91
     $GLOBALS['xoopsTpl']->assign('pathModIcon32', $pathModIcon32);
92 92
 }
93 93
 
94 94
 xoops_loadLanguage('main', $moduleDirName);
95 95
 if (class_exists('D3LanguageManager')) {
96
-    require_once XOOPS_TRUST_PATH . "/libs/altsys/class/D3LanguageManager.class.php";
96
+    require_once XOOPS_TRUST_PATH."/libs/altsys/class/D3LanguageManager.class.php";
97 97
     $langman = D3LanguageManager::getInstance();
98 98
     $langman->read('main.php', $moduleDirName);
99 99
 }
Please login to merge, or discard this patch.
include/onupdate.php 2 patches
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 use XoopsModules\Songlist;
19 19
 
20 20
 if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)
21
-    || !$GLOBALS['xoopsUser']->isAdmin()) {
22
-    exit('Restricted access' . PHP_EOL);
21
+	|| !$GLOBALS['xoopsUser']->isAdmin()) {
22
+	exit('Restricted access' . PHP_EOL);
23 23
 }
24 24
 
25 25
 /**
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
  */
31 31
 function xoops_module_pre_update_songlist(\XoopsModule $module): bool
32 32
 {
33
-    $moduleDirName = \basename(\dirname(__DIR__));
34
-    /** @var Songlist\Helper $helper */
35
-    /** @var Songlist\Utility $utility */
36
-    $helper  = Songlist\Helper::getInstance();
37
-    $utility = new Songlist\Utility();
33
+	$moduleDirName = \basename(\dirname(__DIR__));
34
+	/** @var Songlist\Helper $helper */
35
+	/** @var Songlist\Utility $utility */
36
+	$helper  = Songlist\Helper::getInstance();
37
+	$utility = new Songlist\Utility();
38 38
 
39
-    $xoopsSuccess = $utility::checkVerXoops($module);
40
-    $phpSuccess   = $utility::checkVerPhp($module);
39
+	$xoopsSuccess = $utility::checkVerXoops($module);
40
+	$phpSuccess   = $utility::checkVerPhp($module);
41 41
 
42
-    return $xoopsSuccess && $phpSuccess;
42
+	return $xoopsSuccess && $phpSuccess;
43 43
 }
44 44
 
45 45
 /**
@@ -51,18 +51,18 @@  discard block
 block discarded – undo
51 51
  */
52 52
 function xoops_module_update_songlist(\XoopsModule $module, $previousVersion = null): bool
53 53
 {
54
-    $moduleDirName      = \basename(\dirname(__DIR__));
55
-    $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
56
-
57
-    /** @var Songlist\Helper $helper */ /** @var Songlist\Utility $utility */
58
-    /** @var Songlist\Common\Configurator $configurator */
59
-    $helper       = Songlist\Helper::getInstance();
60
-    $utility      = new Songlist\Utility();
61
-    $configurator = new Songlist\Common\Configurator();
62
-
63
-    if ($previousVersion < 240) {
64
-        //delete old HTML templates
65
-        /*
54
+	$moduleDirName      = \basename(\dirname(__DIR__));
55
+	$moduleDirNameUpper = \mb_strtoupper($moduleDirName);
56
+
57
+	/** @var Songlist\Helper $helper */ /** @var Songlist\Utility $utility */
58
+	/** @var Songlist\Common\Configurator $configurator */
59
+	$helper       = Songlist\Helper::getInstance();
60
+	$utility      = new Songlist\Utility();
61
+	$configurator = new Songlist\Common\Configurator();
62
+
63
+	if ($previousVersion < 240) {
64
+		//delete old HTML templates
65
+		/*
66 66
         if (count($configurator->templateFolders) > 0) {
67 67
             foreach ($configurator->templateFolders as $folder) {
68 68
                 $templateFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $folder);
@@ -80,55 +80,55 @@  discard block
 block discarded – undo
80 80
             }
81 81
         }
82 82
 */
83
-        //  ---  DELETE OLD FILES ---------------
84
-        if (count($configurator->oldFiles) > 0) {
85
-            //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
86
-            foreach (array_keys($configurator->oldFiles) as $i) {
87
-                $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFiles[$i]);
88
-                if (is_file($tempFile)) {
89
-                    unlink($tempFile);
90
-                }
91
-            }
92
-        }
93
-
94
-        //  ---  DELETE OLD FOLDERS ---------------
95
-        xoops_load('XoopsFile');
96
-        if (count($configurator->oldFolders) > 0) {
97
-            //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
98
-            foreach (array_keys($configurator->oldFolders) as $i) {
99
-                $tempFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFolders[$i]);
100
-                /** @var XoopsObjectHandler $folderHandler */
101
-                $folderHandler = XoopsFile::getHandler('folder', $tempFolder);
102
-                $folderHandler->delete($tempFolder);
103
-            }
104
-        }
105
-
106
-        //  ---  CREATE FOLDERS ---------------
107
-        if (count($configurator->uploadFolders) > 0) {
108
-            //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
109
-            foreach (array_keys($configurator->uploadFolders) as $i) {
110
-                $utility::createFolder($configurator->uploadFolders[$i]);
111
-            }
112
-        }
113
-
114
-        //  ---  COPY blank.png FILES ---------------
115
-        if (count($configurator->copyBlankFiles) > 0) {
116
-            $file = \dirname(__DIR__) . '/assets/images/blank.png';
117
-            foreach (array_keys($configurator->copyBlankFiles) as $i) {
118
-                $dest = $configurator->copyBlankFiles[$i] . '/blank.png';
119
-                $utility::copyFile($file, $dest);
120
-            }
121
-        }
122
-
123
-        //delete .html entries from the tpl table
124
-        $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . '\' AND `tpl_file` LIKE \'%.tpl%\'';
125
-        $GLOBALS['xoopsDB']->queryF($sql);
126
-
127
-        /** @var \XoopsGroupPermHandler $grouppermHandler */
128
-        $grouppermHandler = xoops_getHandler('groupperm');
129
-
130
-        return $grouppermHandler->deleteByModule($module->getVar('mid'), 'item_read');
131
-    }
132
-
133
-    return true;
83
+		//  ---  DELETE OLD FILES ---------------
84
+		if (count($configurator->oldFiles) > 0) {
85
+			//    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
86
+			foreach (array_keys($configurator->oldFiles) as $i) {
87
+				$tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFiles[$i]);
88
+				if (is_file($tempFile)) {
89
+					unlink($tempFile);
90
+				}
91
+			}
92
+		}
93
+
94
+		//  ---  DELETE OLD FOLDERS ---------------
95
+		xoops_load('XoopsFile');
96
+		if (count($configurator->oldFolders) > 0) {
97
+			//    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
98
+			foreach (array_keys($configurator->oldFolders) as $i) {
99
+				$tempFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFolders[$i]);
100
+				/** @var XoopsObjectHandler $folderHandler */
101
+				$folderHandler = XoopsFile::getHandler('folder', $tempFolder);
102
+				$folderHandler->delete($tempFolder);
103
+			}
104
+		}
105
+
106
+		//  ---  CREATE FOLDERS ---------------
107
+		if (count($configurator->uploadFolders) > 0) {
108
+			//    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
109
+			foreach (array_keys($configurator->uploadFolders) as $i) {
110
+				$utility::createFolder($configurator->uploadFolders[$i]);
111
+			}
112
+		}
113
+
114
+		//  ---  COPY blank.png FILES ---------------
115
+		if (count($configurator->copyBlankFiles) > 0) {
116
+			$file = \dirname(__DIR__) . '/assets/images/blank.png';
117
+			foreach (array_keys($configurator->copyBlankFiles) as $i) {
118
+				$dest = $configurator->copyBlankFiles[$i] . '/blank.png';
119
+				$utility::copyFile($file, $dest);
120
+			}
121
+		}
122
+
123
+		//delete .html entries from the tpl table
124
+		$sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . '\' AND `tpl_file` LIKE \'%.tpl%\'';
125
+		$GLOBALS['xoopsDB']->queryF($sql);
126
+
127
+		/** @var \XoopsGroupPermHandler $grouppermHandler */
128
+		$grouppermHandler = xoops_getHandler('groupperm');
129
+
130
+		return $grouppermHandler->deleteByModule($module->getVar('mid'), 'item_read');
131
+	}
132
+
133
+	return true;
134 134
 }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 if ((!defined('XOOPS_ROOT_PATH')) || !($GLOBALS['xoopsUser'] instanceof \XoopsUser)
21 21
     || !$GLOBALS['xoopsUser']->isAdmin()) {
22
-    exit('Restricted access' . PHP_EOL);
22
+    exit('Restricted access'.PHP_EOL);
23 23
 }
24 24
 
25 25
 /**
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     $utility      = new Songlist\Utility();
61 61
     $configurator = new Songlist\Common\Configurator();
62 62
 
63
-    if ($previousVersion < 240) {
63
+    if ($previousVersion<240) {
64 64
         //delete old HTML templates
65 65
         /*
66 66
         if (count($configurator->templateFolders) > 0) {
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
         }
82 82
 */
83 83
         //  ---  DELETE OLD FILES ---------------
84
-        if (count($configurator->oldFiles) > 0) {
84
+        if (count($configurator->oldFiles)>0) {
85 85
             //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
86 86
             foreach (array_keys($configurator->oldFiles) as $i) {
87
-                $tempFile = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFiles[$i]);
87
+                $tempFile = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFiles[$i]);
88 88
                 if (is_file($tempFile)) {
89 89
                     unlink($tempFile);
90 90
                 }
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
 
94 94
         //  ---  DELETE OLD FOLDERS ---------------
95 95
         xoops_load('XoopsFile');
96
-        if (count($configurator->oldFolders) > 0) {
96
+        if (count($configurator->oldFolders)>0) {
97 97
             //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
98 98
             foreach (array_keys($configurator->oldFolders) as $i) {
99
-                $tempFolder = $GLOBALS['xoops']->path('modules/' . $moduleDirName . $configurator->oldFolders[$i]);
99
+                $tempFolder = $GLOBALS['xoops']->path('modules/'.$moduleDirName.$configurator->oldFolders[$i]);
100 100
                 /** @var XoopsObjectHandler $folderHandler */
101 101
                 $folderHandler = XoopsFile::getHandler('folder', $tempFolder);
102 102
                 $folderHandler->delete($tempFolder);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         }
105 105
 
106 106
         //  ---  CREATE FOLDERS ---------------
107
-        if (count($configurator->uploadFolders) > 0) {
107
+        if (count($configurator->uploadFolders)>0) {
108 108
             //    foreach (array_keys($GLOBALS['uploadFolders']) as $i) {
109 109
             foreach (array_keys($configurator->uploadFolders) as $i) {
110 110
                 $utility::createFolder($configurator->uploadFolders[$i]);
@@ -112,16 +112,16 @@  discard block
 block discarded – undo
112 112
         }
113 113
 
114 114
         //  ---  COPY blank.png FILES ---------------
115
-        if (count($configurator->copyBlankFiles) > 0) {
116
-            $file = \dirname(__DIR__) . '/assets/images/blank.png';
115
+        if (count($configurator->copyBlankFiles)>0) {
116
+            $file = \dirname(__DIR__).'/assets/images/blank.png';
117 117
             foreach (array_keys($configurator->copyBlankFiles) as $i) {
118
-                $dest = $configurator->copyBlankFiles[$i] . '/blank.png';
118
+                $dest = $configurator->copyBlankFiles[$i].'/blank.png';
119 119
                 $utility::copyFile($file, $dest);
120 120
             }
121 121
         }
122 122
 
123 123
         //delete .html entries from the tpl table
124
-        $sql = 'DELETE FROM ' . $GLOBALS['xoopsDB']->prefix('tplfile') . " WHERE `tpl_module` = '" . $module->getVar('dirname', 'n') . '\' AND `tpl_file` LIKE \'%.tpl%\'';
124
+        $sql = 'DELETE FROM '.$GLOBALS['xoopsDB']->prefix('tplfile')." WHERE `tpl_module` = '".$module->getVar('dirname', 'n').'\' AND `tpl_file` LIKE \'%.tpl%\'';
125 125
         $GLOBALS['xoopsDB']->queryF($sql);
126 126
 
127 127
         /** @var \XoopsGroupPermHandler $grouppermHandler */
Please login to merge, or discard this patch.
htdocs/modules/songlist/blocks/songlist_popular_genres.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 		$objects = $handler->getTop($options[0]);
7 7
 		if (count($objects)>0) {
8 8
 			$ret = array();
9
-			foreach($objects as $id => $object)
9
+			foreach ($objects as $id => $object)
10 10
 				$ret[$id] = $object->toArray(true);
11 11
 			return $ret;
12 12
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
 		$objects = $handler->getTop($options[0]);
7 7
 		if (count($objects)>0) {
8 8
 			$ret = array();
9
-			foreach($objects as $id => $object)
10
-				$ret[$id] = $object->toArray(true);
9
+			foreach($objects as $id => $object) {
10
+							$ret[$id] = $object->toArray(true);
11
+			}
11 12
 			return $ret;
12 13
 		}
13 14
 		return false;	
Please login to merge, or discard this patch.
htdocs/modules/songlist/blocks/songlist_popular_songs.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 		$objects = $handler->getTop($options[0]);
7 7
 		if (count($objects)>0) {
8 8
 			$ret = array();
9
-			foreach($objects as $id => $object)
9
+			foreach ($objects as $id => $object)
10 10
 				$ret[$id] = $object->toArray(true);
11 11
 			return $ret;
12 12
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
 		$objects = $handler->getTop($options[0]);
7 7
 		if (count($objects)>0) {
8 8
 			$ret = array();
9
-			foreach($objects as $id => $object)
10
-				$ret[$id] = $object->toArray(true);
9
+			foreach($objects as $id => $object) {
10
+							$ret[$id] = $object->toArray(true);
11
+			}
11 12
 			return $ret;
12 13
 		}
13 14
 		return false;	
Please login to merge, or discard this patch.
htdocs/modules/songlist/blocks/songlist_popular_artists.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 		$objects = $handler->getTop($options[0]);
7 7
 		if (count($objects)>0) {
8 8
 			$ret = array();
9
-			foreach($objects as $id => $object)
9
+			foreach ($objects as $id => $object)
10 10
 				$ret[$id] = $object->toArray(true);
11 11
 			return $ret;
12 12
 		}
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
 		$objects = $handler->getTop($options[0]);
7 7
 		if (count($objects)>0) {
8 8
 			$ret = array();
9
-			foreach($objects as $id => $object)
10
-				$ret[$id] = $object->toArray(true);
9
+			foreach($objects as $id => $object) {
10
+							$ret[$id] = $object->toArray(true);
11
+			}
11 12
 			return $ret;
12 13
 		}
13 14
 		return false;	
Please login to merge, or discard this patch.
request.php 2 patches
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -19,48 +19,48 @@
 block discarded – undo
19 19
 $requestsHandler = Helper::getInstance()->getHandler('Requests');
20 20
 
21 21
 switch ($op) {
22
-    default:
23
-    case 'request':
24
-        $url = $requestsHandler->getURL();
25
-        if (!mb_strpos($url, $_SERVER['REQUEST_URI']) && empty($_POST)) {
26
-            header('HTTP/1.1 301 Moved Permanently');
27
-            header('Location: ' . $url);
28
-            exit(0);
29
-        }
22
+	default:
23
+	case 'request':
24
+		$url = $requestsHandler->getURL();
25
+		if (!mb_strpos($url, $_SERVER['REQUEST_URI']) && empty($_POST)) {
26
+			header('HTTP/1.1 301 Moved Permanently');
27
+			header('Location: ' . $url);
28
+			exit(0);
29
+		}
30 30
 
31
-        switch ($fct) {
32
-            case 'save':
33
-                if (checkEmail($_POST[0]['email'], true) && !empty($_POST[0]['email'])) {
34
-                    $request = $requestsHandler->create();
35
-                    $request->setVars($_POST[0]);
36
-                    $rid = $requestsHandler->insert($request);
37
-                    if ($rid) {
38
-                        redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_REQUESTSENT);
39
-                    } else {
40
-                        redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_REQUESTNOTSENT);
41
-                    }
42
-                    exit;
43
-                    break;
44
-                }
45
-                $error = _MD_SONGLIST_MSG_EMAILNOTSET;
31
+		switch ($fct) {
32
+			case 'save':
33
+				if (checkEmail($_POST[0]['email'], true) && !empty($_POST[0]['email'])) {
34
+					$request = $requestsHandler->create();
35
+					$request->setVars($_POST[0]);
36
+					$rid = $requestsHandler->insert($request);
37
+					if ($rid) {
38
+						redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_REQUESTSENT);
39
+					} else {
40
+						redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_REQUESTNOTSENT);
41
+					}
42
+					exit;
43
+					break;
44
+				}
45
+				$error = _MD_SONGLIST_MSG_EMAILNOTSET;
46 46
 
47
-            // no break
48
-            default:
49
-            case 'list':
50
-                $GLOBALS['xoopsOption']['template_main'] = 'songlist_requests_index.tpl';
51
-                require_once $GLOBALS['xoops']->path('/header.php');
52
-                if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
53
-                    $GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
54
-                    $GLOBALS['loaded_jquery'] = true;
55
-                }
56
-                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
57
-                $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
58
-                $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
59
-                $GLOBALS['xoopsTpl']->assign('form', FormController::getFormRequests(false, false));
60
-                if (mb_strlen($error ?? '')) {
61
-                    xoops_error($error);
62
-                }
63
-                require_once $GLOBALS['xoops']->path('/footer.php');
64
-                break;
65
-        }
47
+			// no break
48
+			default:
49
+			case 'list':
50
+				$GLOBALS['xoopsOption']['template_main'] = 'songlist_requests_index.tpl';
51
+				require_once $GLOBALS['xoops']->path('/header.php');
52
+				if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
53
+					$GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
54
+					$GLOBALS['loaded_jquery'] = true;
55
+				}
56
+				$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
57
+				$GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
58
+				$GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
59
+				$GLOBALS['xoopsTpl']->assign('form', FormController::getFormRequests(false, false));
60
+				if (mb_strlen($error ?? '')) {
61
+					xoops_error($error);
62
+				}
63
+				require_once $GLOBALS['xoops']->path('/footer.php');
64
+				break;
65
+		}
66 66
 }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 use XoopsModules\Songlist\RequestsHandler;
7 7
 use XoopsModules\Songlist\Form\FormController;
8 8
 
9
-require_once __DIR__ . '/header.php';
9
+require_once __DIR__.'/header.php';
10 10
 
11 11
 global $file, $op, $fct, $id, $value, $gid, $cid, $singer, $start, $limit;
12 12
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         $url = $requestsHandler->getURL();
25 25
         if (!mb_strpos($url, $_SERVER['REQUEST_URI']) && empty($_POST)) {
26 26
             header('HTTP/1.1 301 Moved Permanently');
27
-            header('Location: ' . $url);
27
+            header('Location: '.$url);
28 28
             exit(0);
29 29
         }
30 30
 
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
                     $request->setVars($_POST[0]);
36 36
                     $rid = $requestsHandler->insert($request);
37 37
                     if ($rid) {
38
-                        redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_REQUESTSENT);
38
+                        redirect_header($_SERVER['SCRIPT_NAME']."?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_REQUESTSENT);
39 39
                     } else {
40
-                        redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_REQUESTNOTSENT);
40
+                        redirect_header($_SERVER['SCRIPT_NAME']."?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_REQUESTNOTSENT);
41 41
                     }
42 42
                     exit;
43 43
                     break;
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
                 $GLOBALS['xoopsOption']['template_main'] = 'songlist_requests_index.tpl';
51 51
                 require_once $GLOBALS['xoops']->path('/header.php');
52 52
                 if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
53
-                    $GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
53
+                    $GLOBALS['xoTheme']->addScript(XOOPS_URL._MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
54 54
                     $GLOBALS['loaded_jquery'] = true;
55 55
                 }
56
-                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
56
+                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL._MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
57 57
                 $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
58 58
                 $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
59 59
                 $GLOBALS['xoopsTpl']->assign('form', FormController::getFormRequests(false, false));
Please login to merge, or discard this patch.
view.tag.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 
3
-require_once __DIR__ . '/header.php';
4
-require_once XOOPS_ROOT_PATH . '/modules/tag/view.tag.php';
3
+require_once __DIR__.'/header.php';
4
+require_once XOOPS_ROOT_PATH.'/modules/tag/view.tag.php';
Please login to merge, or discard this patch.
preloads/autoloader.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -4,31 +4,31 @@
 block discarded – undo
4 4
  * @see https://www.php-fig.org/psr/psr-4/examples/
5 5
  */
6 6
 spl_autoload_register(
7
-    static function ($class): void {
8
-        // project-specific namespace prefix
9
-        $prefix = 'XoopsModules\\Songlist\\';
7
+	static function ($class): void {
8
+		// project-specific namespace prefix
9
+		$prefix = 'XoopsModules\\Songlist\\';
10 10
 
11
-        // base directory for the namespace prefix
12
-        $baseDir = \dirname(__DIR__) . '/class/';
11
+		// base directory for the namespace prefix
12
+		$baseDir = \dirname(__DIR__) . '/class/';
13 13
 
14
-        // does the class use the namespace prefix?
15
-        $len = mb_strlen($prefix);
14
+		// does the class use the namespace prefix?
15
+		$len = mb_strlen($prefix);
16 16
 
17
-        if (0 !== strncmp($prefix, $class, $len)) {
18
-            return;
19
-        }
17
+		if (0 !== strncmp($prefix, $class, $len)) {
18
+			return;
19
+		}
20 20
 
21
-        // get the relative class name
22
-        $relativeClass = mb_substr($class, $len);
21
+		// get the relative class name
22
+		$relativeClass = mb_substr($class, $len);
23 23
 
24
-        // replace the namespace prefix with the base directory, replace namespace
25
-        // separators with directory separators in the relative class name, append
26
-        // with .php
27
-        $file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php';
24
+		// replace the namespace prefix with the base directory, replace namespace
25
+		// separators with directory separators in the relative class name, append
26
+		// with .php
27
+		$file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php';
28 28
 
29
-        // if the file exists, require it
30
-        if (is_file($file)) {
31
-            require_once $file;
32
-        }
33
-    }
29
+		// if the file exists, require it
30
+		if (is_file($file)) {
31
+			require_once $file;
32
+		}
33
+	}
34 34
 );
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,17 +4,17 @@  discard block
 block discarded – undo
4 4
  * @see https://www.php-fig.org/psr/psr-4/examples/
5 5
  */
6 6
 spl_autoload_register(
7
-    static function ($class): void {
7
+    static function($class): void {
8 8
         // project-specific namespace prefix
9 9
         $prefix = 'XoopsModules\\Songlist\\';
10 10
 
11 11
         // base directory for the namespace prefix
12
-        $baseDir = \dirname(__DIR__) . '/class/';
12
+        $baseDir = \dirname(__DIR__).'/class/';
13 13
 
14 14
         // does the class use the namespace prefix?
15 15
         $len = mb_strlen($prefix);
16 16
 
17
-        if (0 !== strncmp($prefix, $class, $len)) {
17
+        if (0!==strncmp($prefix, $class, $len)) {
18 18
             return;
19 19
         }
20 20
 
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
         // replace the namespace prefix with the base directory, replace namespace
25 25
         // separators with directory separators in the relative class name, append
26 26
         // with .php
27
-        $file = $baseDir . str_replace('\\', '/', $relativeClass) . '.php';
27
+        $file = $baseDir.str_replace('\\', '/', $relativeClass).'.php';
28 28
 
29 29
         // if the file exists, require it
30 30
         if (is_file($file)) {
Please login to merge, or discard this patch.