Passed
Pull Request — master (#2)
by Michael
07:10 queued 03:28
created
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.
search.php 2 patches
Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -27,111 +27,111 @@
 block discarded – undo
27 27
 $utf8mapHandler = Helper::getInstance()->getHandler('Utf8map');
28 28
 
29 29
 switch ($op) {
30
-    default:
31
-    case 'search':
32
-        $url = $songsHandler->getSearchURL();
33
-        if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
34
-            header('HTTP/1.1 301 Moved Permanently');
35
-            header('Location: ' . $url);
36
-            exit(0);
37
-        }
30
+	default:
31
+	case 'search':
32
+		$url = $songsHandler->getSearchURL();
33
+		if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
34
+			header('HTTP/1.1 301 Moved Permanently');
35
+			header('Location: ' . $url);
36
+			exit(0);
37
+		}
38 38
 
39
-        switch ($fct) {
40
-            default:
41
-            case 'titleandlyrics':
42
-                $criteria = new \CriteriaCompo();
43
-                foreach (explode(' ', $value) as $keyword) {
44
-                    $criteria->add(new \Criteria('title', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
45
-                    $criteria->add(new \Criteria('lyrics', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
46
-                }
47
-                break;
48
-            case 'albums':
49
-                $criteria = new \CriteriaCompo();
50
-                foreach (explode(' ', $value) as $keyword) {
51
-                    $criteria->add(new \Criteria('title', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
52
-                }
53
-                $albums   = $albumsHandler->getObjects($criteria, true);
54
-                $criteria = new \CriteriaCompo();
55
-                foreach ($albums as $abid => $album) {
56
-                    $criteria->add(new \Criteria('abid', $abid), 'OR');
57
-                }
58
-                break;
59
-            case 'artists':
60
-                $criteria = new \CriteriaCompo();
61
-                foreach (explode(' ', $value) as $keyword) {
62
-                    $criteria->add(new \Criteria('name', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
63
-                }
64
-                $artists  = $artistsHandler->getObjects($criteria, true);
65
-                $criteria = new \CriteriaCompo();
66
-                if (is_array($artists)) {
67
-                    foreach ($artists as $aid => $artist) {
68
-                        $criteria->add(new \Criteria('aids', '%"' . $aid . '"%', 'LIKE'), 'OR');
69
-                    }
70
-                }
71
-                break;
72
-            case 'lyrics':
73
-                $criteria = new \CriteriaCompo();
74
-                foreach (explode(' ', $value) as $keyword) {
75
-                    $criteria->add(new \Criteria('lyrics', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
76
-                }
77
-                break;
78
-            case 'title':
79
-                $criteria = new \CriteriaCompo();
80
-                foreach (explode(' ', $value) as $keyword) {
81
-                    $criteria->add(new \Criteria('title', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
82
-                }
83
-                break;
84
-        }
39
+		switch ($fct) {
40
+			default:
41
+			case 'titleandlyrics':
42
+				$criteria = new \CriteriaCompo();
43
+				foreach (explode(' ', $value) as $keyword) {
44
+					$criteria->add(new \Criteria('title', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
45
+					$criteria->add(new \Criteria('lyrics', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
46
+				}
47
+				break;
48
+			case 'albums':
49
+				$criteria = new \CriteriaCompo();
50
+				foreach (explode(' ', $value) as $keyword) {
51
+					$criteria->add(new \Criteria('title', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
52
+				}
53
+				$albums   = $albumsHandler->getObjects($criteria, true);
54
+				$criteria = new \CriteriaCompo();
55
+				foreach ($albums as $abid => $album) {
56
+					$criteria->add(new \Criteria('abid', $abid), 'OR');
57
+				}
58
+				break;
59
+			case 'artists':
60
+				$criteria = new \CriteriaCompo();
61
+				foreach (explode(' ', $value) as $keyword) {
62
+					$criteria->add(new \Criteria('name', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
63
+				}
64
+				$artists  = $artistsHandler->getObjects($criteria, true);
65
+				$criteria = new \CriteriaCompo();
66
+				if (is_array($artists)) {
67
+					foreach ($artists as $aid => $artist) {
68
+						$criteria->add(new \Criteria('aids', '%"' . $aid . '"%', 'LIKE'), 'OR');
69
+					}
70
+				}
71
+				break;
72
+			case 'lyrics':
73
+				$criteria = new \CriteriaCompo();
74
+				foreach (explode(' ', $value) as $keyword) {
75
+					$criteria->add(new \Criteria('lyrics', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
76
+				}
77
+				break;
78
+			case 'title':
79
+				$criteria = new \CriteriaCompo();
80
+				foreach (explode(' ', $value) as $keyword) {
81
+					$criteria->add(new \Criteria('title', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
82
+				}
83
+				break;
84
+		}
85 85
 
86
-        if (0 != $gid && $GLOBALS['songlistModuleConfig']['genre']) {
87
-            $criteria->add(new \Criteria('gids', '%"' . $gid . '"%', 'LIKE'));
88
-        }
86
+		if (0 != $gid && $GLOBALS['songlistModuleConfig']['genre']) {
87
+			$criteria->add(new \Criteria('gids', '%"' . $gid . '"%', 'LIKE'));
88
+		}
89 89
 
90
-        if (0 != $vcid && $GLOBALS['songlistModuleConfig']['voice']) {
91
-            $criteria->add(new \Criteria('vcid', $vcid));
92
-        }
90
+		if (0 != $vcid && $GLOBALS['songlistModuleConfig']['voice']) {
91
+			$criteria->add(new \Criteria('vcid', $vcid));
92
+		}
93 93
 
94
-        if (0 != ($_GET['cid'] ?? $cid)) {
95
-            $criteria->add(new \Criteria('cid', ($_GET['cid'] ?? $cid)));
96
-        }
94
+		if (0 != ($_GET['cid'] ?? $cid)) {
95
+			$criteria->add(new \Criteria('cid', ($_GET['cid'] ?? $cid)));
96
+		}
97 97
 
98
-        $pagenav = new \XoopsPageNav($songsHandler->getCount($criteria), $limit, $start, 'start', "?op=$op&fct=$fct&gid=$gid&vcid=$vcid&value=$value&limit=$limit");
98
+		$pagenav = new \XoopsPageNav($songsHandler->getCount($criteria), $limit, $start, 'start', "?op=$op&fct=$fct&gid=$gid&vcid=$vcid&value=$value&limit=$limit");
99 99
 
100
-        $criteria->setLimit($limit);
101
-        $criteria->setStart($start);
100
+		$criteria->setLimit($limit);
101
+		$criteria->setStart($start);
102 102
 
103
-        $songs = $songsHandler->getObjects($criteria, false);
103
+		$songs = $songsHandler->getObjects($criteria, false);
104 104
 
105
-        $GLOBALS['xoopsOption']['template_main'] = 'songlist_search_index.tpl';
106
-        require_once $GLOBALS['xoops']->path('/header.php');
107
-        if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
108
-            $GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
109
-            $GLOBALS['loaded_jquery'] = true;
110
-        }
111
-        $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
112
-        $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
113
-        $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
114
-        foreach ($songs as $song) {
115
-            $GLOBALS['xoopsTpl']->append('results', $song->toArray(true));
116
-        }
117
-        $GLOBALS['xoopsTpl']->assign('songs', true);
118
-        $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
119
-        $GLOBALS['xoopsTpl']->assign('category_element', $category_element->render());
120
-        $GLOBALS['xoopsTpl']->assign('genre_element', $genre_element->render());
121
-        $GLOBALS['xoopsTpl']->assign('voice_element', $voice_element->render());
122
-        $GLOBALS['xoopsTpl']->assign('cid', $_SESSION['cid']);
123
-        $GLOBALS['xoopsTpl']->assign('uri', $_SERVER['REQUEST_URI']);
124
-        require_once $GLOBALS['xoops']->path('/footer.php');
125
-        break;
126
-    case 'category':
127
-        switch ($fct) {
128
-            default:
129
-            case 'set':
130
-                $_SESSION['cid'] = $id;
131
-                break;
132
-            case 'home':
133
-                unset($_SESSION['cid']);
134
-                break;
135
-        }
136
-        redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_CATEGORYCHANGED);
105
+		$GLOBALS['xoopsOption']['template_main'] = 'songlist_search_index.tpl';
106
+		require_once $GLOBALS['xoops']->path('/header.php');
107
+		if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
108
+			$GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
109
+			$GLOBALS['loaded_jquery'] = true;
110
+		}
111
+		$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
112
+		$GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
113
+		$GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
114
+		foreach ($songs as $song) {
115
+			$GLOBALS['xoopsTpl']->append('results', $song->toArray(true));
116
+		}
117
+		$GLOBALS['xoopsTpl']->assign('songs', true);
118
+		$GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
119
+		$GLOBALS['xoopsTpl']->assign('category_element', $category_element->render());
120
+		$GLOBALS['xoopsTpl']->assign('genre_element', $genre_element->render());
121
+		$GLOBALS['xoopsTpl']->assign('voice_element', $voice_element->render());
122
+		$GLOBALS['xoopsTpl']->assign('cid', $_SESSION['cid']);
123
+		$GLOBALS['xoopsTpl']->assign('uri', $_SERVER['REQUEST_URI']);
124
+		require_once $GLOBALS['xoops']->path('/footer.php');
125
+		break;
126
+	case 'category':
127
+		switch ($fct) {
128
+			default:
129
+			case 'set':
130
+				$_SESSION['cid'] = $id;
131
+				break;
132
+			case 'home':
133
+				unset($_SESSION['cid']);
134
+				break;
135
+		}
136
+		redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_CATEGORYCHANGED);
137 137
 }
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 use XoopsModules\Songlist\SongsHandler;
10 10
 use XoopsModules\Songlist\Utf8mapHandler;
11 11
 
12
-require_once __DIR__ . '/header.php';
12
+require_once __DIR__.'/header.php';
13 13
 
14 14
 global $file, $op, $fct, $id, $value, $gid, $cid, $start, $limit, $singer;
15 15
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         $url = $songsHandler->getSearchURL();
33 33
         if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
34 34
             header('HTTP/1.1 301 Moved Permanently');
35
-            header('Location: ' . $url);
35
+            header('Location: '.$url);
36 36
             exit(0);
37 37
         }
38 38
 
@@ -41,14 +41,14 @@  discard block
 block discarded – undo
41 41
             case 'titleandlyrics':
42 42
                 $criteria = new \CriteriaCompo();
43 43
                 foreach (explode(' ', $value) as $keyword) {
44
-                    $criteria->add(new \Criteria('title', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
45
-                    $criteria->add(new \Criteria('lyrics', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
44
+                    $criteria->add(new \Criteria('title', '%'.$utf8mapHandler->convert($keyword).'%', 'LIKE'));
45
+                    $criteria->add(new \Criteria('lyrics', '%'.$utf8mapHandler->convert($keyword).'%', 'LIKE'));
46 46
                 }
47 47
                 break;
48 48
             case 'albums':
49 49
                 $criteria = new \CriteriaCompo();
50 50
                 foreach (explode(' ', $value) as $keyword) {
51
-                    $criteria->add(new \Criteria('title', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
51
+                    $criteria->add(new \Criteria('title', '%'.$utf8mapHandler->convert($keyword).'%', 'LIKE'));
52 52
                 }
53 53
                 $albums   = $albumsHandler->getObjects($criteria, true);
54 54
                 $criteria = new \CriteriaCompo();
@@ -59,39 +59,39 @@  discard block
 block discarded – undo
59 59
             case 'artists':
60 60
                 $criteria = new \CriteriaCompo();
61 61
                 foreach (explode(' ', $value) as $keyword) {
62
-                    $criteria->add(new \Criteria('name', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
62
+                    $criteria->add(new \Criteria('name', '%'.$utf8mapHandler->convert($keyword).'%', 'LIKE'));
63 63
                 }
64 64
                 $artists  = $artistsHandler->getObjects($criteria, true);
65 65
                 $criteria = new \CriteriaCompo();
66 66
                 if (is_array($artists)) {
67 67
                     foreach ($artists as $aid => $artist) {
68
-                        $criteria->add(new \Criteria('aids', '%"' . $aid . '"%', 'LIKE'), 'OR');
68
+                        $criteria->add(new \Criteria('aids', '%"'.$aid.'"%', 'LIKE'), 'OR');
69 69
                     }
70 70
                 }
71 71
                 break;
72 72
             case 'lyrics':
73 73
                 $criteria = new \CriteriaCompo();
74 74
                 foreach (explode(' ', $value) as $keyword) {
75
-                    $criteria->add(new \Criteria('lyrics', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
75
+                    $criteria->add(new \Criteria('lyrics', '%'.$utf8mapHandler->convert($keyword).'%', 'LIKE'));
76 76
                 }
77 77
                 break;
78 78
             case 'title':
79 79
                 $criteria = new \CriteriaCompo();
80 80
                 foreach (explode(' ', $value) as $keyword) {
81
-                    $criteria->add(new \Criteria('title', '%' . $utf8mapHandler->convert($keyword) . '%', 'LIKE'));
81
+                    $criteria->add(new \Criteria('title', '%'.$utf8mapHandler->convert($keyword).'%', 'LIKE'));
82 82
                 }
83 83
                 break;
84 84
         }
85 85
 
86
-        if (0 != $gid && $GLOBALS['songlistModuleConfig']['genre']) {
87
-            $criteria->add(new \Criteria('gids', '%"' . $gid . '"%', 'LIKE'));
86
+        if (0!=$gid && $GLOBALS['songlistModuleConfig']['genre']) {
87
+            $criteria->add(new \Criteria('gids', '%"'.$gid.'"%', 'LIKE'));
88 88
         }
89 89
 
90
-        if (0 != $vcid && $GLOBALS['songlistModuleConfig']['voice']) {
90
+        if (0!=$vcid && $GLOBALS['songlistModuleConfig']['voice']) {
91 91
             $criteria->add(new \Criteria('vcid', $vcid));
92 92
         }
93 93
 
94
-        if (0 != ($_GET['cid'] ?? $cid)) {
94
+        if (0!=($_GET['cid'] ?? $cid)) {
95 95
             $criteria->add(new \Criteria('cid', ($_GET['cid'] ?? $cid)));
96 96
         }
97 97
 
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
         $GLOBALS['xoopsOption']['template_main'] = 'songlist_search_index.tpl';
106 106
         require_once $GLOBALS['xoops']->path('/header.php');
107 107
         if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
108
-            $GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
108
+            $GLOBALS['xoTheme']->addScript(XOOPS_URL._MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
109 109
             $GLOBALS['loaded_jquery'] = true;
110 110
         }
111
-        $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
111
+        $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL._MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
112 112
         $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
113 113
         $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
114 114
         foreach ($songs as $song) {
@@ -133,5 +133,5 @@  discard block
 block discarded – undo
133 133
                 unset($_SESSION['cid']);
134 134
                 break;
135 135
         }
136
-        redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_CATEGORYCHANGED);
136
+        redirect_header($_SERVER['SCRIPT_NAME']."?op=item&fct=list&id=$id&value=$value&start=$start&limit=$limit", 10, _MD_SONGLIST_MSG_CATEGORYCHANGED);
137 137
 }
Please login to merge, or discard this patch.