Passed
Pull Request — master (#2)
by Michael
07:48 queued 04:06
created
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.
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.
preloads/core.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@
 block discarded – undo
20 20
  */
21 21
 class SonglistCorePreload extends \XoopsPreloadItem
22 22
 {
23
-    // to add PSR-4 autoloader
24
-    /**
25
-     * @param $args
26
-     */
27
-    public static function eventCoreIncludeCommonEnd($args): void
28
-    {
29
-        require_once __DIR__ . '/autoloader.php';
30
-    }
23
+	// to add PSR-4 autoloader
24
+	/**
25
+	 * @param $args
26
+	 */
27
+	public static function eventCoreIncludeCommonEnd($args): void
28
+	{
29
+		require_once __DIR__ . '/autoloader.php';
30
+	}
31 31
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
      */
27 27
     public static function eventCoreIncludeCommonEnd($args): void
28 28
     {
29
-        require_once __DIR__ . '/autoloader.php';
29
+        require_once __DIR__.'/autoloader.php';
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
config/paths.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,17 +5,17 @@
 block discarded – undo
5 5
 $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
6 6
 
7 7
 return [
8
-    'name'          => \mb_strtoupper($moduleDirName) . ' PathConfigurator',
9
-    'dirname'       => $moduleDirName,
10
-    'admin'         => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
11
-    'modPath'       => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
12
-    'modUrl'        => XOOPS_URL . '/modules/' . $moduleDirName,
13
-    'uploadPath'    => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
14
-    'uploadUrl'     => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
15
-    'uploadFolders' => [
16
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
17
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
18
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
19
-        //XOOPS_UPLOAD_PATH . '/flags'
20
-    ],
8
+	'name'          => \mb_strtoupper($moduleDirName) . ' PathConfigurator',
9
+	'dirname'       => $moduleDirName,
10
+	'admin'         => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
11
+	'modPath'       => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
12
+	'modUrl'        => XOOPS_URL . '/modules/' . $moduleDirName,
13
+	'uploadPath'    => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
14
+	'uploadUrl'     => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
15
+	'uploadFolders' => [
16
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
17
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
18
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
19
+		//XOOPS_UPLOAD_PATH . '/flags'
20
+	],
21 21
 ];
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,17 +5,17 @@
 block discarded – undo
5 5
 $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
6 6
 
7 7
 return [
8
-    'name'          => \mb_strtoupper($moduleDirName) . ' PathConfigurator',
8
+    'name'          => \mb_strtoupper($moduleDirName).' PathConfigurator',
9 9
     'dirname'       => $moduleDirName,
10
-    'admin'         => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/admin',
11
-    'modPath'       => XOOPS_ROOT_PATH . '/modules/' . $moduleDirName,
12
-    'modUrl'        => XOOPS_URL . '/modules/' . $moduleDirName,
13
-    'uploadPath'    => XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
14
-    'uploadUrl'     => XOOPS_UPLOAD_URL . '/' . $moduleDirName,
10
+    'admin'         => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/admin',
11
+    'modPath'       => XOOPS_ROOT_PATH.'/modules/'.$moduleDirName,
12
+    'modUrl'        => XOOPS_URL.'/modules/'.$moduleDirName,
13
+    'uploadPath'    => XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
14
+    'uploadUrl'     => XOOPS_UPLOAD_URL.'/'.$moduleDirName,
15 15
     'uploadFolders' => [
16
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
17
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
18
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
16
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
17
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/category',
18
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots',
19 19
         //XOOPS_UPLOAD_PATH . '/flags'
20 20
     ],
21 21
 ];
Please login to merge, or discard this patch.
config/icons.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@
 block discarded – undo
6 6
 $moduleDirName = \basename(\dirname(__DIR__));
7 7
 
8 8
 return [
9
-    'name'    => \mb_strtoupper($moduleDirName) . ' IconConfigurator',
10
-    'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . ' title=' . _EDIT . " align='middle'>",
11
-    'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt=" . _DELETE . ' title=' . _DELETE . " align='middle'>",
12
-    'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt=" . _CLONE . ' title=' . _CLONE . " align='middle'>",
13
-    'preview' => "<img src='" . $pathIcon16 . "/view.png' alt=" . _PREVIEW . ' title=' . _PREVIEW . " align='middle'>",
14
-    'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt=" . _PRINT . ' title=' . _PRINT . " align='middle'>",
15
-    'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt=" . _PDF . ' title=' . _PDF . " align='middle'>",
16
-    'add'     => "<img src='" . $pathIcon16 . "/add.png' alt=" . _ADD . ' title=' . _ADD . " align='middle'>",
17
-    '0'       => "<img src='" . $pathIcon16 . "/0.png' alt=" . 0 . ' title=' . _OFF . " align='middle'>",
18
-    '1'       => "<img src='" . $pathIcon16 . "/1.png' alt=" . 1 . ' title=' . _ON . " align='middle'>",
9
+	'name'    => \mb_strtoupper($moduleDirName) . ' IconConfigurator',
10
+	'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . ' title=' . _EDIT . " align='middle'>",
11
+	'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt=" . _DELETE . ' title=' . _DELETE . " align='middle'>",
12
+	'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt=" . _CLONE . ' title=' . _CLONE . " align='middle'>",
13
+	'preview' => "<img src='" . $pathIcon16 . "/view.png' alt=" . _PREVIEW . ' title=' . _PREVIEW . " align='middle'>",
14
+	'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt=" . _PRINT . ' title=' . _PRINT . " align='middle'>",
15
+	'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt=" . _PDF . ' title=' . _PDF . " align='middle'>",
16
+	'add'     => "<img src='" . $pathIcon16 . "/add.png' alt=" . _ADD . ' title=' . _ADD . " align='middle'>",
17
+	'0'       => "<img src='" . $pathIcon16 . "/0.png' alt=" . 0 . ' title=' . _OFF . " align='middle'>",
18
+	'1'       => "<img src='" . $pathIcon16 . "/1.png' alt=" . 1 . ' title=' . _ON . " align='middle'>",
19 19
 ];
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@
 block discarded – undo
6 6
 $moduleDirName = \basename(\dirname(__DIR__));
7 7
 
8 8
 return [
9
-    'name'    => \mb_strtoupper($moduleDirName) . ' IconConfigurator',
10
-    'edit'    => "<img src='" . $pathIcon16 . "/edit.png'  alt=" . _EDIT . ' title=' . _EDIT . " align='middle'>",
11
-    'delete'  => "<img src='" . $pathIcon16 . "/delete.png' alt=" . _DELETE . ' title=' . _DELETE . " align='middle'>",
12
-    'clone'   => "<img src='" . $pathIcon16 . "/editcopy.png' alt=" . _CLONE . ' title=' . _CLONE . " align='middle'>",
13
-    'preview' => "<img src='" . $pathIcon16 . "/view.png' alt=" . _PREVIEW . ' title=' . _PREVIEW . " align='middle'>",
14
-    'print'   => "<img src='" . $pathIcon16 . "/printer.png' alt=" . _PRINT . ' title=' . _PRINT . " align='middle'>",
15
-    'pdf'     => "<img src='" . $pathIcon16 . "/pdf.png' alt=" . _PDF . ' title=' . _PDF . " align='middle'>",
16
-    'add'     => "<img src='" . $pathIcon16 . "/add.png' alt=" . _ADD . ' title=' . _ADD . " align='middle'>",
17
-    '0'       => "<img src='" . $pathIcon16 . "/0.png' alt=" . 0 . ' title=' . _OFF . " align='middle'>",
18
-    '1'       => "<img src='" . $pathIcon16 . "/1.png' alt=" . 1 . ' title=' . _ON . " align='middle'>",
9
+    'name'    => \mb_strtoupper($moduleDirName).' IconConfigurator',
10
+    'edit'    => "<img src='".$pathIcon16."/edit.png'  alt="._EDIT.' title='._EDIT." align='middle'>",
11
+    'delete'  => "<img src='".$pathIcon16."/delete.png' alt="._DELETE.' title='._DELETE." align='middle'>",
12
+    'clone'   => "<img src='".$pathIcon16."/editcopy.png' alt="._CLONE.' title='._CLONE." align='middle'>",
13
+    'preview' => "<img src='".$pathIcon16."/view.png' alt="._PREVIEW.' title='._PREVIEW." align='middle'>",
14
+    'print'   => "<img src='".$pathIcon16."/printer.png' alt="._PRINT.' title='._PRINT." align='middle'>",
15
+    'pdf'     => "<img src='".$pathIcon16."/pdf.png' alt="._PDF.' title='._PDF." align='middle'>",
16
+    'add'     => "<img src='".$pathIcon16."/add.png' alt="._ADD.' title='._ADD." align='middle'>",
17
+    '0'       => "<img src='".$pathIcon16."/0.png' alt=".0.' title='._OFF." align='middle'>",
18
+    '1'       => "<img src='".$pathIcon16."/1.png' alt=".1.' title='._ON." align='middle'>",
19 19
 ];
Please login to merge, or discard this patch.
config/config.php 2 patches
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -21,69 +21,69 @@
 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 . '/' . $moduleDirName . '/albums',
38
-    ],
39
-    'copyBlankFiles' => [
40
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
41
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
42
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
43
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/albums',
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 . '/' . $moduleDirName . '/albums',
38
+	],
39
+	'copyBlankFiles' => [
40
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
41
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
42
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
43
+		XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/albums',
44
+	],
45 45
 
46
-    'copyTestFolders' => [
47
-        [
48
-            XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/uploads',
49
-            XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
50
-        ],
51
-        //            [
52
-        //                XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/thumbs',
53
-        //                XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/thumbs',
54
-        //            ],
55
-    ],
46
+	'copyTestFolders' => [
47
+		[
48
+			XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/uploads',
49
+			XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
50
+		],
51
+		//            [
52
+		//                XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/thumbs',
53
+		//                XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/thumbs',
54
+		//            ],
55
+	],
56 56
 
57
-    'templateFolders' => [
58
-        '/templates/',
59
-        //            '/templates/blocks/',
60
-        //            '/templates/admin/'
61
-    ],
62
-    'oldFiles'        => [
63
-        '/class/request.php',
64
-        '/class/registry.php',
65
-        '/class/utilities.php',
66
-        '/class/util.php',
67
-        //            '/include/constants.php',
68
-        //            '/include/functions.php',
69
-        '/ajaxrating.txt',
70
-    ],
71
-    'oldFolders'      => [
72
-        '/images',
73
-        '/css',
74
-        '/js',
75
-        '/tcpdf',
76
-    ],
57
+	'templateFolders' => [
58
+		'/templates/',
59
+		//            '/templates/blocks/',
60
+		//            '/templates/admin/'
61
+	],
62
+	'oldFiles'        => [
63
+		'/class/request.php',
64
+		'/class/registry.php',
65
+		'/class/utilities.php',
66
+		'/class/util.php',
67
+		//            '/include/constants.php',
68
+		//            '/include/functions.php',
69
+		'/ajaxrating.txt',
70
+	],
71
+	'oldFolders'      => [
72
+		'/images',
73
+		'/css',
74
+		'/js',
75
+		'/tcpdf',
76
+	],
77 77
 
78
-    'renameTables'  => [//         'XX_archive'     => 'ZZZZ_archive',
79
-    ],
80
-    'renameColumns' => [//        'extcal_event' => ['from' => 'event_etablissement', 'to' => 'event_location'],
81
-    ],
82
-    'moduleStats'   => [
83
-        //            'totalcategories' => $helper->getHandler('Category')->getCategoriesCount(-1),
84
-        //            'totalitems'      => $helper->getHandler('Item')->getItemsCount(),
85
-        //            'totalsubmitted'  => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]),
86
-    ],
87
-    'modCopyright'  => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
78
+	'renameTables'  => [//         'XX_archive'     => 'ZZZZ_archive',
79
+	],
80
+	'renameColumns' => [//        'extcal_event' => ['from' => 'event_etablissement', 'to' => 'event_location'],
81
+	],
82
+	'moduleStats'   => [
83
+		//            'totalcategories' => $helper->getHandler('Category')->getCategoriesCount(-1),
84
+		//            'totalitems'      => $helper->getHandler('Item')->getItemsCount(),
85
+		//            'totalsubmitted'  => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]),
86
+	],
87
+	'modCopyright'  => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
88 88
                      <img src='" . Admin::iconUrl('xoopsmicrobutton.gif') . "' alt='XOOPS Project'></a>",
89 89
 ];
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -20,33 +20,33 @@  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',
37
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/albums',
34
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
35
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/category',
36
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots',
37
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/albums',
38 38
     ],
39 39
     'copyBlankFiles' => [
40
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
41
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/category',
42
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/screenshots',
43
-        XOOPS_UPLOAD_PATH . '/' . $moduleDirName . '/albums',
40
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
41
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/category',
42
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/screenshots',
43
+        XOOPS_UPLOAD_PATH.'/'.$moduleDirName.'/albums',
44 44
     ],
45 45
 
46 46
     'copyTestFolders' => [
47 47
         [
48
-            XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/uploads',
49
-            XOOPS_UPLOAD_PATH . '/' . $moduleDirName,
48
+            XOOPS_ROOT_PATH.'/modules/'.$moduleDirName.'/testdata/uploads',
49
+            XOOPS_UPLOAD_PATH.'/'.$moduleDirName,
50 50
         ],
51 51
         //            [
52 52
         //                XOOPS_ROOT_PATH . '/modules/' . $moduleDirName . '/testdata/thumbs',
@@ -85,5 +85,5 @@  discard block
 block discarded – undo
85 85
         //            'totalsubmitted'  => $helper->getHandler('Item')->getItemsCount(-1, [Constants::PUBLISHER_STATUS_SUBMITTED]),
86 86
     ],
87 87
     'modCopyright'  => "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
88
-                     <img src='" . Admin::iconUrl('xoopsmicrobutton.gif') . "' alt='XOOPS Project'></a>",
88
+                     <img src='" . Admin::iconUrl('xoopsmicrobutton.gif')."' alt='XOOPS Project'></a>",
89 89
 ];
Please login to merge, or discard this patch.
config/imageconfig.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -5,37 +5,37 @@
 block discarded – undo
5 5
 
6 6
 // extra module configs
7 7
 $modversion['config'][] = [
8
-    'name'        => 'imageConfigs',
9
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG',
10
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG_DSC',
11
-    'formtype'    => 'line_break',
12
-    'valuetype'   => 'textbox',
13
-    'default'     => 'head',
8
+	'name'        => 'imageConfigs',
9
+	'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG',
10
+	'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG_DSC',
11
+	'formtype'    => 'line_break',
12
+	'valuetype'   => 'textbox',
13
+	'default'     => 'head',
14 14
 ];
15 15
 
16 16
 $modversion['config'][] = [
17
-    'name'        => 'imageWidth',
18
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH',
19
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH_DSC',
20
-    'formtype'    => 'textbox',
21
-    'valuetype'   => 'int',
22
-    'default'     => 1200,
17
+	'name'        => 'imageWidth',
18
+	'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH',
19
+	'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH_DSC',
20
+	'formtype'    => 'textbox',
21
+	'valuetype'   => 'int',
22
+	'default'     => 1200,
23 23
 ]; // =1024/16
24 24
 
25 25
 $modversion['config'][] = [
26
-    'name'        => 'imageHeight',
27
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT',
28
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT_DSC',
29
-    'formtype'    => 'textbox',
30
-    'valuetype'   => 'int',
31
-    'default'     => 800,
26
+	'name'        => 'imageHeight',
27
+	'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT',
28
+	'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT_DSC',
29
+	'formtype'    => 'textbox',
30
+	'valuetype'   => 'int',
31
+	'default'     => 800,
32 32
 ]; // =768/16
33 33
 
34 34
 $modversion['config'][] = [
35
-    'name'        => 'imageUploadPath',
36
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH',
37
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH_DSC',
38
-    'formtype'    => 'textbox',
39
-    'valuetype'   => 'text',
40
-    'default'     => 'uploads/' . $modversion['dirname'] . '/images',
35
+	'name'        => 'imageUploadPath',
36
+	'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH',
37
+	'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH_DSC',
38
+	'formtype'    => 'textbox',
39
+	'valuetype'   => 'text',
40
+	'default'     => 'uploads/' . $modversion['dirname'] . '/images',
41 41
 ];
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 // extra module configs
7 7
 $modversion['config'][] = [
8 8
     'name'        => 'imageConfigs',
9
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG',
10
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_CONFIG_DSC',
9
+    'title'       => 'CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG',
10
+    'description' => 'CO_'.$moduleDirNameUpper.'_'.'IMAGE_CONFIG_DSC',
11 11
     'formtype'    => 'line_break',
12 12
     'valuetype'   => 'textbox',
13 13
     'default'     => 'head',
@@ -15,8 +15,8 @@  discard block
 block discarded – undo
15 15
 
16 16
 $modversion['config'][] = [
17 17
     'name'        => 'imageWidth',
18
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH',
19
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_WIDTH_DSC',
18
+    'title'       => 'CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH',
19
+    'description' => 'CO_'.$moduleDirNameUpper.'_'.'IMAGE_WIDTH_DSC',
20 20
     'formtype'    => 'textbox',
21 21
     'valuetype'   => 'int',
22 22
     'default'     => 1200,
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 
25 25
 $modversion['config'][] = [
26 26
     'name'        => 'imageHeight',
27
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT',
28
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_HEIGHT_DSC',
27
+    'title'       => 'CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT',
28
+    'description' => 'CO_'.$moduleDirNameUpper.'_'.'IMAGE_HEIGHT_DSC',
29 29
     'formtype'    => 'textbox',
30 30
     'valuetype'   => 'int',
31 31
     'default'     => 800,
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
 
34 34
 $modversion['config'][] = [
35 35
     'name'        => 'imageUploadPath',
36
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH',
37
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'IMAGE_UPLOAD_PATH_DSC',
36
+    'title'       => 'CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH',
37
+    'description' => 'CO_'.$moduleDirNameUpper.'_'.'IMAGE_UPLOAD_PATH_DSC',
38 38
     'formtype'    => 'textbox',
39 39
     'valuetype'   => 'text',
40
-    'default'     => 'uploads/' . $modversion['dirname'] . '/images',
40
+    'default'     => 'uploads/'.$modversion['dirname'].'/images',
41 41
 ];
Please login to merge, or discard this patch.