Passed
Push — master ( ed55b2...84c1d9 )
by Michael
12:36 queued 12s
created
blocks/songlist_popular_genre.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
  */
9 9
 function b_songlist_popular_genre_show($options): ?array
10 10
 {
11
-    xoops_loadLanguage('blocks', 'songlist');
12
-    $handler = Helper::getInstance()->getHandler('Genre');
13
-    $objects = $handler->getTop(1);
14
-    if (is_object($objects[0])) {
15
-        return $objects[0]->toArray(true);
16
-    }
11
+	xoops_loadLanguage('blocks', 'songlist');
12
+	$handler = Helper::getInstance()->getHandler('Genre');
13
+	$objects = $handler->getTop(1);
14
+	if (is_object($objects[0])) {
15
+		return $objects[0]->toArray(true);
16
+	}
17 17
 
18
-    return null;
18
+	return null;
19 19
 }
20 20
 
21 21
 /**
Please login to merge, or discard this patch.
blocks/songlist_popular_song.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
  */
9 9
 function b_songlist_popular_song_show($options): ?array
10 10
 {
11
-    xoops_loadLanguage('blocks', 'songlist');
12
-    $handler = Helper::getInstance()->getHandler('Songs');
13
-    $objects = $handler->getTop(1);
14
-    if (is_object($objects[0])) {
15
-        return $objects[0]->toArray(true);
16
-    }
11
+	xoops_loadLanguage('blocks', 'songlist');
12
+	$handler = Helper::getInstance()->getHandler('Songs');
13
+	$objects = $handler->getTop(1);
14
+	if (is_object($objects[0])) {
15
+		return $objects[0]->toArray(true);
16
+	}
17 17
 
18
-    return null;
18
+	return null;
19 19
 }
20 20
 
21 21
 /**
Please login to merge, or discard this patch.
blocks/songlist_popular_genres.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@  discard block
 block discarded – undo
8 8
  */
9 9
 function b_songlist_popular_genres_show($options): ?array
10 10
 {
11
-    xoops_loadLanguage('blocks', 'songlist');
12
-    $handler = Helper::getInstance()->getHandler('Genre');
13
-    $objects = $handler->getTop($options[0]);
14
-    if (count($objects) > 0) {
15
-        $ret = [];
16
-        foreach ($objects as $id => $object) {
17
-            $ret[$id] = $object->toArray(true);
18
-        }
11
+	xoops_loadLanguage('blocks', 'songlist');
12
+	$handler = Helper::getInstance()->getHandler('Genre');
13
+	$objects = $handler->getTop($options[0]);
14
+	if (count($objects) > 0) {
15
+		$ret = [];
16
+		foreach ($objects as $id => $object) {
17
+			$ret[$id] = $object->toArray(true);
18
+		}
19 19
 
20
-        return $ret;
21
-    }
20
+		return $ret;
21
+	}
22 22
 
23
-    return null;
23
+	return null;
24 24
 }
25 25
 
26 26
 /**
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
  */
30 30
 function b_songlist_popular_genres_edit($options): string
31 31
 {
32
-    xoops_load('XoopsFormLoader');
33
-    xoops_loadLanguage('blocks', 'songlist');
34
-    $num = new \XoopsformText('', 'options[0]', 10, 10, $options[0]);
32
+	xoops_load('XoopsFormLoader');
33
+	xoops_loadLanguage('blocks', 'songlist');
34
+	$num = new \XoopsformText('', 'options[0]', 10, 10, $options[0]);
35 35
 
36
-    return _BL_SONGLIST_NUMBEROFITEMS . $num->render();
36
+	return _BL_SONGLIST_NUMBEROFITEMS . $num->render();
37 37
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     xoops_loadLanguage('blocks', 'songlist');
12 12
     $handler = Helper::getInstance()->getHandler('Genre');
13 13
     $objects = $handler->getTop($options[0]);
14
-    if (count($objects) > 0) {
14
+    if (count($objects)>0) {
15 15
         $ret = [];
16 16
         foreach ($objects as $id => $object) {
17 17
             $ret[$id] = $object->toArray(true);
@@ -33,5 +33,5 @@  discard block
 block discarded – undo
33 33
     xoops_loadLanguage('blocks', 'songlist');
34 34
     $num = new \XoopsformText('', 'options[0]', 10, 10, $options[0]);
35 35
 
36
-    return _BL_SONGLIST_NUMBEROFITEMS . $num->render();
36
+    return _BL_SONGLIST_NUMBEROFITEMS.$num->render();
37 37
 }
Please login to merge, or discard this patch.
blocks/songlist_popular_album.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
  */
9 9
 function b_songlist_popular_album_show($options): ?array
10 10
 {
11
-    xoops_loadLanguage('blocks', 'songlist');
12
-    $handler = Helper::getInstance()->getHandler('Albums');
13
-    $objects = $handler->getTop(1);
14
-    if (is_object($objects[0])) {
15
-        return $objects[0]->toArray(true);
16
-    }
11
+	xoops_loadLanguage('blocks', 'songlist');
12
+	$handler = Helper::getInstance()->getHandler('Albums');
13
+	$objects = $handler->getTop(1);
14
+	if (is_object($objects[0])) {
15
+		return $objects[0]->toArray(true);
16
+	}
17 17
 
18
-    return null;
18
+	return null;
19 19
 }
20 20
 
21 21
 /**
Please login to merge, or discard this patch.
blocks/songlist_popular_songs.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@  discard block
 block discarded – undo
8 8
  */
9 9
 function b_songlist_popular_songs_show($options): ?array
10 10
 {
11
-    xoops_loadLanguage('blocks', 'songlist');
12
-    $handler = Helper::getInstance()->getHandler('Songs');
13
-    $objects = $handler->getTop($options[0]);
14
-    if (count($objects) > 0) {
15
-        $ret = [];
16
-        foreach ($objects as $id => $object) {
17
-            $ret[$id] = $object->toArray(true);
18
-        }
11
+	xoops_loadLanguage('blocks', 'songlist');
12
+	$handler = Helper::getInstance()->getHandler('Songs');
13
+	$objects = $handler->getTop($options[0]);
14
+	if (count($objects) > 0) {
15
+		$ret = [];
16
+		foreach ($objects as $id => $object) {
17
+			$ret[$id] = $object->toArray(true);
18
+		}
19 19
 
20
-        return $ret;
21
-    }
20
+		return $ret;
21
+	}
22 22
 
23
-    return null;
23
+	return null;
24 24
 }
25 25
 
26 26
 /**
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
  */
30 30
 function b_songlist_popular_songs_edit($options): string
31 31
 {
32
-    xoops_load('XoopsFormLoader');
33
-    xoops_loadLanguage('blocks', 'songlist');
34
-    $num = new \XoopsformText('', 'options[0]', 10, 10, $options[0]);
32
+	xoops_load('XoopsFormLoader');
33
+	xoops_loadLanguage('blocks', 'songlist');
34
+	$num = new \XoopsformText('', 'options[0]', 10, 10, $options[0]);
35 35
 
36
-    return _BL_SONGLIST_NUMBEROFITEMS . $num->render();
36
+	return _BL_SONGLIST_NUMBEROFITEMS . $num->render();
37 37
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     xoops_loadLanguage('blocks', 'songlist');
12 12
     $handler = Helper::getInstance()->getHandler('Songs');
13 13
     $objects = $handler->getTop($options[0]);
14
-    if (count($objects) > 0) {
14
+    if (count($objects)>0) {
15 15
         $ret = [];
16 16
         foreach ($objects as $id => $object) {
17 17
             $ret[$id] = $object->toArray(true);
@@ -33,5 +33,5 @@  discard block
 block discarded – undo
33 33
     xoops_loadLanguage('blocks', 'songlist');
34 34
     $num = new \XoopsformText('', 'options[0]', 10, 10, $options[0]);
35 35
 
36
-    return _BL_SONGLIST_NUMBEROFITEMS . $num->render();
36
+    return _BL_SONGLIST_NUMBEROFITEMS.$num->render();
37 37
 }
Please login to merge, or discard this patch.
blocks/songlist_popular_artists.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@  discard block
 block discarded – undo
8 8
  */
9 9
 function b_songlist_popular_artists_show($options): ?array
10 10
 {
11
-    xoops_loadLanguage('blocks', 'songlist');
12
-    $handler = Helper::getInstance()->getHandler('Artists');
13
-    $objects = $handler->getTop($options[0]);
14
-    if (count($objects) > 0) {
15
-        $ret = [];
16
-        foreach ($objects as $id => $object) {
17
-            $ret[$id] = $object->toArray(true); //TODO mb why do we need toArray()?
18
-        }
11
+	xoops_loadLanguage('blocks', 'songlist');
12
+	$handler = Helper::getInstance()->getHandler('Artists');
13
+	$objects = $handler->getTop($options[0]);
14
+	if (count($objects) > 0) {
15
+		$ret = [];
16
+		foreach ($objects as $id => $object) {
17
+			$ret[$id] = $object->toArray(true); //TODO mb why do we need toArray()?
18
+		}
19 19
 
20
-        return $ret;
21
-    }
20
+		return $ret;
21
+	}
22 22
 
23
-    return null;
23
+	return null;
24 24
 }
25 25
 
26 26
 /**
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
  */
30 30
 function b_songlist_popular_artists_edit($options): string
31 31
 {
32
-    xoops_load('XoopsFormLoader');
33
-    xoops_loadLanguage('blocks', 'songlist');
34
-    $num = new \XoopsformText('', 'options[0]', 10, 10, $options[0]);
32
+	xoops_load('XoopsFormLoader');
33
+	xoops_loadLanguage('blocks', 'songlist');
34
+	$num = new \XoopsformText('', 'options[0]', 10, 10, $options[0]);
35 35
 
36
-    return _BL_SONGLIST_NUMBEROFITEMS . $num->render();
36
+	return _BL_SONGLIST_NUMBEROFITEMS . $num->render();
37 37
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     xoops_loadLanguage('blocks', 'songlist');
12 12
     $handler = Helper::getInstance()->getHandler('Artists');
13 13
     $objects = $handler->getTop($options[0]);
14
-    if (count($objects) > 0) {
14
+    if (count($objects)>0) {
15 15
         $ret = [];
16 16
         foreach ($objects as $id => $object) {
17 17
             $ret[$id] = $object->toArray(true); //TODO mb why do we need toArray()?
@@ -33,5 +33,5 @@  discard block
 block discarded – undo
33 33
     xoops_loadLanguage('blocks', 'songlist');
34 34
     $num = new \XoopsformText('', 'options[0]', 10, 10, $options[0]);
35 35
 
36
-    return _BL_SONGLIST_NUMBEROFITEMS . $num->render();
36
+    return _BL_SONGLIST_NUMBEROFITEMS.$num->render();
37 37
 }
Please login to merge, or discard this patch.
artists.php 2 patches
Indentation   +191 added lines, -191 removed lines patch added patch discarded remove patch
@@ -13,14 +13,14 @@  discard block
 block discarded – undo
13 13
 $criteria_cat    = new \CriteriaCompo();
14 14
 $cids            = $categoryHandler->GetCatAndSubCat($_SESSION['cid']);
15 15
 if ($_SESSION['cid'] > 0) {
16
-    $cids[$_SESSION['cid']] = $_SESSION['cid'];
16
+	$cids[$_SESSION['cid']] = $_SESSION['cid'];
17 17
 }
18 18
 if (count($cids) > 0 && 0 != $_SESSION['cid']) {
19
-    foreach ($cids as $cid) {
20
-        $criteria_cat->add(new \Criteria('`cids`', '%"' . $cid . '"%', 'LIKE'), 'OR');
21
-    }
19
+	foreach ($cids as $cid) {
20
+		$criteria_cat->add(new \Criteria('`cids`', '%"' . $cid . '"%', 'LIKE'), 'OR');
21
+	}
22 22
 } else {
23
-    $criteria_cat->add(new \Criteria(''), 'OR');
23
+	$criteria_cat->add(new \Criteria(''), 'OR');
24 24
 }
25 25
 
26 26
 $criteria_cat->setSort('created');
@@ -35,197 +35,197 @@  discard block
 block discarded – undo
35 35
 $col = 1;
36 36
 $row = 1;
37 37
 foreach ($categories as $category) {
38
-    $cat[$row][$col]          = $category->toArray(true);
39
-    $cat[$row][$col]['width'] = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
40
-    ++$col;
41
-    if ($col > $GLOBALS['songlistModuleConfig']['cols']) {
42
-        ++$row;
43
-        $col = 1;
44
-    }
38
+	$cat[$row][$col]          = $category->toArray(true);
39
+	$cat[$row][$col]['width'] = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
40
+	++$col;
41
+	if ($col > $GLOBALS['songlistModuleConfig']['cols']) {
42
+		++$row;
43
+		$col = 1;
44
+	}
45 45
 }
46 46
 if (1 != $col) {
47
-    $col--;
48
-    for ($j = $col; $j <= $GLOBALS['songlistModuleConfig']['cols']; ++$j) {
49
-        $cat[$row][$j][$categoryHandler->keyName] = 0;
50
-        $cat[$row][$j]['width']                   = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
51
-    }
47
+	$col--;
48
+	for ($j = $col; $j <= $GLOBALS['songlistModuleConfig']['cols']; ++$j) {
49
+		$cat[$row][$j][$categoryHandler->keyName] = 0;
50
+		$cat[$row][$j]['width']                   = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
51
+	}
52 52
 }
53 53
 
54 54
 /** @var ArtistsHandler $artistsHandler */
55 55
 $artistsHandler = Helper::getInstance()->getHandler('Artists');
56 56
 switch ((string)$GLOBALS['op']) {
57
-    default:
58
-    case 'item':
59
-        switch ($fct) {
60
-            default:
61
-            case 'list':
62
-                $pagenav = new \XoopsPageNav($artistsHandler->getCount($criteria_cat), $limit, $start, 'start', "op=$op&fct=$fct&id=$id&value=$value&limit=$limit");
63
-
64
-                $criteria_cat->setLimit($limit);
65
-                $criteria_cat->setStart($start);
66
-
67
-                $artists = $artistsHandler->getObjects($criteria_cat, false);
68
-
69
-                $ret = [];
70
-                $col = 1;
71
-                $row = 1;
72
-                foreach ($artists as $artist) {
73
-                    $ret[$row][$col]          = $artist->toArray(true);
74
-                    $ret[$row][$col]['width'] = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
75
-                    ++$col;
76
-                    if ($col > $GLOBALS['songlistModuleConfig']['cols']) {
77
-                        ++$row;
78
-                        $col = 1;
79
-                    }
80
-                }
81
-                if (1 != $col) {
82
-                    for ($j = $col; $j <= $GLOBALS['songlistModuleConfig']['cols']; ++$j) {
83
-                        $ret[$row][$j][$artistsHandler->keyName] = 0;
84
-                        $ret[$row][$j]['width']                  = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
85
-                    }
86
-                }
87
-
88
-                $url = $artistsHandler->getURL(false);
89
-                if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
90
-                    header('HTTP/1.1 301 Moved Permanently');
91
-                    header('Location: ' . $url);
92
-                    exit(0);
93
-                }
94
-
95
-                $GLOBALS['xoopsOption']['template_main'] = 'songlist_artists_index.tpl';
96
-                require $GLOBALS['xoops']->path('/header.php');
97
-                if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
98
-                    $GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
99
-                    $GLOBALS['loaded_jquery'] = true;
100
-                }
101
-                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
102
-                $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
103
-                $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
104
-                $GLOBALS['xoopsTpl']->assign('results', $ret);
105
-                $GLOBALS['xoopsTpl']->assign('categories', $cat);
106
-                $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
107
-                $GLOBALS['xoopsTpl']->assign('cid', $_SESSION['cid']);
108
-                if (0 != $_SESSION['cid']) {
109
-                    $category = $categoryHandler->get($_SESSION['cid']);
110
-                    $GLOBALS['xoopsTpl']->assign('category', $category->toArray(true));
111
-                }
112
-                $GLOBALS['xoopsTpl']->assign('uri', $_SERVER['REQUEST_URI']);
113
-                require $GLOBALS['xoops']->path('/footer.php');
114
-                break;
115
-            case 'item':
116
-                $artist = $artistsHandler->get($id);
117
-
118
-                $url = $artist->getURL(true);
119
-                if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
120
-                    header('HTTP/1.1 301 Moved Permanently');
121
-                    header('Location: ' . $url);
122
-                    exit(0);
123
-                }
124
-
125
-                $GLOBALS['xoopsOption']['template_main'] = 'songlist_artists_item.tpl';
126
-                require $GLOBALS['xoops']->path('/header.php');
127
-                if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
128
-                    $GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
129
-                    $GLOBALS['loaded_jquery'] = true;
130
-                }
131
-                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
132
-                $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
133
-                $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
134
-                $GLOBALS['xoopsTpl']->assign('songs', false);
135
-                $GLOBALS['xoopsTpl']->assign('artist', $artist->toArray(true));
136
-                $GLOBALS['xoopsTpl']->assign('categories', $cat);
137
-                $GLOBALS['xoopsTpl']->assign('uri', $_SERVER['REQUEST_URI']);
138
-                require $GLOBALS['xoops']->path('/footer.php');
139
-                break;
140
-        }
141
-        break;
142
-    case 'browseby':
143
-        switch ($fct) {
144
-            default:
145
-            case 'title':
146
-            case 'lyrics':
147
-            case 'artist':
148
-            case 'album':
149
-                $browse_criteria = new \CriteriaCompo();
150
-                switch ($value) {
151
-                    case '0':
152
-                        for ($u = 0; $u < 10; ++$u) {
153
-                            $browse_criteria->add(new \Criteria('name', $u . '%', 'LIKE'), 'OR');
154
-                        }
155
-                        break;
156
-                    default:
157
-                        $browse_criteria->add(new \Criteria('name', \mb_strtoupper($value) . '%', 'LIKE'), 'OR');
158
-                        $browse_criteria->add(new \Criteria('name', \mb_strtolower($value) . '%', 'LIKE'), 'OR');
159
-                        break;
160
-                }
161
-                $criteria = new \CriteriaCompo($criteria_cat, 'AND');
162
-                $criteria->add($browse_criteria);
163
-        }
164
-
165
-        $pagenav = new \XoopsPageNav($artistsHandler->getCount($criteria), $limit, $start, 'start', "op={$GLOBALS['op']}&fct=$fct&id=$id&value=$value&limit=$limit");
166
-
167
-        $criteria->setLimit($limit);
168
-        $criteria->setStart($start);
169
-
170
-        $artists = $artistsHandler->getObjects($criteria, false);
171
-
172
-        $ret = [];
173
-        $col = 1;
174
-        $row = 1;
175
-        foreach ($artists as $artist) {
176
-            $ret[$row][$col]          = $artist->toArray(true);
177
-            $ret[$row][$col]['width'] = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
178
-            ++$col;
179
-            if ($col > $GLOBALS['songlistModuleConfig']['cols']) {
180
-                ++$row;
181
-                $col = 1;
182
-            }
183
-        }
184
-        if (1 != $col) {
185
-            $col--;
186
-            for ($j = $col; $j <= $GLOBALS['songlistModuleConfig']['cols']; ++$j) {
187
-                $ret[$row][$j][$artistsHandler->keyName] = 0;
188
-                $ret[$row][$j]['width']                  = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
189
-            }
190
-        }
191
-
192
-        $url = $artistsHandler->getURL(false);
193
-        if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
194
-            header('HTTP/1.1 301 Moved Permanently');
195
-            header('Location: ' . $url);
196
-            exit(0);
197
-        }
198
-
199
-        $GLOBALS['xoopsOption']['template_main'] = 'songlist_artists_index.tpl';
200
-        require $GLOBALS['xoops']->path('/header.php');
201
-        if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
202
-            $GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
203
-            $GLOBALS['loaded_jquery'] = true;
204
-        }
205
-        $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
206
-        $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
207
-        $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
208
-        $GLOBALS['xoopsTpl']->assign('results', $ret);
209
-        $GLOBALS['xoopsTpl']->assign('categories', $cat);
210
-        $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
211
-        $GLOBALS['xoopsTpl']->assign('cid', $_SESSION['cid']);
212
-        if (0 != $_SESSION['cid']) {
213
-            $category = $categoryHandler->get($_SESSION['cid']);
214
-            $GLOBALS['xoopsTpl']->assign('category', $category->toArray(true));
215
-        }
216
-        $GLOBALS['xoopsTpl']->assign('uri', $_SERVER['REQUEST_URI']);
217
-        require $GLOBALS['xoops']->path('/footer.php');
218
-
219
-        break;
220
-    case 'category':
221
-        switch ($fct) {
222
-            default:
223
-            case 'set':
224
-                $_SESSION['cid'] = $id;
225
-                break;
226
-            case 'home':
227
-                unset($_SESSION['cid']);
228
-                break;
229
-        }
230
-        redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=0&value=%&start=0&limit=$limit&cid=" . $_SESSION['cid'], 10, _MD_SONGLIST_MSG_CATEGORYCHANGED);
57
+	default:
58
+	case 'item':
59
+		switch ($fct) {
60
+			default:
61
+			case 'list':
62
+				$pagenav = new \XoopsPageNav($artistsHandler->getCount($criteria_cat), $limit, $start, 'start', "op=$op&fct=$fct&id=$id&value=$value&limit=$limit");
63
+
64
+				$criteria_cat->setLimit($limit);
65
+				$criteria_cat->setStart($start);
66
+
67
+				$artists = $artistsHandler->getObjects($criteria_cat, false);
68
+
69
+				$ret = [];
70
+				$col = 1;
71
+				$row = 1;
72
+				foreach ($artists as $artist) {
73
+					$ret[$row][$col]          = $artist->toArray(true);
74
+					$ret[$row][$col]['width'] = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
75
+					++$col;
76
+					if ($col > $GLOBALS['songlistModuleConfig']['cols']) {
77
+						++$row;
78
+						$col = 1;
79
+					}
80
+				}
81
+				if (1 != $col) {
82
+					for ($j = $col; $j <= $GLOBALS['songlistModuleConfig']['cols']; ++$j) {
83
+						$ret[$row][$j][$artistsHandler->keyName] = 0;
84
+						$ret[$row][$j]['width']                  = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
85
+					}
86
+				}
87
+
88
+				$url = $artistsHandler->getURL(false);
89
+				if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
90
+					header('HTTP/1.1 301 Moved Permanently');
91
+					header('Location: ' . $url);
92
+					exit(0);
93
+				}
94
+
95
+				$GLOBALS['xoopsOption']['template_main'] = 'songlist_artists_index.tpl';
96
+				require $GLOBALS['xoops']->path('/header.php');
97
+				if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
98
+					$GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
99
+					$GLOBALS['loaded_jquery'] = true;
100
+				}
101
+				$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
102
+				$GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
103
+				$GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
104
+				$GLOBALS['xoopsTpl']->assign('results', $ret);
105
+				$GLOBALS['xoopsTpl']->assign('categories', $cat);
106
+				$GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
107
+				$GLOBALS['xoopsTpl']->assign('cid', $_SESSION['cid']);
108
+				if (0 != $_SESSION['cid']) {
109
+					$category = $categoryHandler->get($_SESSION['cid']);
110
+					$GLOBALS['xoopsTpl']->assign('category', $category->toArray(true));
111
+				}
112
+				$GLOBALS['xoopsTpl']->assign('uri', $_SERVER['REQUEST_URI']);
113
+				require $GLOBALS['xoops']->path('/footer.php');
114
+				break;
115
+			case 'item':
116
+				$artist = $artistsHandler->get($id);
117
+
118
+				$url = $artist->getURL(true);
119
+				if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
120
+					header('HTTP/1.1 301 Moved Permanently');
121
+					header('Location: ' . $url);
122
+					exit(0);
123
+				}
124
+
125
+				$GLOBALS['xoopsOption']['template_main'] = 'songlist_artists_item.tpl';
126
+				require $GLOBALS['xoops']->path('/header.php');
127
+				if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
128
+					$GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
129
+					$GLOBALS['loaded_jquery'] = true;
130
+				}
131
+				$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
132
+				$GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
133
+				$GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
134
+				$GLOBALS['xoopsTpl']->assign('songs', false);
135
+				$GLOBALS['xoopsTpl']->assign('artist', $artist->toArray(true));
136
+				$GLOBALS['xoopsTpl']->assign('categories', $cat);
137
+				$GLOBALS['xoopsTpl']->assign('uri', $_SERVER['REQUEST_URI']);
138
+				require $GLOBALS['xoops']->path('/footer.php');
139
+				break;
140
+		}
141
+		break;
142
+	case 'browseby':
143
+		switch ($fct) {
144
+			default:
145
+			case 'title':
146
+			case 'lyrics':
147
+			case 'artist':
148
+			case 'album':
149
+				$browse_criteria = new \CriteriaCompo();
150
+				switch ($value) {
151
+					case '0':
152
+						for ($u = 0; $u < 10; ++$u) {
153
+							$browse_criteria->add(new \Criteria('name', $u . '%', 'LIKE'), 'OR');
154
+						}
155
+						break;
156
+					default:
157
+						$browse_criteria->add(new \Criteria('name', \mb_strtoupper($value) . '%', 'LIKE'), 'OR');
158
+						$browse_criteria->add(new \Criteria('name', \mb_strtolower($value) . '%', 'LIKE'), 'OR');
159
+						break;
160
+				}
161
+				$criteria = new \CriteriaCompo($criteria_cat, 'AND');
162
+				$criteria->add($browse_criteria);
163
+		}
164
+
165
+		$pagenav = new \XoopsPageNav($artistsHandler->getCount($criteria), $limit, $start, 'start', "op={$GLOBALS['op']}&fct=$fct&id=$id&value=$value&limit=$limit");
166
+
167
+		$criteria->setLimit($limit);
168
+		$criteria->setStart($start);
169
+
170
+		$artists = $artistsHandler->getObjects($criteria, false);
171
+
172
+		$ret = [];
173
+		$col = 1;
174
+		$row = 1;
175
+		foreach ($artists as $artist) {
176
+			$ret[$row][$col]          = $artist->toArray(true);
177
+			$ret[$row][$col]['width'] = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
178
+			++$col;
179
+			if ($col > $GLOBALS['songlistModuleConfig']['cols']) {
180
+				++$row;
181
+				$col = 1;
182
+			}
183
+		}
184
+		if (1 != $col) {
185
+			$col--;
186
+			for ($j = $col; $j <= $GLOBALS['songlistModuleConfig']['cols']; ++$j) {
187
+				$ret[$row][$j][$artistsHandler->keyName] = 0;
188
+				$ret[$row][$j]['width']                  = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
189
+			}
190
+		}
191
+
192
+		$url = $artistsHandler->getURL(false);
193
+		if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
194
+			header('HTTP/1.1 301 Moved Permanently');
195
+			header('Location: ' . $url);
196
+			exit(0);
197
+		}
198
+
199
+		$GLOBALS['xoopsOption']['template_main'] = 'songlist_artists_index.tpl';
200
+		require $GLOBALS['xoops']->path('/header.php');
201
+		if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
202
+			$GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
203
+			$GLOBALS['loaded_jquery'] = true;
204
+		}
205
+		$GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
206
+		$GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
207
+		$GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
208
+		$GLOBALS['xoopsTpl']->assign('results', $ret);
209
+		$GLOBALS['xoopsTpl']->assign('categories', $cat);
210
+		$GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
211
+		$GLOBALS['xoopsTpl']->assign('cid', $_SESSION['cid']);
212
+		if (0 != $_SESSION['cid']) {
213
+			$category = $categoryHandler->get($_SESSION['cid']);
214
+			$GLOBALS['xoopsTpl']->assign('category', $category->toArray(true));
215
+		}
216
+		$GLOBALS['xoopsTpl']->assign('uri', $_SERVER['REQUEST_URI']);
217
+		require $GLOBALS['xoops']->path('/footer.php');
218
+
219
+		break;
220
+	case 'category':
221
+		switch ($fct) {
222
+			default:
223
+			case 'set':
224
+				$_SESSION['cid'] = $id;
225
+				break;
226
+			case 'home':
227
+				unset($_SESSION['cid']);
228
+				break;
229
+		}
230
+		redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=0&value=%&start=0&limit=$limit&cid=" . $_SESSION['cid'], 10, _MD_SONGLIST_MSG_CATEGORYCHANGED);
231 231
 }
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 use XoopsModules\Songlist\CategoryHandler;
5 5
 use XoopsModules\Songlist\ArtistsHandler;
6 6
 
7
-require_once __DIR__ . '/header.php';
7
+require_once __DIR__.'/header.php';
8 8
 
9 9
 global $file, $op, $fct, $id, $value, $gid, $cid, $start, $limit;
10 10
 
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
 $categoryHandler = Helper::getInstance()->getHandler('Category');
13 13
 $criteria_cat    = new \CriteriaCompo();
14 14
 $cids            = $categoryHandler->GetCatAndSubCat($_SESSION['cid']);
15
-if ($_SESSION['cid'] > 0) {
15
+if ($_SESSION['cid']>0) {
16 16
     $cids[$_SESSION['cid']] = $_SESSION['cid'];
17 17
 }
18
-if (count($cids) > 0 && 0 != $_SESSION['cid']) {
18
+if (count($cids)>0 && 0!=$_SESSION['cid']) {
19 19
     foreach ($cids as $cid) {
20
-        $criteria_cat->add(new \Criteria('`cids`', '%"' . $cid . '"%', 'LIKE'), 'OR');
20
+        $criteria_cat->add(new \Criteria('`cids`', '%"'.$cid.'"%', 'LIKE'), 'OR');
21 21
     }
22 22
 } else {
23 23
     $criteria_cat->add(new \Criteria(''), 'OR');
@@ -36,24 +36,24 @@  discard block
 block discarded – undo
36 36
 $row = 1;
37 37
 foreach ($categories as $category) {
38 38
     $cat[$row][$col]          = $category->toArray(true);
39
-    $cat[$row][$col]['width'] = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
39
+    $cat[$row][$col]['width'] = floor(100/$GLOBALS['songlistModuleConfig']['cols']).'%';
40 40
     ++$col;
41
-    if ($col > $GLOBALS['songlistModuleConfig']['cols']) {
41
+    if ($col>$GLOBALS['songlistModuleConfig']['cols']) {
42 42
         ++$row;
43 43
         $col = 1;
44 44
     }
45 45
 }
46
-if (1 != $col) {
46
+if (1!=$col) {
47 47
     $col--;
48
-    for ($j = $col; $j <= $GLOBALS['songlistModuleConfig']['cols']; ++$j) {
48
+    for ($j = $col; $j<=$GLOBALS['songlistModuleConfig']['cols']; ++$j) {
49 49
         $cat[$row][$j][$categoryHandler->keyName] = 0;
50
-        $cat[$row][$j]['width']                   = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
50
+        $cat[$row][$j]['width']                   = floor(100/$GLOBALS['songlistModuleConfig']['cols']).'%';
51 51
     }
52 52
 }
53 53
 
54 54
 /** @var ArtistsHandler $artistsHandler */
55 55
 $artistsHandler = Helper::getInstance()->getHandler('Artists');
56
-switch ((string)$GLOBALS['op']) {
56
+switch ((string) $GLOBALS['op']) {
57 57
     default:
58 58
     case 'item':
59 59
         switch ($fct) {
@@ -71,41 +71,41 @@  discard block
 block discarded – undo
71 71
                 $row = 1;
72 72
                 foreach ($artists as $artist) {
73 73
                     $ret[$row][$col]          = $artist->toArray(true);
74
-                    $ret[$row][$col]['width'] = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
74
+                    $ret[$row][$col]['width'] = floor(100/$GLOBALS['songlistModuleConfig']['cols']).'%';
75 75
                     ++$col;
76
-                    if ($col > $GLOBALS['songlistModuleConfig']['cols']) {
76
+                    if ($col>$GLOBALS['songlistModuleConfig']['cols']) {
77 77
                         ++$row;
78 78
                         $col = 1;
79 79
                     }
80 80
                 }
81
-                if (1 != $col) {
82
-                    for ($j = $col; $j <= $GLOBALS['songlistModuleConfig']['cols']; ++$j) {
81
+                if (1!=$col) {
82
+                    for ($j = $col; $j<=$GLOBALS['songlistModuleConfig']['cols']; ++$j) {
83 83
                         $ret[$row][$j][$artistsHandler->keyName] = 0;
84
-                        $ret[$row][$j]['width']                  = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
84
+                        $ret[$row][$j]['width']                  = floor(100/$GLOBALS['songlistModuleConfig']['cols']).'%';
85 85
                     }
86 86
                 }
87 87
 
88 88
                 $url = $artistsHandler->getURL(false);
89 89
                 if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
90 90
                     header('HTTP/1.1 301 Moved Permanently');
91
-                    header('Location: ' . $url);
91
+                    header('Location: '.$url);
92 92
                     exit(0);
93 93
                 }
94 94
 
95 95
                 $GLOBALS['xoopsOption']['template_main'] = 'songlist_artists_index.tpl';
96 96
                 require $GLOBALS['xoops']->path('/header.php');
97 97
                 if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
98
-                    $GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
98
+                    $GLOBALS['xoTheme']->addScript(XOOPS_URL._MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
99 99
                     $GLOBALS['loaded_jquery'] = true;
100 100
                 }
101
-                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
101
+                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL._MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
102 102
                 $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
103 103
                 $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
104 104
                 $GLOBALS['xoopsTpl']->assign('results', $ret);
105 105
                 $GLOBALS['xoopsTpl']->assign('categories', $cat);
106 106
                 $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
107 107
                 $GLOBALS['xoopsTpl']->assign('cid', $_SESSION['cid']);
108
-                if (0 != $_SESSION['cid']) {
108
+                if (0!=$_SESSION['cid']) {
109 109
                     $category = $categoryHandler->get($_SESSION['cid']);
110 110
                     $GLOBALS['xoopsTpl']->assign('category', $category->toArray(true));
111 111
                 }
@@ -118,17 +118,17 @@  discard block
 block discarded – undo
118 118
                 $url = $artist->getURL(true);
119 119
                 if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
120 120
                     header('HTTP/1.1 301 Moved Permanently');
121
-                    header('Location: ' . $url);
121
+                    header('Location: '.$url);
122 122
                     exit(0);
123 123
                 }
124 124
 
125 125
                 $GLOBALS['xoopsOption']['template_main'] = 'songlist_artists_item.tpl';
126 126
                 require $GLOBALS['xoops']->path('/header.php');
127 127
                 if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
128
-                    $GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
128
+                    $GLOBALS['xoTheme']->addScript(XOOPS_URL._MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
129 129
                     $GLOBALS['loaded_jquery'] = true;
130 130
                 }
131
-                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
131
+                $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL._MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
132 132
                 $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
133 133
                 $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
134 134
                 $GLOBALS['xoopsTpl']->assign('songs', false);
@@ -149,13 +149,13 @@  discard block
 block discarded – undo
149 149
                 $browse_criteria = new \CriteriaCompo();
150 150
                 switch ($value) {
151 151
                     case '0':
152
-                        for ($u = 0; $u < 10; ++$u) {
153
-                            $browse_criteria->add(new \Criteria('name', $u . '%', 'LIKE'), 'OR');
152
+                        for ($u = 0; $u<10; ++$u) {
153
+                            $browse_criteria->add(new \Criteria('name', $u.'%', 'LIKE'), 'OR');
154 154
                         }
155 155
                         break;
156 156
                     default:
157
-                        $browse_criteria->add(new \Criteria('name', \mb_strtoupper($value) . '%', 'LIKE'), 'OR');
158
-                        $browse_criteria->add(new \Criteria('name', \mb_strtolower($value) . '%', 'LIKE'), 'OR');
157
+                        $browse_criteria->add(new \Criteria('name', \mb_strtoupper($value).'%', 'LIKE'), 'OR');
158
+                        $browse_criteria->add(new \Criteria('name', \mb_strtolower($value).'%', 'LIKE'), 'OR');
159 159
                         break;
160 160
                 }
161 161
                 $criteria = new \CriteriaCompo($criteria_cat, 'AND');
@@ -174,42 +174,42 @@  discard block
 block discarded – undo
174 174
         $row = 1;
175 175
         foreach ($artists as $artist) {
176 176
             $ret[$row][$col]          = $artist->toArray(true);
177
-            $ret[$row][$col]['width'] = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
177
+            $ret[$row][$col]['width'] = floor(100/$GLOBALS['songlistModuleConfig']['cols']).'%';
178 178
             ++$col;
179
-            if ($col > $GLOBALS['songlistModuleConfig']['cols']) {
179
+            if ($col>$GLOBALS['songlistModuleConfig']['cols']) {
180 180
                 ++$row;
181 181
                 $col = 1;
182 182
             }
183 183
         }
184
-        if (1 != $col) {
184
+        if (1!=$col) {
185 185
             $col--;
186
-            for ($j = $col; $j <= $GLOBALS['songlistModuleConfig']['cols']; ++$j) {
186
+            for ($j = $col; $j<=$GLOBALS['songlistModuleConfig']['cols']; ++$j) {
187 187
                 $ret[$row][$j][$artistsHandler->keyName] = 0;
188
-                $ret[$row][$j]['width']                  = floor(100 / $GLOBALS['songlistModuleConfig']['cols']) . '%';
188
+                $ret[$row][$j]['width']                  = floor(100/$GLOBALS['songlistModuleConfig']['cols']).'%';
189 189
             }
190 190
         }
191 191
 
192 192
         $url = $artistsHandler->getURL(false);
193 193
         if (!mb_strpos($url, $_SERVER['REQUEST_URI'])) {
194 194
             header('HTTP/1.1 301 Moved Permanently');
195
-            header('Location: ' . $url);
195
+            header('Location: '.$url);
196 196
             exit(0);
197 197
         }
198 198
 
199 199
         $GLOBALS['xoopsOption']['template_main'] = 'songlist_artists_index.tpl';
200 200
         require $GLOBALS['xoops']->path('/header.php');
201 201
         if ($GLOBALS['songlistModuleConfig']['force_jquery'] && !isset($GLOBALS['loaded_jquery'])) {
202
-            $GLOBALS['xoTheme']->addScript(XOOPS_URL . _MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
202
+            $GLOBALS['xoTheme']->addScript(XOOPS_URL._MI_SONGLIST_JQUERY, ['type' => 'text/javascript']);
203 203
             $GLOBALS['loaded_jquery'] = true;
204 204
         }
205
-        $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL . _MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
205
+        $GLOBALS['xoTheme']->addStylesheet(XOOPS_URL._MI_SONGLIST_STYLESHEET, ['type' => 'text/css']);
206 206
         $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
207 207
         $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
208 208
         $GLOBALS['xoopsTpl']->assign('results', $ret);
209 209
         $GLOBALS['xoopsTpl']->assign('categories', $cat);
210 210
         $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
211 211
         $GLOBALS['xoopsTpl']->assign('cid', $_SESSION['cid']);
212
-        if (0 != $_SESSION['cid']) {
212
+        if (0!=$_SESSION['cid']) {
213 213
             $category = $categoryHandler->get($_SESSION['cid']);
214 214
             $GLOBALS['xoopsTpl']->assign('category', $category->toArray(true));
215 215
         }
@@ -227,5 +227,5 @@  discard block
 block discarded – undo
227 227
                 unset($_SESSION['cid']);
228 228
                 break;
229 229
         }
230
-        redirect_header($_SERVER['SCRIPT_NAME'] . "?op=item&fct=list&id=0&value=%&start=0&limit=$limit&cid=" . $_SESSION['cid'], 10, _MD_SONGLIST_MSG_CATEGORYCHANGED);
230
+        redirect_header($_SERVER['SCRIPT_NAME']."?op=item&fct=list&id=0&value=%&start=0&limit=$limit&cid=".$_SESSION['cid'], 10, _MD_SONGLIST_MSG_CATEGORYCHANGED);
231 231
 }
Please login to merge, or discard this patch.
xoops_version.php 2 patches
Indentation   +306 added lines, -306 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 $configHandler             = xoops_getHandler('config');
13 13
 $GLOBALS['songlistModule'] = $moduleHandler->getByDirname('songlist');
14 14
 if (is_object($GLOBALS['songlistModule'])) {
15
-    $GLOBALS['songlistModuleConfig'] = $configHandler->getConfigList($GLOBALS['songlistModule']->getVar('mid'));
15
+	$GLOBALS['songlistModuleConfig'] = $configHandler->getConfigList($GLOBALS['songlistModule']->getVar('mid'));
16 16
 }
17 17
 
18 18
 // $Id: xoops_version.php,v 4.04 2008/06/05 15:35:59 wishcraft Exp $
@@ -50,23 +50,23 @@  discard block
 block discarded – undo
50 50
 $modversion['submit_bug']          = 'https://www.chronolabs.coop/';
51 51
 
52 52
 $modversion = [
53
-    // ------------------- Mysql -----------------------------
54
-    'sqlfile' => ['mysql' => 'sql/mysql.sql'],
55
-    // ------------------- Tables ----------------------------
56
-    'tables'  => [
57
-        $moduleDirName . '_' . 'albums',
58
-        $moduleDirName . '_' . 'artists',
59
-        $moduleDirName . '_' . 'category',
60
-        $moduleDirName . '_' . 'extra',
61
-        $moduleDirName . '_' . 'field',
62
-        $moduleDirName . '_' . 'genre',
63
-        $moduleDirName . '_' . 'voice',
64
-        $moduleDirName . '_' . 'requests',
65
-        $moduleDirName . '_' . 'songs',
66
-        $moduleDirName . '_' . 'utf8map',
67
-        $moduleDirName . '_' . 'visibility',
68
-        $moduleDirName . '_' . 'votes',
69
-    ],
53
+	// ------------------- Mysql -----------------------------
54
+	'sqlfile' => ['mysql' => 'sql/mysql.sql'],
55
+	// ------------------- Tables ----------------------------
56
+	'tables'  => [
57
+		$moduleDirName . '_' . 'albums',
58
+		$moduleDirName . '_' . 'artists',
59
+		$moduleDirName . '_' . 'category',
60
+		$moduleDirName . '_' . 'extra',
61
+		$moduleDirName . '_' . 'field',
62
+		$moduleDirName . '_' . 'genre',
63
+		$moduleDirName . '_' . 'voice',
64
+		$moduleDirName . '_' . 'requests',
65
+		$moduleDirName . '_' . 'songs',
66
+		$moduleDirName . '_' . 'utf8map',
67
+		$moduleDirName . '_' . 'visibility',
68
+		$moduleDirName . '_' . 'votes',
69
+	],
70 70
 ];
71 71
 
72 72
 // Admin things
@@ -97,52 +97,52 @@  discard block
 block discarded – undo
97 97
 
98 98
 // ------------------- Help files ------------------- //
99 99
 $modversion['helpsection'] = [
100
-    ['name' => _MI_SONGLIST_OVERVIEW, 'link' => 'page=help'],
101
-    ['name' => _MI_SONGLIST_DISCLAIMER, 'link' => 'page=disclaimer'],
102
-    ['name' => _MI_SONGLIST_LICENSE, 'link' => 'page=license'],
103
-    ['name' => _MI_SONGLIST_SUPPORT, 'link' => 'page=support'],
100
+	['name' => _MI_SONGLIST_OVERVIEW, 'link' => 'page=help'],
101
+	['name' => _MI_SONGLIST_DISCLAIMER, 'link' => 'page=disclaimer'],
102
+	['name' => _MI_SONGLIST_LICENSE, 'link' => 'page=license'],
103
+	['name' => _MI_SONGLIST_SUPPORT, 'link' => 'page=support'],
104 104
 ];
105 105
 
106 106
 // ------------------- Templates ------------------- //
107 107
 $modversion['templates'] = [
108
-    ['file' => 'songlist_albums_index.tpl', 'description' => ''],
109
-    ['file' => 'songlist_albums_item.tpl', 'description' => ''],
110
-    ['file' => 'songlist_albums_list.tpl', 'description' => ''],
111
-    ['file' => 'songlist_alpha_browse.tpl', 'description' => ''],
112
-    ['file' => 'songlist_artists_index.tpl', 'description' => ''],
113
-    ['file' => 'songlist_artists_item.tpl', 'description' => ''],
114
-    ['file' => 'songlist_artists_list.tpl', 'description' => ''],
115
-    ['file' => 'songlist_category_item.tpl', 'description' => ''],
116
-    ['file' => 'songlist_category_list.tpl', 'description' => ''],
117
-    ['file' => 'songlist_cpanel_albums_edit.tpl', 'description' => ''],
118
-    ['file' => 'songlist_cpanel_albums_list.tpl', 'description' => ''],
119
-    ['file' => 'songlist_cpanel_artists_edit.tpl', 'description' => ''],
120
-    ['file' => 'songlist_cpanel_artists_list.tpl', 'description' => ''],
121
-    ['file' => 'songlist_cpanel_category_edit.tpl', 'description' => ''],
122
-    ['file' => 'songlist_cpanel_category_list.tpl', 'description' => ''],
123
-    ['file' => 'songlist_cpanel_fieldlist.tpl', 'description' => ''],
124
-    ['file' => 'songlist_cpanel_genre_edit.tpl', 'description' => ''],
125
-    ['file' => 'songlist_cpanel_genre_list.tpl', 'description' => ''],
126
-    ['file' => 'songlist_cpanel_import_actiona.tpl', 'description' => ''],
127
-    ['file' => 'songlist_cpanel_import_actionb.tpl', 'description' => ''],
128
-    ['file' => 'songlist_cpanel_requests_edit.tpl', 'description' => ''],
129
-    ['file' => 'songlist_cpanel_requests_list.tpl', 'description' => ''],
130
-    ['file' => 'songlist_cpanel_songs_edit.tpl', 'description' => ''],
131
-    ['file' => 'songlist_cpanel_songs_list.tpl', 'description' => ''],
132
-    ['file' => 'songlist_cpanel_utf8map_edit.tpl', 'description' => ''],
133
-    ['file' => 'songlist_cpanel_utf8map_list.tpl', 'description' => ''],
134
-    ['file' => 'songlist_cpanel_visibility.tpl', 'description' => ''],
135
-    ['file' => 'songlist_cpanel_voice_edit.tpl', 'description' => ''],
136
-    ['file' => 'songlist_cpanel_voice_list.tpl', 'description' => ''],
137
-    ['file' => 'songlist_cpanel_votes_edit.tpl', 'description' => ''],
138
-    ['file' => 'songlist_cpanel_votes_list.tpl', 'description' => ''],
139
-    ['file' => 'songlist_requests_index.tpl', 'description' => ''],
140
-    ['file' => 'songlist_search_index.tpl', 'description' => ''],
141
-    ['file' => 'songlist_search_results.tpl', 'description' => ''],
142
-    ['file' => 'songlist_search_search.tpl', 'description' => ''],
143
-    ['file' => 'songlist_songs_index.tpl', 'description' => ''],
144
-    ['file' => 'songlist_songs_item.tpl', 'description' => ''],
145
-    ['file' => 'songlist_songs_list.tpl', 'description' => ''],
108
+	['file' => 'songlist_albums_index.tpl', 'description' => ''],
109
+	['file' => 'songlist_albums_item.tpl', 'description' => ''],
110
+	['file' => 'songlist_albums_list.tpl', 'description' => ''],
111
+	['file' => 'songlist_alpha_browse.tpl', 'description' => ''],
112
+	['file' => 'songlist_artists_index.tpl', 'description' => ''],
113
+	['file' => 'songlist_artists_item.tpl', 'description' => ''],
114
+	['file' => 'songlist_artists_list.tpl', 'description' => ''],
115
+	['file' => 'songlist_category_item.tpl', 'description' => ''],
116
+	['file' => 'songlist_category_list.tpl', 'description' => ''],
117
+	['file' => 'songlist_cpanel_albums_edit.tpl', 'description' => ''],
118
+	['file' => 'songlist_cpanel_albums_list.tpl', 'description' => ''],
119
+	['file' => 'songlist_cpanel_artists_edit.tpl', 'description' => ''],
120
+	['file' => 'songlist_cpanel_artists_list.tpl', 'description' => ''],
121
+	['file' => 'songlist_cpanel_category_edit.tpl', 'description' => ''],
122
+	['file' => 'songlist_cpanel_category_list.tpl', 'description' => ''],
123
+	['file' => 'songlist_cpanel_fieldlist.tpl', 'description' => ''],
124
+	['file' => 'songlist_cpanel_genre_edit.tpl', 'description' => ''],
125
+	['file' => 'songlist_cpanel_genre_list.tpl', 'description' => ''],
126
+	['file' => 'songlist_cpanel_import_actiona.tpl', 'description' => ''],
127
+	['file' => 'songlist_cpanel_import_actionb.tpl', 'description' => ''],
128
+	['file' => 'songlist_cpanel_requests_edit.tpl', 'description' => ''],
129
+	['file' => 'songlist_cpanel_requests_list.tpl', 'description' => ''],
130
+	['file' => 'songlist_cpanel_songs_edit.tpl', 'description' => ''],
131
+	['file' => 'songlist_cpanel_songs_list.tpl', 'description' => ''],
132
+	['file' => 'songlist_cpanel_utf8map_edit.tpl', 'description' => ''],
133
+	['file' => 'songlist_cpanel_utf8map_list.tpl', 'description' => ''],
134
+	['file' => 'songlist_cpanel_visibility.tpl', 'description' => ''],
135
+	['file' => 'songlist_cpanel_voice_edit.tpl', 'description' => ''],
136
+	['file' => 'songlist_cpanel_voice_list.tpl', 'description' => ''],
137
+	['file' => 'songlist_cpanel_votes_edit.tpl', 'description' => ''],
138
+	['file' => 'songlist_cpanel_votes_list.tpl', 'description' => ''],
139
+	['file' => 'songlist_requests_index.tpl', 'description' => ''],
140
+	['file' => 'songlist_search_index.tpl', 'description' => ''],
141
+	['file' => 'songlist_search_results.tpl', 'description' => ''],
142
+	['file' => 'songlist_search_search.tpl', 'description' => ''],
143
+	['file' => 'songlist_songs_index.tpl', 'description' => ''],
144
+	['file' => 'songlist_songs_item.tpl', 'description' => ''],
145
+	['file' => 'songlist_songs_list.tpl', 'description' => ''],
146 146
 ];
147 147
 
148 148
 // Submenus
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
 $modversion['sub'][$i]['url']  = 'artists.php';
152 152
 ++$i;
153 153
 if (isset($GLOBALS['songlistModuleConfig']['album'])) {
154
-    if ($GLOBALS['songlistModuleConfig']['album']) {
155
-        $modversion['sub'][$i]['name'] = _MI_SONGLIST_MENU_ALBUMS;
156
-        $modversion['sub'][$i]['url']  = 'albums.php';
157
-        ++$i;
158
-    }
154
+	if ($GLOBALS['songlistModuleConfig']['album']) {
155
+		$modversion['sub'][$i]['name'] = _MI_SONGLIST_MENU_ALBUMS;
156
+		$modversion['sub'][$i]['url']  = 'albums.php';
157
+		++$i;
158
+	}
159 159
 }
160 160
 $modversion['sub'][$i]['name'] = _MI_SONGLIST_MENU_SEARCH;
161 161
 $modversion['sub'][$i]['url']  = 'search.php';
@@ -167,90 +167,90 @@  discard block
 block discarded – undo
167 167
 $i = 0;
168 168
 // ------------------- Blocks ------------------- //
169 169
 $modversion['blocks'][$i] = [
170
-    'file'        => 'songlist_popular_artist.php',
171
-    'name'        => _MI_SONGLIST_BLOCK_TOP_ARTIST,
172
-    'description' => 'Shows top artist',
173
-    'show_func'   => 'b_songlist_popular_artist_show',
174
-    'options'     => '',
175
-    'edit_func'   => 'b_songlist_popular_artist_edit',
176
-    'template'    => 'songlist_popular_artist.tpl',
170
+	'file'        => 'songlist_popular_artist.php',
171
+	'name'        => _MI_SONGLIST_BLOCK_TOP_ARTIST,
172
+	'description' => 'Shows top artist',
173
+	'show_func'   => 'b_songlist_popular_artist_show',
174
+	'options'     => '',
175
+	'edit_func'   => 'b_songlist_popular_artist_edit',
176
+	'template'    => 'songlist_popular_artist.tpl',
177 177
 ];
178 178
 
179 179
 ++$i;
180 180
 $modversion['blocks'][$i] = [
181
-    'file'        => 'songlist_popular_artists.php',
182
-    'name'        => _MI_SONGLIST_BLOCK_POPULAR_ARTISTS,
183
-    'description' => 'Shows popular artists',
184
-    'show_func'   => 'b_songlist_popular_artists_show',
185
-    'options'     => '6',
186
-    'edit_func'   => 'b_songlist_popular_artists_edit',
187
-    'template'    => 'songlist_popular_artists.tpl',
181
+	'file'        => 'songlist_popular_artists.php',
182
+	'name'        => _MI_SONGLIST_BLOCK_POPULAR_ARTISTS,
183
+	'description' => 'Shows popular artists',
184
+	'show_func'   => 'b_songlist_popular_artists_show',
185
+	'options'     => '6',
186
+	'edit_func'   => 'b_songlist_popular_artists_edit',
187
+	'template'    => 'songlist_popular_artists.tpl',
188 188
 ];
189 189
 
190 190
 ++$i;
191 191
 $modversion['blocks'][$i] = [
192
-    'file'        => 'songlist_popular_album.php',
193
-    'name'        => _MI_SONGLIST_BLOCK_TOP_ALBUM,
194
-    'description' => 'Shows top album',
195
-    'show_func'   => 'b_songlist_popular_album_show',
196
-    'options'     => '',
197
-    'edit_func'   => 'b_songlist_popular_album_edit',
198
-    'template'    => 'songlist_popular_album.tpl',
192
+	'file'        => 'songlist_popular_album.php',
193
+	'name'        => _MI_SONGLIST_BLOCK_TOP_ALBUM,
194
+	'description' => 'Shows top album',
195
+	'show_func'   => 'b_songlist_popular_album_show',
196
+	'options'     => '',
197
+	'edit_func'   => 'b_songlist_popular_album_edit',
198
+	'template'    => 'songlist_popular_album.tpl',
199 199
 ];
200 200
 
201 201
 ++$i;
202 202
 $modversion['blocks'][$i] = [
203
-    'file'        => 'songlist_popular_albums.php',
204
-    'name'        => _MI_SONGLIST_BLOCK_POPULAR_ALBUMS,
205
-    'description' => 'Shows popular albums',
206
-    'show_func'   => 'b_songlist_popular_albums_show',
207
-    'options'     => '6',
208
-    'edit_func'   => 'b_songlist_popular_albums_edit',
209
-    'template'    => 'songlist_popular_albums.tpl',
203
+	'file'        => 'songlist_popular_albums.php',
204
+	'name'        => _MI_SONGLIST_BLOCK_POPULAR_ALBUMS,
205
+	'description' => 'Shows popular albums',
206
+	'show_func'   => 'b_songlist_popular_albums_show',
207
+	'options'     => '6',
208
+	'edit_func'   => 'b_songlist_popular_albums_edit',
209
+	'template'    => 'songlist_popular_albums.tpl',
210 210
 ];
211 211
 
212 212
 ++$i;
213 213
 $modversion['blocks'][$i] = [
214
-    'file'        => 'songlist_popular_genre.php',
215
-    'name'        => _MI_SONGLIST_BLOCK_TOP_GENRE,
216
-    'description' => 'Shows top genre',
217
-    'show_func'   => 'b_songlist_popular_genre_show',
218
-    'options'     => '',
219
-    'edit_func'   => 'b_songlist_popular_genre_edit',
220
-    'template'    => 'songlist_popular_genre.tpl',
214
+	'file'        => 'songlist_popular_genre.php',
215
+	'name'        => _MI_SONGLIST_BLOCK_TOP_GENRE,
216
+	'description' => 'Shows top genre',
217
+	'show_func'   => 'b_songlist_popular_genre_show',
218
+	'options'     => '',
219
+	'edit_func'   => 'b_songlist_popular_genre_edit',
220
+	'template'    => 'songlist_popular_genre.tpl',
221 221
 ];
222 222
 
223 223
 ++$i;
224 224
 $modversion['blocks'][$i] = [
225
-    'file'        => 'songlist_popular_genres.php',
226
-    'name'        => _MI_SONGLIST_BLOCK_POPULAR_GENRES,
227
-    'description' => 'Shows popular genres',
228
-    'show_func'   => 'b_songlist_popular_genres_show',
229
-    'options'     => '6',
230
-    'edit_func'   => 'b_songlist_popular_genres_edit',
231
-    'template'    => 'songlist_popular_genres.tpl',
225
+	'file'        => 'songlist_popular_genres.php',
226
+	'name'        => _MI_SONGLIST_BLOCK_POPULAR_GENRES,
227
+	'description' => 'Shows popular genres',
228
+	'show_func'   => 'b_songlist_popular_genres_show',
229
+	'options'     => '6',
230
+	'edit_func'   => 'b_songlist_popular_genres_edit',
231
+	'template'    => 'songlist_popular_genres.tpl',
232 232
 ];
233 233
 
234 234
 ++$i;
235 235
 $modversion['blocks'][$i] = [
236
-    'file'        => 'songlist_popular_song.php',
237
-    'name'        => _MI_SONGLIST_BLOCK_TOP_SONG,
238
-    'description' => 'Shows top song',
239
-    'show_func'   => 'b_songlist_popular_song_show',
240
-    'options'     => '',
241
-    'edit_func'   => 'b_songlist_popular_song_edit',
242
-    'template'    => 'songlist_popular_song.tpl',
236
+	'file'        => 'songlist_popular_song.php',
237
+	'name'        => _MI_SONGLIST_BLOCK_TOP_SONG,
238
+	'description' => 'Shows top song',
239
+	'show_func'   => 'b_songlist_popular_song_show',
240
+	'options'     => '',
241
+	'edit_func'   => 'b_songlist_popular_song_edit',
242
+	'template'    => 'songlist_popular_song.tpl',
243 243
 ];
244 244
 
245 245
 ++$i;
246 246
 $modversion['blocks'][$i] = [
247
-    'file'        => 'songlist_popular_songs.php',
248
-    'name'        => _MI_SONGLIST_BLOCK_POPULAR_SONGS,
249
-    'description' => 'Shows popular songs',
250
-    'show_func'   => 'b_songlist_popular_songs_show',
251
-    'options'     => '6',
252
-    'edit_func'   => 'b_songlist_popular_songs_edit',
253
-    'template'    => 'songlist_popular_songs.tpl',
247
+	'file'        => 'songlist_popular_songs.php',
248
+	'name'        => _MI_SONGLIST_BLOCK_POPULAR_SONGS,
249
+	'description' => 'Shows popular songs',
250
+	'show_func'   => 'b_songlist_popular_songs_show',
251
+	'options'     => '6',
252
+	'edit_func'   => 'b_songlist_popular_songs_edit',
253
+	'template'    => 'songlist_popular_songs.tpl',
254 254
 ];
255 255
 
256 256
 // default admin editor
@@ -259,127 +259,127 @@  discard block
 block discarded – undo
259 259
 $editorList    = array_flip($editorHandler->getList());
260 260
 
261 261
 $modversion['config'][] = [
262
-    'name'        => 'editor',
263
-    'title'       => '_MI_SONGLIST_EDITORS',
264
-    'description' => '_MI_SONGLIST_EDITORS_DESC',
265
-    'formtype'    => 'select',
266
-    'valuetype'   => 'text',
267
-    'default'     => 'tinymce',
268
-    'options'     => $editorList,
262
+	'name'        => 'editor',
263
+	'title'       => '_MI_SONGLIST_EDITORS',
264
+	'description' => '_MI_SONGLIST_EDITORS_DESC',
265
+	'formtype'    => 'select',
266
+	'valuetype'   => 'text',
267
+	'default'     => 'tinymce',
268
+	'options'     => $editorList,
269 269
 ];
270 270
 
271 271
 $modversion['config'][] = [
272
-    'name'        => 'salt',
273
-    'title'       => '_MI_SONGLIST_SALT',
274
-    'description' => '_MI_SONGLIST_SALT_DESC',
275
-    'formtype'    => 'text',
276
-    'valuetype'   => 'text',
277
-    'default'     => (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
278
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
279
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
280
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
281
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
282
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
283
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
284
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
285
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
286
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
287
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
288
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
289
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
290
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : ''),
291
-
292
-    'options' => [],
272
+	'name'        => 'salt',
273
+	'title'       => '_MI_SONGLIST_SALT',
274
+	'description' => '_MI_SONGLIST_SALT_DESC',
275
+	'formtype'    => 'text',
276
+	'valuetype'   => 'text',
277
+	'default'     => (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
278
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
279
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
280
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
281
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
282
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
283
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
284
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
285
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
286
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
287
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
288
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
289
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
290
+					 . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : ''),
291
+
292
+	'options' => [],
293 293
 ];
294 294
 
295 295
 $modversion['config'][] = [
296
-    'name'        => 'cols',
297
-    'title'       => '_MI_SONGLIST_COLS',
298
-    'description' => '_MI_SONGLIST_COLS_DESC',
299
-    'formtype'    => 'text',
300
-    'valuetype'   => 'int',
301
-    'default'     => 4,
302
-    'options'     => [],
296
+	'name'        => 'cols',
297
+	'title'       => '_MI_SONGLIST_COLS',
298
+	'description' => '_MI_SONGLIST_COLS_DESC',
299
+	'formtype'    => 'text',
300
+	'valuetype'   => 'int',
301
+	'default'     => 4,
302
+	'options'     => [],
303 303
 ];
304 304
 
305 305
 $modversion['config'][] = [
306
-    'name'        => 'rows',
307
-    'title'       => '_MI_SONGLIST_ROWS',
308
-    'description' => '_MI_SONGLIST_ROWS_DESC',
309
-    'formtype'    => 'text',
310
-    'valuetype'   => 'int',
311
-    'default'     => 4,
312
-    'options'     => [],
306
+	'name'        => 'rows',
307
+	'title'       => '_MI_SONGLIST_ROWS',
308
+	'description' => '_MI_SONGLIST_ROWS_DESC',
309
+	'formtype'    => 'text',
310
+	'valuetype'   => 'int',
311
+	'default'     => 4,
312
+	'options'     => [],
313 313
 ];
314 314
 
315 315
 $modversion['config'][] = [
316
-    'name'        => 'email',
317
-    'title'       => '_MI_SONGLIST_EMAIL',
318
-    'description' => '_MI_SONGLIST_EMAIL_DESC',
319
-    'formtype'    => 'textarea',
320
-    'valuetype'   => 'text',
321
-    'default'     => $GLOBALS['xoopsConfig']['adminmail'],
322
-    'options'     => [],
316
+	'name'        => 'email',
317
+	'title'       => '_MI_SONGLIST_EMAIL',
318
+	'description' => '_MI_SONGLIST_EMAIL_DESC',
319
+	'formtype'    => 'textarea',
320
+	'valuetype'   => 'text',
321
+	'default'     => $GLOBALS['xoopsConfig']['adminmail'],
322
+	'options'     => [],
323 323
 ];
324 324
 
325 325
 $modversion['config'][] = [
326
-    'name'        => 'mp3_filesize',
327
-    'title'       => '_MI_SONGLIST_MP3FILESIZE',
328
-    'description' => '_MI_SONGLIST_MP3FILESIZE_DESC',
329
-    'formtype'    => 'textbox',
330
-    'valuetype'   => 'int',
331
-    'default'     => '195035100',
326
+	'name'        => 'mp3_filesize',
327
+	'title'       => '_MI_SONGLIST_MP3FILESIZE',
328
+	'description' => '_MI_SONGLIST_MP3FILESIZE_DESC',
329
+	'formtype'    => 'textbox',
330
+	'valuetype'   => 'int',
331
+	'default'     => '195035100',
332 332
 ];
333 333
 
334 334
 $modversion['config'][] = [
335
-    'name'        => 'mp3_mimetype',
336
-    'title'       => '_MI_SONGLIST_MP3MIMETYPE',
337
-    'description' => '_MI_SONGLIST_MP3MIMETYPE_DESC',
338
-    'formtype'    => 'textarea',
339
-    'valuetype'   => 'text',
340
-    'default'     => 'audio/mpeg|audio/x-mpeg|audio/mp3|audio/x-mp3|audio/mpeg3|audio/x-mpeg3|audio/mpg|audio/x-mpg|audio/x-mpegaudio',
335
+	'name'        => 'mp3_mimetype',
336
+	'title'       => '_MI_SONGLIST_MP3MIMETYPE',
337
+	'description' => '_MI_SONGLIST_MP3MIMETYPE_DESC',
338
+	'formtype'    => 'textarea',
339
+	'valuetype'   => 'text',
340
+	'default'     => 'audio/mpeg|audio/x-mpeg|audio/mp3|audio/x-mp3|audio/mpeg3|audio/x-mpeg3|audio/mpg|audio/x-mpg|audio/x-mpegaudio',
341 341
 ];
342 342
 
343 343
 $modversion['config'][] = [
344
-    'name'        => 'mp3_extensions',
345
-    'title'       => '_MI_SONGLIST_MP3EXTENSIONS',
346
-    'description' => '_MI_SONGLIST_MP3EXTENSIONS_DESC',
347
-    'formtype'    => 'textarea',
348
-    'valuetype'   => 'text',
349
-    'default'     => 'mp3',
344
+	'name'        => 'mp3_extensions',
345
+	'title'       => '_MI_SONGLIST_MP3EXTENSIONS',
346
+	'description' => '_MI_SONGLIST_MP3EXTENSIONS_DESC',
347
+	'formtype'    => 'textarea',
348
+	'valuetype'   => 'text',
349
+	'default'     => 'mp3',
350 350
 ];
351 351
 
352 352
 $modversion['config'][] = [
353
-    'name'        => 'filesize_upload',
354
-    'title'       => '_MI_SONGLIST_FILESIZEUPLD',
355
-    'description' => '_MI_SONGLIST_FILESIZEUPLD_DESC',
356
-    'formtype'    => 'textbox',
357
-    'valuetype'   => 'int',
358
-    'default'     => '1950351',
353
+	'name'        => 'filesize_upload',
354
+	'title'       => '_MI_SONGLIST_FILESIZEUPLD',
355
+	'description' => '_MI_SONGLIST_FILESIZEUPLD_DESC',
356
+	'formtype'    => 'textbox',
357
+	'valuetype'   => 'int',
358
+	'default'     => '1950351',
359 359
 ];
360 360
 
361 361
 $modversion['config'][] = [
362
-    'name'        => 'allowed_mimetype',
363
-    'title'       => '_MI_SONGLIST_ALLOWEDMIMETYPE',
364
-    'description' => '_MI_SONGLIST_ALLOWEDMIMETYPE_DESC',
365
-    'formtype'    => 'textarea',
366
-    'valuetype'   => 'text',
367
-    'default'     => 'image/gif|image/pjpeg|image/jpeg|image/x-png|image/png',
362
+	'name'        => 'allowed_mimetype',
363
+	'title'       => '_MI_SONGLIST_ALLOWEDMIMETYPE',
364
+	'description' => '_MI_SONGLIST_ALLOWEDMIMETYPE_DESC',
365
+	'formtype'    => 'textarea',
366
+	'valuetype'   => 'text',
367
+	'default'     => 'image/gif|image/pjpeg|image/jpeg|image/x-png|image/png',
368 368
 ];
369 369
 
370 370
 $modversion['config'][] = [
371
-    'name'        => 'allowed_extensions',
372
-    'title'       => '_MI_SONGLIST_ALLOWEDEXTENSIONS',
373
-    'description' => '_MI_SONGLIST_ALLOWEDEXTENSIONS_DESC',
374
-    'formtype'    => 'textarea',
375
-    'valuetype'   => 'text',
376
-    'default'     => 'gif|pjpeg|jpeg|jpg|png',
371
+	'name'        => 'allowed_extensions',
372
+	'title'       => '_MI_SONGLIST_ALLOWEDEXTENSIONS',
373
+	'description' => '_MI_SONGLIST_ALLOWEDEXTENSIONS_DESC',
374
+	'formtype'    => 'textarea',
375
+	'valuetype'   => 'text',
376
+	'default'     => 'gif|pjpeg|jpeg|jpg|png',
377 377
 ];
378 378
 
379 379
 $modversion['config'][] = [
380
-    'name'        => 'upload_areas',
381
-    'title'       => '_MI_SONGLIST_UPLOADAREAS',
382
-    'description' => '_MI_SONGLIST_UPLOADAREAS_DESC',
380
+	'name'        => 'upload_areas',
381
+	'title'       => '_MI_SONGLIST_UPLOADAREAS',
382
+	'description' => '_MI_SONGLIST_UPLOADAREAS_DESC',
383 383
 //    'formtype'    => 'select',
384 384
 //    'valuetype'   => 'text',
385 385
 //    'default'     => 'uploads' . DS . 'songlist' . DS,
@@ -387,45 +387,45 @@  discard block
 block discarded – undo
387 387
 //        'uploads' . DS                   => 'uploads' . DS,
388 388
 //        'uploads' . DS . 'songlist' . DS => 'uploads' . DS . 'songlist' . DS,
389 389
 //],
390
-    'formtype'    => 'textbox',
391
-    'valuetype'   => 'text',
392
-    'default'     => '/uploads/songlist/',
390
+	'formtype'    => 'textbox',
391
+	'valuetype'   => 'text',
392
+	'default'     => '/uploads/songlist/',
393 393
 ];
394 394
 
395 395
 $modversion['config'][] = [
396
-    'name'        => 'album',
397
-    'title'       => '_MI_SONGLIST_ALBUM',
398
-    'description' => '_MI_SONGLIST_ALBUM_DESC',
399
-    'formtype'    => 'yesno',
400
-    'valuetype'   => 'int',
401
-    'default'     => '0',
396
+	'name'        => 'album',
397
+	'title'       => '_MI_SONGLIST_ALBUM',
398
+	'description' => '_MI_SONGLIST_ALBUM_DESC',
399
+	'formtype'    => 'yesno',
400
+	'valuetype'   => 'int',
401
+	'default'     => '0',
402 402
 ];
403 403
 
404 404
 $modversion['config'][] = [
405
-    'name'        => 'genre',
406
-    'title'       => '_MI_SONGLIST_GENRE',
407
-    'description' => '_MI_SONGLIST_GENRE_DESC',
408
-    'formtype'    => 'yesno',
409
-    'valuetype'   => 'int',
410
-    'default'     => '0',
405
+	'name'        => 'genre',
406
+	'title'       => '_MI_SONGLIST_GENRE',
407
+	'description' => '_MI_SONGLIST_GENRE_DESC',
408
+	'formtype'    => 'yesno',
409
+	'valuetype'   => 'int',
410
+	'default'     => '0',
411 411
 ];
412 412
 
413 413
 $modversion['config'][] = [
414
-    'name'        => 'voice',
415
-    'title'       => '_MI_SONGLIST_VOICE',
416
-    'description' => '_MI_SONGLIST_VOICE_DESC',
417
-    'formtype'    => 'yesno',
418
-    'valuetype'   => 'int',
419
-    'default'     => '0',
414
+	'name'        => 'voice',
415
+	'title'       => '_MI_SONGLIST_VOICE',
416
+	'description' => '_MI_SONGLIST_VOICE_DESC',
417
+	'formtype'    => 'yesno',
418
+	'valuetype'   => 'int',
419
+	'default'     => '0',
420 420
 ];
421 421
 
422 422
 $modversion['config'][] = [
423
-    'name'        => 'lyrics',
424
-    'title'       => '_MI_SONGLIST_LYRICS',
425
-    'description' => '_MI_SONGLIST_LYRICS_DESC',
426
-    'formtype'    => 'yesno',
427
-    'valuetype'   => 'int',
428
-    'default'     => '0',
423
+	'name'        => 'lyrics',
424
+	'title'       => '_MI_SONGLIST_LYRICS',
425
+	'description' => '_MI_SONGLIST_LYRICS_DESC',
426
+	'formtype'    => 'yesno',
427
+	'valuetype'   => 'int',
428
+	'default'     => '0',
429 429
 ];
430 430
 
431 431
 /*
@@ -440,110 +440,110 @@  discard block
 block discarded – undo
440 440
 */
441 441
 
442 442
 $modversion['config'][] = [
443
-    'name'        => 'htaccess',
444
-    'title'       => '_MI_SONGLIST_HTACCESS',
445
-    'description' => '_MI_SONGLIST_HTACCESS_DESC',
446
-    'formtype'    => 'yesno',
447
-    'valuetype'   => 'int',
448
-    'default'     => '0',
443
+	'name'        => 'htaccess',
444
+	'title'       => '_MI_SONGLIST_HTACCESS',
445
+	'description' => '_MI_SONGLIST_HTACCESS_DESC',
446
+	'formtype'    => 'yesno',
447
+	'valuetype'   => 'int',
448
+	'default'     => '0',
449 449
 ];
450 450
 
451 451
 $modversion['config'][] = [
452
-    'name'        => 'baseofurl',
453
-    'title'       => '_MI_SONGLIST_HTACCESS_BASEOFURL',
454
-    'description' => '_MI_SONGLIST_HTACCESS_BASEOFURL_DESC',
455
-    'formtype'    => 'text',
456
-    'valuetype'   => 'text',
457
-    'default'     => 'songlist',
452
+	'name'        => 'baseofurl',
453
+	'title'       => '_MI_SONGLIST_HTACCESS_BASEOFURL',
454
+	'description' => '_MI_SONGLIST_HTACCESS_BASEOFURL_DESC',
455
+	'formtype'    => 'text',
456
+	'valuetype'   => 'text',
457
+	'default'     => 'songlist',
458 458
 ];
459 459
 
460 460
 $modversion['config'][] = [
461
-    'name'        => 'endofurl',
462
-    'title'       => '_MI_SONGLIST_HTACCESS_ENDOFURL',
463
-    'description' => '_MI_SONGLIST_HTACCESS_ENDOFURL_DESC',
464
-    'formtype'    => 'text',
465
-    'valuetype'   => 'text',
466
-    'default'     => '.tpl',
461
+	'name'        => 'endofurl',
462
+	'title'       => '_MI_SONGLIST_HTACCESS_ENDOFURL',
463
+	'description' => '_MI_SONGLIST_HTACCESS_ENDOFURL_DESC',
464
+	'formtype'    => 'text',
465
+	'valuetype'   => 'text',
466
+	'default'     => '.tpl',
467 467
 ];
468 468
 
469 469
 $modversion['config'][] = [
470
-    'name'        => 'tags',
471
-    'title'       => '_MI_SONGLIST_TAGS',
472
-    'description' => '_MI_SONGLIST_TAGS_DESC',
473
-    'formtype'    => 'yesno',
474
-    'valuetype'   => 'int',
475
-    'default'     => '0',
470
+	'name'        => 'tags',
471
+	'title'       => '_MI_SONGLIST_TAGS',
472
+	'description' => '_MI_SONGLIST_TAGS_DESC',
473
+	'formtype'    => 'yesno',
474
+	'valuetype'   => 'int',
475
+	'default'     => '0',
476 476
 ];
477 477
 
478 478
 $modversion['config'][] = [
479
-    'name'        => 'force_jquery',
480
-    'title'       => '_MI_SONGLIST_FORCE_JQUERY',
481
-    'description' => '_MI_SONGLIST_FORCE_JQUERY_DESC',
482
-    'formtype'    => 'yesno',
483
-    'valuetype'   => 'int',
484
-    'default'     => true,
479
+	'name'        => 'force_jquery',
480
+	'title'       => '_MI_SONGLIST_FORCE_JQUERY',
481
+	'description' => '_MI_SONGLIST_FORCE_JQUERY_DESC',
482
+	'formtype'    => 'yesno',
483
+	'valuetype'   => 'int',
484
+	'default'     => true,
485 485
 ];
486 486
 
487 487
 $modversion['config'][] = [
488
-    'name'        => 'memory_admin',
489
-    'title'       => '_MI_SONGLIST_MEMORY_ADMIN',
490
-    'description' => '_MI_SONGLIST_MEMORY_ADMIN_DESC',
491
-    'formtype'    => 'text',
492
-    'valuetype'   => 'int',
493
-    'default'     => 128,
494
-    'options'     => [],
488
+	'name'        => 'memory_admin',
489
+	'title'       => '_MI_SONGLIST_MEMORY_ADMIN',
490
+	'description' => '_MI_SONGLIST_MEMORY_ADMIN_DESC',
491
+	'formtype'    => 'text',
492
+	'valuetype'   => 'int',
493
+	'default'     => 128,
494
+	'options'     => [],
495 495
 ];
496 496
 
497 497
 $modversion['config'][] = [
498
-    'name'        => 'memory_user',
499
-    'title'       => '_MI_SONGLIST_MEMORY_USER',
500
-    'description' => '_MI_SONGLIST_MEMORY_USER_DESC',
501
-    'formtype'    => 'text',
502
-    'valuetype'   => 'int',
503
-    'default'     => 128,
504
-    'options'     => [],
498
+	'name'        => 'memory_user',
499
+	'title'       => '_MI_SONGLIST_MEMORY_USER',
500
+	'description' => '_MI_SONGLIST_MEMORY_USER_DESC',
501
+	'formtype'    => 'text',
502
+	'valuetype'   => 'int',
503
+	'default'     => 128,
504
+	'options'     => [],
505 505
 ];
506 506
 
507 507
 $modversion['config'][] = [
508
-    'name'        => 'time_admin',
509
-    'title'       => '_MI_SONGLIST_TIME_ADMIN',
510
-    'description' => '_MI_SONGLIST_TIME_ADMIN_DESC',
511
-    'formtype'    => 'text',
512
-    'valuetype'   => 'int',
513
-    'default'     => 360,
514
-    'options'     => [],
508
+	'name'        => 'time_admin',
509
+	'title'       => '_MI_SONGLIST_TIME_ADMIN',
510
+	'description' => '_MI_SONGLIST_TIME_ADMIN_DESC',
511
+	'formtype'    => 'text',
512
+	'valuetype'   => 'int',
513
+	'default'     => 360,
514
+	'options'     => [],
515 515
 ];
516 516
 
517 517
 $modversion['config'][] = [
518
-    'name'        => 'time_user',
519
-    'title'       => '_MI_SONGLIST_TIME_USER',
520
-    'description' => '_MI_SONGLIST_TIME_USER_DESC',
521
-    'formtype'    => 'text',
522
-    'valuetype'   => 'int',
523
-    'default'     => 360,
524
-    'options'     => [],
518
+	'name'        => 'time_user',
519
+	'title'       => '_MI_SONGLIST_TIME_USER',
520
+	'description' => '_MI_SONGLIST_TIME_USER_DESC',
521
+	'formtype'    => 'text',
522
+	'valuetype'   => 'int',
523
+	'default'     => 360,
524
+	'options'     => [],
525 525
 ];
526 526
 
527 527
 /**
528 528
  * Make Sample button visible?
529 529
  */
530 530
 $modversion['config'][] = [
531
-    'name'        => 'displaySampleButton',
532
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON',
533
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC',
534
-    'formtype'    => 'yesno',
535
-    'valuetype'   => 'int',
536
-    'default'     => 1,
531
+	'name'        => 'displaySampleButton',
532
+	'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON',
533
+	'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC',
534
+	'formtype'    => 'yesno',
535
+	'valuetype'   => 'int',
536
+	'default'     => 1,
537 537
 ];
538 538
 
539 539
 /**
540 540
  * Show Developer Tools?
541 541
  */
542 542
 $modversion['config'][] = [
543
-    'name'        => 'displayDeveloperTools',
544
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS',
545
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC',
546
-    'formtype'    => 'yesno',
547
-    'valuetype'   => 'int',
548
-    'default'     => 0,
543
+	'name'        => 'displayDeveloperTools',
544
+	'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS',
545
+	'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC',
546
+	'formtype'    => 'yesno',
547
+	'valuetype'   => 'int',
548
+	'default'     => 0,
549 549
 ];
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php declare(strict_types=1);
2 2
 
3
-require_once __DIR__ . '/preloads/autoloader.php';
3
+require_once __DIR__.'/preloads/autoloader.php';
4 4
 
5 5
 error_reporting(E_ALL);
6 6
 $moduleDirName      = basename(__DIR__);
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $modversion['releasedate']         = 'Thursday, 03rd July, 2022';
32 32
 $modversion['website']             = 'www.chronolabs.coop';
33 33
 $modversion['release_info']        = 'Stable 2012/08/16';
34
-$modversion['release_file']        = XOOPS_URL . '/modules/xforum/docs/changelog.txt';
34
+$modversion['release_file']        = XOOPS_URL.'/modules/xforum/docs/changelog.txt';
35 35
 $modversion['author_realname']     = 'Wishcraft';
36 36
 $modversion['author_website_url']  = 'https://www.chronolabs.coop';
37 37
 $modversion['author_website_name'] = 'Chronolabs';
@@ -54,18 +54,18 @@  discard block
 block discarded – undo
54 54
     'sqlfile' => ['mysql' => 'sql/mysql.sql'],
55 55
     // ------------------- Tables ----------------------------
56 56
     'tables'  => [
57
-        $moduleDirName . '_' . 'albums',
58
-        $moduleDirName . '_' . 'artists',
59
-        $moduleDirName . '_' . 'category',
60
-        $moduleDirName . '_' . 'extra',
61
-        $moduleDirName . '_' . 'field',
62
-        $moduleDirName . '_' . 'genre',
63
-        $moduleDirName . '_' . 'voice',
64
-        $moduleDirName . '_' . 'requests',
65
-        $moduleDirName . '_' . 'songs',
66
-        $moduleDirName . '_' . 'utf8map',
67
-        $moduleDirName . '_' . 'visibility',
68
-        $moduleDirName . '_' . 'votes',
57
+        $moduleDirName.'_'.'albums',
58
+        $moduleDirName.'_'.'artists',
59
+        $moduleDirName.'_'.'category',
60
+        $moduleDirName.'_'.'extra',
61
+        $moduleDirName.'_'.'field',
62
+        $moduleDirName.'_'.'genre',
63
+        $moduleDirName.'_'.'voice',
64
+        $moduleDirName.'_'.'requests',
65
+        $moduleDirName.'_'.'songs',
66
+        $moduleDirName.'_'.'utf8map',
67
+        $moduleDirName.'_'.'visibility',
68
+        $moduleDirName.'_'.'votes',
69 69
     ],
70 70
 ];
71 71
 
@@ -274,20 +274,20 @@  discard block
 block discarded – undo
274 274
     'description' => '_MI_SONGLIST_SALT_DESC',
275 275
     'formtype'    => 'text',
276 276
     'valuetype'   => 'text',
277
-    'default'     => (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
278
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
279
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
280
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
281
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
282
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
283
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
284
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
285
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
286
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
287
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
288
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
289
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : '')
290
-                     . (2 != random_int(0, 4) ? chr(random_int(32, 190)) : ''),
277
+    'default'     => (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
278
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
279
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
280
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
281
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
282
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
283
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
284
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
285
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
286
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
287
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
288
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
289
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : '')
290
+                     . (2!=random_int(0, 4) ? chr(random_int(32, 190)) : ''),
291 291
 
292 292
     'options' => [],
293 293
 ];
@@ -529,8 +529,8 @@  discard block
 block discarded – undo
529 529
  */
530 530
 $modversion['config'][] = [
531 531
     'name'        => 'displaySampleButton',
532
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON',
533
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_SAMPLE_BUTTON_DESC',
532
+    'title'       => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON',
533
+    'description' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_SAMPLE_BUTTON_DESC',
534 534
     'formtype'    => 'yesno',
535 535
     'valuetype'   => 'int',
536 536
     'default'     => 1,
@@ -541,8 +541,8 @@  discard block
 block discarded – undo
541 541
  */
542 542
 $modversion['config'][] = [
543 543
     'name'        => 'displayDeveloperTools',
544
-    'title'       => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS',
545
-    'description' => 'CO_' . $moduleDirNameUpper . '_' . 'SHOW_DEV_TOOLS_DESC',
544
+    'title'       => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS',
545
+    'description' => 'CO_'.$moduleDirNameUpper.'_'.'SHOW_DEV_TOOLS_DESC',
546 546
     'formtype'    => 'yesno',
547 547
     'valuetype'   => 'int',
548 548
     'default'     => 0,
Please login to merge, or discard this patch.
admin/songs.php 2 patches
Indentation   +216 added lines, -216 removed lines patch added patch discarded remove patch
@@ -23,101 +23,101 @@  discard block
 block discarded – undo
23 23
 $filter = !empty($_REQUEST['filter']) ? '' . $_REQUEST['filter'] . '' : '1,1';
24 24
 
25 25
 switch ($op) {
26
-    default:
27
-    case 'songs':
28
-        switch ($fct) {
29
-            default:
30
-            case 'list':
31
-                $adminObject = Admin::getInstance();
32
-                $adminObject->displayNavigation(basename(__FILE__));
26
+	default:
27
+	case 'songs':
28
+		switch ($fct) {
29
+			default:
30
+			case 'list':
31
+				$adminObject = Admin::getInstance();
32
+				$adminObject->displayNavigation(basename(__FILE__));
33 33
 
34
-            /** @var SongsHandler $songsHandler */
35
-                $songsHandler = Helper::getInstance()->getHandler('Songs');
34
+			/** @var SongsHandler $songsHandler */
35
+				$songsHandler = Helper::getInstance()->getHandler('Songs');
36 36
 
37
-                $criteria        = $songsHandler->getFilterCriteria($GLOBALS['filter']);
38
-                $ttl             = $songsHandler->getCount($criteria);
39
-                $GLOBALS['sort'] = !empty($_REQUEST['sort']) ? '' . $_REQUEST['sort'] . '' : 'created';
37
+				$criteria        = $songsHandler->getFilterCriteria($GLOBALS['filter']);
38
+				$ttl             = $songsHandler->getCount($criteria);
39
+				$GLOBALS['sort'] = !empty($_REQUEST['sort']) ? '' . $_REQUEST['sort'] . '' : 'created';
40 40
 
41
-                $pagenav = new \XoopsPageNav($ttl, $GLOBALS['limit'], $GLOBALS['start'], 'start', 'limit=' . $GLOBALS['limit'] . '&sort=' . $GLOBALS['sort'] . '&order=' . $GLOBALS['order'] . '&op=' . $GLOBALS['op'] . '&fct=' . $GLOBALS['fct'] . '&filter=' . $GLOBALS['filter']);
42
-                $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
41
+				$pagenav = new \XoopsPageNav($ttl, $GLOBALS['limit'], $GLOBALS['start'], 'start', 'limit=' . $GLOBALS['limit'] . '&sort=' . $GLOBALS['sort'] . '&order=' . $GLOBALS['order'] . '&op=' . $GLOBALS['op'] . '&fct=' . $GLOBALS['fct'] . '&filter=' . $GLOBALS['filter']);
42
+				$GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
43 43
 
44
-                foreach ($songsHandler->filterFields() as $id => $key) {
45
-                    $GLOBALS['xoopsTpl']->assign(
46
-                        \mb_strtolower(str_replace('-', '_', $key) . '_th'),
47
-                        '<a href="'
48
-                        . $_SERVER['SCRIPT_NAME']
49
-                        . '?start='
50
-                        . $GLOBALS['start']
51
-                        . '&limit='
52
-                        . $GLOBALS['limit']
53
-                        . '&sort='
54
-                        . $key
55
-                        . '&order='
56
-                        . (($key == $GLOBALS['sort']) ? ('DESC' === $GLOBALS['order'] ? 'ASC' : 'DESC') : $GLOBALS['order'])
57
-                        . '&op='
58
-                        . $GLOBALS['op']
59
-                        . '&filter='
60
-                        . $GLOBALS['filter']
61
-                        . '">'
62
-                        . (defined('_AM_SONGLIST_TH_' . \mb_strtoupper(str_replace('-', '_', $key))) ? constant('_AM_SONGLIST_TH_' . \mb_strtoupper(str_replace('-', '_', $key))) : '_AM_SONGLIST_TH_' . \mb_strtoupper(str_replace('-', '_', $key)))
63
-                        . '</a>'
64
-                    );
65
-                    $GLOBALS['xoopsTpl']->assign('filter_' . \mb_strtolower(str_replace('-', '_', $key)) . '_th', $songsHandler->getFilterForm($GLOBALS['filter'], $key, $GLOBALS['sort'], $GLOBALS['op'], $GLOBALS['fct']));
66
-                }
44
+				foreach ($songsHandler->filterFields() as $id => $key) {
45
+					$GLOBALS['xoopsTpl']->assign(
46
+						\mb_strtolower(str_replace('-', '_', $key) . '_th'),
47
+						'<a href="'
48
+						. $_SERVER['SCRIPT_NAME']
49
+						. '?start='
50
+						. $GLOBALS['start']
51
+						. '&limit='
52
+						. $GLOBALS['limit']
53
+						. '&sort='
54
+						. $key
55
+						. '&order='
56
+						. (($key == $GLOBALS['sort']) ? ('DESC' === $GLOBALS['order'] ? 'ASC' : 'DESC') : $GLOBALS['order'])
57
+						. '&op='
58
+						. $GLOBALS['op']
59
+						. '&filter='
60
+						. $GLOBALS['filter']
61
+						. '">'
62
+						. (defined('_AM_SONGLIST_TH_' . \mb_strtoupper(str_replace('-', '_', $key))) ? constant('_AM_SONGLIST_TH_' . \mb_strtoupper(str_replace('-', '_', $key))) : '_AM_SONGLIST_TH_' . \mb_strtoupper(str_replace('-', '_', $key)))
63
+						. '</a>'
64
+					);
65
+					$GLOBALS['xoopsTpl']->assign('filter_' . \mb_strtolower(str_replace('-', '_', $key)) . '_th', $songsHandler->getFilterForm($GLOBALS['filter'], $key, $GLOBALS['sort'], $GLOBALS['op'], $GLOBALS['fct']));
66
+				}
67 67
 
68
-                $GLOBALS['xoopsTpl']->assign('limit', $GLOBALS['limit']);
69
-                $GLOBALS['xoopsTpl']->assign('start', $GLOBALS['start']);
70
-                $GLOBALS['xoopsTpl']->assign('order', $GLOBALS['order']);
71
-                $GLOBALS['xoopsTpl']->assign('sort', $GLOBALS['sort']);
72
-                $GLOBALS['xoopsTpl']->assign('filter', $GLOBALS['filter']);
73
-                $GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
68
+				$GLOBALS['xoopsTpl']->assign('limit', $GLOBALS['limit']);
69
+				$GLOBALS['xoopsTpl']->assign('start', $GLOBALS['start']);
70
+				$GLOBALS['xoopsTpl']->assign('order', $GLOBALS['order']);
71
+				$GLOBALS['xoopsTpl']->assign('sort', $GLOBALS['sort']);
72
+				$GLOBALS['xoopsTpl']->assign('filter', $GLOBALS['filter']);
73
+				$GLOBALS['xoopsTpl']->assign('xoConfig', $GLOBALS['songlistModuleConfig']);
74 74
 
75
-                $criteria->setStart($GLOBALS['start']);
76
-                $criteria->setLimit($GLOBALS['limit']);
77
-                $criteria->setSort('`' . $GLOBALS['sort'] . '`');
78
-                $criteria->setOrder($GLOBALS['order']);
75
+				$criteria->setStart($GLOBALS['start']);
76
+				$criteria->setLimit($GLOBALS['limit']);
77
+				$criteria->setSort('`' . $GLOBALS['sort'] . '`');
78
+				$criteria->setOrder($GLOBALS['order']);
79 79
 
80
-                $songss = $songsHandler->getObjects($criteria, true);
81
-                foreach ($songss as $cid => $songs) {
82
-                    if (is_object($songs)) {
83
-                        $GLOBALS['xoopsTpl']->append('songs', $songs->toArray());
84
-                    }
85
-                }
86
-                $GLOBALS['xoopsTpl']->assign('form', FormController::getFormSongs(false));
87
-                $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
88
-                $GLOBALS['xoopsTpl']->display('db:songlist_cpanel_songs_list.tpl');
89
-                break;
90
-            case 'new':
91
-            case 'edit':
92
-                $adminObject = Admin::getInstance();
93
-                $adminObject->displayNavigation(basename(__FILE__));
80
+				$songss = $songsHandler->getObjects($criteria, true);
81
+				foreach ($songss as $cid => $songs) {
82
+					if (is_object($songs)) {
83
+						$GLOBALS['xoopsTpl']->append('songs', $songs->toArray());
84
+					}
85
+				}
86
+				$GLOBALS['xoopsTpl']->assign('form', FormController::getFormSongs(false));
87
+				$GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
88
+				$GLOBALS['xoopsTpl']->display('db:songlist_cpanel_songs_list.tpl');
89
+				break;
90
+			case 'new':
91
+			case 'edit':
92
+				$adminObject = Admin::getInstance();
93
+				$adminObject->displayNavigation(basename(__FILE__));
94 94
 
95
-                require_once $GLOBALS['xoops']->path('/class/pagenav.php');
95
+				require_once $GLOBALS['xoops']->path('/class/pagenav.php');
96 96
 
97
-                $songsHandler = Helper::getInstance()->getHandler('Songs');
98
-                if (Request::hasVar('id', 'REQUEST')) {
99
-                    $songs = $songsHandler->get(Request::getInt('id', 0, 'REQUEST'));
100
-                } else {
101
-                    $songs = $songsHandler->create();
102
-                }
97
+				$songsHandler = Helper::getInstance()->getHandler('Songs');
98
+				if (Request::hasVar('id', 'REQUEST')) {
99
+					$songs = $songsHandler->get(Request::getInt('id', 0, 'REQUEST'));
100
+				} else {
101
+					$songs = $songsHandler->create();
102
+				}
103 103
 
104
-                $GLOBALS['xoopsTpl']->assign('form', $songs->getForm());
105
-                $GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
106
-                $GLOBALS['xoopsTpl']->display('db:songlist_cpanel_songs_edit.tpl');
107
-                break;
108
-            case 'save':
109
-                $songsHandler  = Helper::getInstance()->getHandler('Songs');
110
-                $extrasHandler = Helper::getInstance()->getHandler('Extras');
111
-                $id            = 0;
112
-                $id            = Request::getInt('id', 0, 'REQUEST');
113
-                if ($id) {
114
-                    $songs = $songsHandler->get($id);
115
-                } else {
116
-                    $songs = $songsHandler->create();
117
-                }
118
-                $songs->setVars($_POST[$id]);
104
+				$GLOBALS['xoopsTpl']->assign('form', $songs->getForm());
105
+				$GLOBALS['xoopsTpl']->assign('php_self', $_SERVER['SCRIPT_NAME']);
106
+				$GLOBALS['xoopsTpl']->display('db:songlist_cpanel_songs_edit.tpl');
107
+				break;
108
+			case 'save':
109
+				$songsHandler  = Helper::getInstance()->getHandler('Songs');
110
+				$extrasHandler = Helper::getInstance()->getHandler('Extras');
111
+				$id            = 0;
112
+				$id            = Request::getInt('id', 0, 'REQUEST');
113
+				if ($id) {
114
+					$songs = $songsHandler->get($id);
115
+				} else {
116
+					$songs = $songsHandler->create();
117
+				}
118
+				$songs->setVars($_POST[$id]);
119 119
 
120
-                if (Request::hasVar('mp3' . $id, 'FILES') && !empty($_FILES['mp3' . $id]['title'])) {
120
+				if (Request::hasVar('mp3' . $id, 'FILES') && !empty($_FILES['mp3' . $id]['title'])) {
121 121
 //                    if (!is_dir($GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas']))) {
122 122
 //                        foreach (explode('\\', $GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas'])) as $folders) {
123 123
 //                            foreach (explode('/', $folders) as $folder) {
@@ -130,74 +130,74 @@  discard block
 block discarded – undo
130 130
 //                    }
131 131
 
132 132
 //                    require_once $GLOBALS['xoops']->path('modules/songlist/include/uploader.php');
133
-                    $uploader = new Uploader(
134
-                        $GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas']),
135
-                        explode('|', $GLOBALS['songlistModuleConfig']['mp3_mimetype']),
136
-                        $GLOBALS['songlistModuleConfig']['mp3_filesize'],
137
-                        0,
138
-                        0,
139
-                        explode('|', $GLOBALS['songlistModuleConfig']['mp3_extensions'])
140
-                    );
141
-                    try {
142
-                        $uploader->setPrefix(mb_substr(md5((string)microtime(true)), random_int(0, 20), 13));
143
-                    } catch (Exception $e) {
144
-                    }
133
+					$uploader = new Uploader(
134
+						$GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas']),
135
+						explode('|', $GLOBALS['songlistModuleConfig']['mp3_mimetype']),
136
+						$GLOBALS['songlistModuleConfig']['mp3_filesize'],
137
+						0,
138
+						0,
139
+						explode('|', $GLOBALS['songlistModuleConfig']['mp3_extensions'])
140
+					);
141
+					try {
142
+						$uploader->setPrefix(mb_substr(md5((string)microtime(true)), random_int(0, 20), 13));
143
+					} catch (Exception $e) {
144
+					}
145 145
 
146
-                    if ($uploader->fetchMedia('mp3' . $id)) {
147
-                        if (!$uploader->upload()) {
148
-                            $adminObject = Admin::getInstance();
149
-                            $adminObject->displayNavigation(basename(__FILE__));
150
-                            echo $uploader->getErrors();
151
-                            xoops_cp_footer();
152
-                            exit(0);
153
-                        }
154
-                        if (mb_strlen($songs->getVar('mp3'))) {
155
-                            unlink($GLOBALS['xoops']->path($songs->getVar('path')) . basename($songs->getVar('mp3')));
156
-                        }
146
+					if ($uploader->fetchMedia('mp3' . $id)) {
147
+						if (!$uploader->upload()) {
148
+							$adminObject = Admin::getInstance();
149
+							$adminObject->displayNavigation(basename(__FILE__));
150
+							echo $uploader->getErrors();
151
+							xoops_cp_footer();
152
+							exit(0);
153
+						}
154
+						if (mb_strlen($songs->getVar('mp3'))) {
155
+							unlink($GLOBALS['xoops']->path($songs->getVar('path')) . basename($songs->getVar('mp3')));
156
+						}
157 157
 
158
-                        $songs->setVar('mp3', XOOPS_URL . '/' . str_replace(DS, '/', $GLOBALS['songlistModuleConfig']['upload_areas']) . $uploader->getSavedFileName());
159
-                    } else {
160
-                        $adminObject = Admin::getInstance();
161
-                        $adminObject->displayNavigation(basename(__FILE__));
162
-                        echo $uploader->getErrors();
163
-                        xoops_cp_footer();
164
-                        exit(0);
165
-                    }
166
-                }
167
-                if (!$id = $songsHandler->insert($songs)) {
168
-                    redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_FAILEDTOSAVE);
169
-                    exit(0);
170
-                }
171
-                $extra = $extrasHandler->get($id);
172
-                $extra->setVars($_POST[$id]);
173
-                $extra->setVar('sid', $id);
174
-                $extrasHandler->insert($extra);
158
+						$songs->setVar('mp3', XOOPS_URL . '/' . str_replace(DS, '/', $GLOBALS['songlistModuleConfig']['upload_areas']) . $uploader->getSavedFileName());
159
+					} else {
160
+						$adminObject = Admin::getInstance();
161
+						$adminObject->displayNavigation(basename(__FILE__));
162
+						echo $uploader->getErrors();
163
+						xoops_cp_footer();
164
+						exit(0);
165
+					}
166
+				}
167
+				if (!$id = $songsHandler->insert($songs)) {
168
+					redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_FAILEDTOSAVE);
169
+					exit(0);
170
+				}
171
+				$extra = $extrasHandler->get($id);
172
+				$extra->setVars($_POST[$id]);
173
+				$extra->setVar('sid', $id);
174
+				$extrasHandler->insert($extra);
175 175
 
176
-                if ($GLOBALS['songlistModuleConfig']['tags'] && file_exists(XOOPS_ROOT_PATH . '/modules/tag/class/tag.php')) {
177
-                    $tagHandler = \XoopsModules\Tag\Helper::getInstance()->getHandler('Tag');
178
-                    $tagHandler->updateByItem($_POST['tags'], $id, $GLOBALS['songlistModule']->getVar('dirname'), $songs->getVar('cid'));
179
-                }
176
+				if ($GLOBALS['songlistModuleConfig']['tags'] && file_exists(XOOPS_ROOT_PATH . '/modules/tag/class/tag.php')) {
177
+					$tagHandler = \XoopsModules\Tag\Helper::getInstance()->getHandler('Tag');
178
+					$tagHandler->updateByItem($_POST['tags'], $id, $GLOBALS['songlistModule']->getVar('dirname'), $songs->getVar('cid'));
179
+				}
180 180
 
181
-                if ('new' === isset($_REQUEST['state']) ? $_REQUEST['state'][$_REQUEST['id']]:'') {
182
-                    redirect_header(
183
-                        $_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=edit&id=' . $_REQUEST['id'] . '&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'],
184
-                        10,
185
-                        _AM_SONGLIST_MSG_SONGS_SAVEDOKEY
186
-                    );
187
-                } else {
188
-                    redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_SAVEDOKEY);
189
-                }
190
-                exit(0);
181
+				if ('new' === isset($_REQUEST['state']) ? $_REQUEST['state'][$_REQUEST['id']]:'') {
182
+					redirect_header(
183
+						$_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=edit&id=' . $_REQUEST['id'] . '&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'],
184
+						10,
185
+						_AM_SONGLIST_MSG_SONGS_SAVEDOKEY
186
+					);
187
+				} else {
188
+					redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_SAVEDOKEY);
189
+				}
190
+				exit(0);
191 191
 
192
-                break;
193
-            case 'savelist':
194
-                print_r($_FILES);
195
-                exit;
196
-                $songsHandler = Helper::getInstance()->getHandler('Songs');
197
-                foreach ($_REQUEST['id'] as $id) {
198
-                    $songs = $songsHandler->get($id);
199
-                    $songs->setVars($_POST[$id]);
200
-                    if (Request::hasVar('mp3' . $id, 'FILES') && !empty($_FILES['mp3' . $id]['title'])) {
192
+				break;
193
+			case 'savelist':
194
+				print_r($_FILES);
195
+				exit;
196
+				$songsHandler = Helper::getInstance()->getHandler('Songs');
197
+				foreach ($_REQUEST['id'] as $id) {
198
+					$songs = $songsHandler->get($id);
199
+					$songs->setVars($_POST[$id]);
200
+					if (Request::hasVar('mp3' . $id, 'FILES') && !empty($_FILES['mp3' . $id]['title'])) {
201 201
 //                        if (!is_dir($GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas']))) {
202 202
 //                            foreach (explode('\\', $GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas'])) as $folders) {
203 203
 //                                foreach (explode('/', $folders) as $folder) {
@@ -210,78 +210,78 @@  discard block
 block discarded – undo
210 210
 //                        }
211 211
 
212 212
 //                        require_once $GLOBALS['xoops']->path('modules/songlist/include/uploader.php');
213
-                        $uploader = new Uploader(
214
-                            $GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas']),
215
-                            explode('|', $GLOBALS['songlistModuleConfig']['mp3_mimetype']),
216
-                            $GLOBALS['songlistModuleConfig']['mp3_filesize'],
217
-                            0,
218
-                            0,
219
-                            explode('|', $GLOBALS['songlistModuleConfig']['mp3_extensions'])
220
-                        );
221
-                        try {
222
-                            $uploader->setPrefix(mb_substr(md5((string)microtime(true)), random_int(0, 20), 13));
223
-                        } catch (Exception $e) {
224
-                        }
213
+						$uploader = new Uploader(
214
+							$GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas']),
215
+							explode('|', $GLOBALS['songlistModuleConfig']['mp3_mimetype']),
216
+							$GLOBALS['songlistModuleConfig']['mp3_filesize'],
217
+							0,
218
+							0,
219
+							explode('|', $GLOBALS['songlistModuleConfig']['mp3_extensions'])
220
+						);
221
+						try {
222
+							$uploader->setPrefix(mb_substr(md5((string)microtime(true)), random_int(0, 20), 13));
223
+						} catch (Exception $e) {
224
+						}
225 225
 
226
-                        if ($uploader->fetchMedia('mp3' . $id)) {
227
-                            if (!$uploader->upload()) {
228
-                                $adminObject = Admin::getInstance();
229
-                                $adminObject->displayNavigation(basename(__FILE__));
230
-                                echo $uploader->getErrors();
231
-                                xoops_cp_footer();
232
-                                exit(0);
233
-                            }
234
-                            if (mb_strlen($songs->getVar('mp3'))) {
235
-                                unlink($GLOBALS['xoops']->path($songs->getVar('path')) . basename($songs->getVar('mp3')));
236
-                            }
226
+						if ($uploader->fetchMedia('mp3' . $id)) {
227
+							if (!$uploader->upload()) {
228
+								$adminObject = Admin::getInstance();
229
+								$adminObject->displayNavigation(basename(__FILE__));
230
+								echo $uploader->getErrors();
231
+								xoops_cp_footer();
232
+								exit(0);
233
+							}
234
+							if (mb_strlen($songs->getVar('mp3'))) {
235
+								unlink($GLOBALS['xoops']->path($songs->getVar('path')) . basename($songs->getVar('mp3')));
236
+							}
237 237
 
238
-                            $songs->setVar('mp3', XOOPS_URL . '/' . str_replace(DS, '/', $GLOBALS['songlistModuleConfig']['upload_areas']) . $uploader->getSavedFileName());
239
-                        } else {
240
-                            $adminObject = Admin::getInstance();
241
-                            $adminObject->displayNavigation(basename(__FILE__));
242
-                            echo $uploader->getErrors();
243
-                            xoops_cp_footer();
244
-                            exit(0);
245
-                        }
246
-                    }
247
-                    if (!$songsHandler->insert($songs)) {
248
-                        redirect_header(
249
-                            $_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'],
250
-                            10,
251
-                            _AM_SONGLIST_MSG_SONGS_FAILEDTOSAVE
252
-                        );
253
-                        exit(0);
254
-                    }
255
-                }
256
-                redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_SAVEDOKEY);
257
-                exit(0);
258
-                break;
259
-            case 'delete':
260
-                $songsHandler = Helper::getInstance()->getHandler('Songs');
261
-                $id           = 0;
262
-                if (Request::hasVar('id', 'POST') && $id = Request::getInt('id', 0, 'POST')) {
263
-                    $songs = $songsHandler->get($id);
264
-                    if (!$songsHandler->delete($songs)) {
265
-                        redirect_header(
266
-                            $_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'],
267
-                            10,
268
-                            _AM_SONGLIST_MSG_SONGS_FAILEDTODELETE
269
-                        );
270
-                        exit(0);
271
-                    }
272
-                    redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_DELETED);
273
-                    exit(0);
274
-                }
275
-                $songs = $songsHandler->get(Request::getInt('id', 0, 'REQUEST'));
276
-                xoops_confirm(
277
-                    ['id' => $_REQUEST['id'], 'op' => $_REQUEST['op'], 'fct' => $_REQUEST['fct'], 'limit' => $_REQUEST['limit'], 'start' => $_REQUEST['start'], 'order' => $_REQUEST['order'], 'sort' => $_REQUEST['sort'], 'filter' => $_REQUEST['filter']],
278
-                    $_SERVER['SCRIPT_NAME'],
279
-                    sprintf(_AM_SONGLIST_MSG_SONGS_DELETE, $songs->getVar('name'))
280
-                );
238
+							$songs->setVar('mp3', XOOPS_URL . '/' . str_replace(DS, '/', $GLOBALS['songlistModuleConfig']['upload_areas']) . $uploader->getSavedFileName());
239
+						} else {
240
+							$adminObject = Admin::getInstance();
241
+							$adminObject->displayNavigation(basename(__FILE__));
242
+							echo $uploader->getErrors();
243
+							xoops_cp_footer();
244
+							exit(0);
245
+						}
246
+					}
247
+					if (!$songsHandler->insert($songs)) {
248
+						redirect_header(
249
+							$_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'],
250
+							10,
251
+							_AM_SONGLIST_MSG_SONGS_FAILEDTOSAVE
252
+						);
253
+						exit(0);
254
+					}
255
+				}
256
+				redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_SAVEDOKEY);
257
+				exit(0);
258
+				break;
259
+			case 'delete':
260
+				$songsHandler = Helper::getInstance()->getHandler('Songs');
261
+				$id           = 0;
262
+				if (Request::hasVar('id', 'POST') && $id = Request::getInt('id', 0, 'POST')) {
263
+					$songs = $songsHandler->get($id);
264
+					if (!$songsHandler->delete($songs)) {
265
+						redirect_header(
266
+							$_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'],
267
+							10,
268
+							_AM_SONGLIST_MSG_SONGS_FAILEDTODELETE
269
+						);
270
+						exit(0);
271
+					}
272
+					redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_DELETED);
273
+					exit(0);
274
+				}
275
+				$songs = $songsHandler->get(Request::getInt('id', 0, 'REQUEST'));
276
+				xoops_confirm(
277
+					['id' => $_REQUEST['id'], 'op' => $_REQUEST['op'], 'fct' => $_REQUEST['fct'], 'limit' => $_REQUEST['limit'], 'start' => $_REQUEST['start'], 'order' => $_REQUEST['order'], 'sort' => $_REQUEST['sort'], 'filter' => $_REQUEST['filter']],
278
+					$_SERVER['SCRIPT_NAME'],
279
+					sprintf(_AM_SONGLIST_MSG_SONGS_DELETE, $songs->getVar('name'))
280
+				);
281 281
 
282
-                break;
283
-        }
284
-        break;
282
+				break;
283
+		}
284
+		break;
285 285
 }
286 286
 
287 287
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 use XoopsModules\Songlist\Form\FormController;
9 9
 
10 10
 
11
-require __DIR__ . '/header.php';
11
+require __DIR__.'/header.php';
12 12
 
13 13
 xoops_loadLanguage('admin', 'songlist');
14 14
 
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
 $limit  = Request::getInt('limit', 30, 'REQUEST');
20 20
 $start  = Request::getInt('start', 0, 'REQUEST');
21 21
 $order  = !empty($_REQUEST['order']) ? $_REQUEST['order'] : 'DESC';
22
-$sort   = !empty($_REQUEST['sort']) ? '' . $_REQUEST['sort'] . '' : 'created';
23
-$filter = !empty($_REQUEST['filter']) ? '' . $_REQUEST['filter'] . '' : '1,1';
22
+$sort   = !empty($_REQUEST['sort']) ? ''.$_REQUEST['sort'].'' : 'created';
23
+$filter = !empty($_REQUEST['filter']) ? ''.$_REQUEST['filter'].'' : '1,1';
24 24
 
25 25
 switch ($op) {
26 26
     default:
@@ -36,14 +36,14 @@  discard block
 block discarded – undo
36 36
 
37 37
                 $criteria        = $songsHandler->getFilterCriteria($GLOBALS['filter']);
38 38
                 $ttl             = $songsHandler->getCount($criteria);
39
-                $GLOBALS['sort'] = !empty($_REQUEST['sort']) ? '' . $_REQUEST['sort'] . '' : 'created';
39
+                $GLOBALS['sort'] = !empty($_REQUEST['sort']) ? ''.$_REQUEST['sort'].'' : 'created';
40 40
 
41
-                $pagenav = new \XoopsPageNav($ttl, $GLOBALS['limit'], $GLOBALS['start'], 'start', 'limit=' . $GLOBALS['limit'] . '&sort=' . $GLOBALS['sort'] . '&order=' . $GLOBALS['order'] . '&op=' . $GLOBALS['op'] . '&fct=' . $GLOBALS['fct'] . '&filter=' . $GLOBALS['filter']);
41
+                $pagenav = new \XoopsPageNav($ttl, $GLOBALS['limit'], $GLOBALS['start'], 'start', 'limit='.$GLOBALS['limit'].'&sort='.$GLOBALS['sort'].'&order='.$GLOBALS['order'].'&op='.$GLOBALS['op'].'&fct='.$GLOBALS['fct'].'&filter='.$GLOBALS['filter']);
42 42
                 $GLOBALS['xoopsTpl']->assign('pagenav', $pagenav->renderNav());
43 43
 
44 44
                 foreach ($songsHandler->filterFields() as $id => $key) {
45 45
                     $GLOBALS['xoopsTpl']->assign(
46
-                        \mb_strtolower(str_replace('-', '_', $key) . '_th'),
46
+                        \mb_strtolower(str_replace('-', '_', $key).'_th'),
47 47
                         '<a href="'
48 48
                         . $_SERVER['SCRIPT_NAME']
49 49
                         . '?start='
@@ -53,16 +53,16 @@  discard block
 block discarded – undo
53 53
                         . '&sort='
54 54
                         . $key
55 55
                         . '&order='
56
-                        . (($key == $GLOBALS['sort']) ? ('DESC' === $GLOBALS['order'] ? 'ASC' : 'DESC') : $GLOBALS['order'])
56
+                        . (($key==$GLOBALS['sort']) ? ('DESC'===$GLOBALS['order'] ? 'ASC' : 'DESC') : $GLOBALS['order'])
57 57
                         . '&op='
58 58
                         . $GLOBALS['op']
59 59
                         . '&filter='
60 60
                         . $GLOBALS['filter']
61 61
                         . '">'
62
-                        . (defined('_AM_SONGLIST_TH_' . \mb_strtoupper(str_replace('-', '_', $key))) ? constant('_AM_SONGLIST_TH_' . \mb_strtoupper(str_replace('-', '_', $key))) : '_AM_SONGLIST_TH_' . \mb_strtoupper(str_replace('-', '_', $key)))
62
+                        . (defined('_AM_SONGLIST_TH_'.\mb_strtoupper(str_replace('-', '_', $key))) ? constant('_AM_SONGLIST_TH_'.\mb_strtoupper(str_replace('-', '_', $key))) : '_AM_SONGLIST_TH_'.\mb_strtoupper(str_replace('-', '_', $key)))
63 63
                         . '</a>'
64 64
                     );
65
-                    $GLOBALS['xoopsTpl']->assign('filter_' . \mb_strtolower(str_replace('-', '_', $key)) . '_th', $songsHandler->getFilterForm($GLOBALS['filter'], $key, $GLOBALS['sort'], $GLOBALS['op'], $GLOBALS['fct']));
65
+                    $GLOBALS['xoopsTpl']->assign('filter_'.\mb_strtolower(str_replace('-', '_', $key)).'_th', $songsHandler->getFilterForm($GLOBALS['filter'], $key, $GLOBALS['sort'], $GLOBALS['op'], $GLOBALS['fct']));
66 66
                 }
67 67
 
68 68
                 $GLOBALS['xoopsTpl']->assign('limit', $GLOBALS['limit']);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
                 $criteria->setStart($GLOBALS['start']);
76 76
                 $criteria->setLimit($GLOBALS['limit']);
77
-                $criteria->setSort('`' . $GLOBALS['sort'] . '`');
77
+                $criteria->setSort('`'.$GLOBALS['sort'].'`');
78 78
                 $criteria->setOrder($GLOBALS['order']);
79 79
 
80 80
                 $songss = $songsHandler->getObjects($criteria, true);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 }
118 118
                 $songs->setVars($_POST[$id]);
119 119
 
120
-                if (Request::hasVar('mp3' . $id, 'FILES') && !empty($_FILES['mp3' . $id]['title'])) {
120
+                if (Request::hasVar('mp3'.$id, 'FILES') && !empty($_FILES['mp3'.$id]['title'])) {
121 121
 //                    if (!is_dir($GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas']))) {
122 122
 //                        foreach (explode('\\', $GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas'])) as $folders) {
123 123
 //                            foreach (explode('/', $folders) as $folder) {
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
                         explode('|', $GLOBALS['songlistModuleConfig']['mp3_extensions'])
140 140
                     );
141 141
                     try {
142
-                        $uploader->setPrefix(mb_substr(md5((string)microtime(true)), random_int(0, 20), 13));
142
+                        $uploader->setPrefix(mb_substr(md5((string) microtime(true)), random_int(0, 20), 13));
143 143
                     } catch (Exception $e) {
144 144
                     }
145 145
 
146
-                    if ($uploader->fetchMedia('mp3' . $id)) {
146
+                    if ($uploader->fetchMedia('mp3'.$id)) {
147 147
                         if (!$uploader->upload()) {
148 148
                             $adminObject = Admin::getInstance();
149 149
                             $adminObject->displayNavigation(basename(__FILE__));
@@ -152,10 +152,10 @@  discard block
 block discarded – undo
152 152
                             exit(0);
153 153
                         }
154 154
                         if (mb_strlen($songs->getVar('mp3'))) {
155
-                            unlink($GLOBALS['xoops']->path($songs->getVar('path')) . basename($songs->getVar('mp3')));
155
+                            unlink($GLOBALS['xoops']->path($songs->getVar('path')).basename($songs->getVar('mp3')));
156 156
                         }
157 157
 
158
-                        $songs->setVar('mp3', XOOPS_URL . '/' . str_replace(DS, '/', $GLOBALS['songlistModuleConfig']['upload_areas']) . $uploader->getSavedFileName());
158
+                        $songs->setVar('mp3', XOOPS_URL.'/'.str_replace(DS, '/', $GLOBALS['songlistModuleConfig']['upload_areas']).$uploader->getSavedFileName());
159 159
                     } else {
160 160
                         $adminObject = Admin::getInstance();
161 161
                         $adminObject->displayNavigation(basename(__FILE__));
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                     }
166 166
                 }
167 167
                 if (!$id = $songsHandler->insert($songs)) {
168
-                    redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_FAILEDTOSAVE);
168
+                    redirect_header($_SERVER['SCRIPT_NAME'].'?op='.$GLOBALS['op'].'&fct=list&limit='.$GLOBALS['limit'].'&start='.$GLOBALS['start'].'&order='.$GLOBALS['order'].'&sort='.$GLOBALS['sort'].'&filter='.$GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_FAILEDTOSAVE);
169 169
                     exit(0);
170 170
                 }
171 171
                 $extra = $extrasHandler->get($id);
@@ -173,19 +173,19 @@  discard block
 block discarded – undo
173 173
                 $extra->setVar('sid', $id);
174 174
                 $extrasHandler->insert($extra);
175 175
 
176
-                if ($GLOBALS['songlistModuleConfig']['tags'] && file_exists(XOOPS_ROOT_PATH . '/modules/tag/class/tag.php')) {
176
+                if ($GLOBALS['songlistModuleConfig']['tags'] && file_exists(XOOPS_ROOT_PATH.'/modules/tag/class/tag.php')) {
177 177
                     $tagHandler = \XoopsModules\Tag\Helper::getInstance()->getHandler('Tag');
178 178
                     $tagHandler->updateByItem($_POST['tags'], $id, $GLOBALS['songlistModule']->getVar('dirname'), $songs->getVar('cid'));
179 179
                 }
180 180
 
181
-                if ('new' === isset($_REQUEST['state']) ? $_REQUEST['state'][$_REQUEST['id']]:'') {
181
+                if ('new'===isset($_REQUEST['state']) ? $_REQUEST['state'][$_REQUEST['id']] : '') {
182 182
                     redirect_header(
183
-                        $_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=edit&id=' . $_REQUEST['id'] . '&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'],
183
+                        $_SERVER['SCRIPT_NAME'].'?op='.$GLOBALS['op'].'&fct=edit&id='.$_REQUEST['id'].'&limit='.$GLOBALS['limit'].'&start='.$GLOBALS['start'].'&order='.$GLOBALS['order'].'&sort='.$GLOBALS['sort'].'&filter='.$GLOBALS['filter'],
184 184
                         10,
185 185
                         _AM_SONGLIST_MSG_SONGS_SAVEDOKEY
186 186
                     );
187 187
                 } else {
188
-                    redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_SAVEDOKEY);
188
+                    redirect_header($_SERVER['SCRIPT_NAME'].'?op='.$GLOBALS['op'].'&fct=list&limit='.$GLOBALS['limit'].'&start='.$GLOBALS['start'].'&order='.$GLOBALS['order'].'&sort='.$GLOBALS['sort'].'&filter='.$GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_SAVEDOKEY);
189 189
                 }
190 190
                 exit(0);
191 191
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                 foreach ($_REQUEST['id'] as $id) {
198 198
                     $songs = $songsHandler->get($id);
199 199
                     $songs->setVars($_POST[$id]);
200
-                    if (Request::hasVar('mp3' . $id, 'FILES') && !empty($_FILES['mp3' . $id]['title'])) {
200
+                    if (Request::hasVar('mp3'.$id, 'FILES') && !empty($_FILES['mp3'.$id]['title'])) {
201 201
 //                        if (!is_dir($GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas']))) {
202 202
 //                            foreach (explode('\\', $GLOBALS['xoops']->path($GLOBALS['songlistModuleConfig']['upload_areas'])) as $folders) {
203 203
 //                                foreach (explode('/', $folders) as $folder) {
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
                             explode('|', $GLOBALS['songlistModuleConfig']['mp3_extensions'])
220 220
                         );
221 221
                         try {
222
-                            $uploader->setPrefix(mb_substr(md5((string)microtime(true)), random_int(0, 20), 13));
222
+                            $uploader->setPrefix(mb_substr(md5((string) microtime(true)), random_int(0, 20), 13));
223 223
                         } catch (Exception $e) {
224 224
                         }
225 225
 
226
-                        if ($uploader->fetchMedia('mp3' . $id)) {
226
+                        if ($uploader->fetchMedia('mp3'.$id)) {
227 227
                             if (!$uploader->upload()) {
228 228
                                 $adminObject = Admin::getInstance();
229 229
                                 $adminObject->displayNavigation(basename(__FILE__));
@@ -232,10 +232,10 @@  discard block
 block discarded – undo
232 232
                                 exit(0);
233 233
                             }
234 234
                             if (mb_strlen($songs->getVar('mp3'))) {
235
-                                unlink($GLOBALS['xoops']->path($songs->getVar('path')) . basename($songs->getVar('mp3')));
235
+                                unlink($GLOBALS['xoops']->path($songs->getVar('path')).basename($songs->getVar('mp3')));
236 236
                             }
237 237
 
238
-                            $songs->setVar('mp3', XOOPS_URL . '/' . str_replace(DS, '/', $GLOBALS['songlistModuleConfig']['upload_areas']) . $uploader->getSavedFileName());
238
+                            $songs->setVar('mp3', XOOPS_URL.'/'.str_replace(DS, '/', $GLOBALS['songlistModuleConfig']['upload_areas']).$uploader->getSavedFileName());
239 239
                         } else {
240 240
                             $adminObject = Admin::getInstance();
241 241
                             $adminObject->displayNavigation(basename(__FILE__));
@@ -246,14 +246,14 @@  discard block
 block discarded – undo
246 246
                     }
247 247
                     if (!$songsHandler->insert($songs)) {
248 248
                         redirect_header(
249
-                            $_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'],
249
+                            $_SERVER['SCRIPT_NAME'].'?op='.$GLOBALS['op'].'&fct=list&limit='.$GLOBALS['limit'].'&start='.$GLOBALS['start'].'&order='.$GLOBALS['order'].'&sort='.$GLOBALS['sort'].'&filter='.$GLOBALS['filter'],
250 250
                             10,
251 251
                             _AM_SONGLIST_MSG_SONGS_FAILEDTOSAVE
252 252
                         );
253 253
                         exit(0);
254 254
                     }
255 255
                 }
256
-                redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_SAVEDOKEY);
256
+                redirect_header($_SERVER['SCRIPT_NAME'].'?op='.$GLOBALS['op'].'&fct=list&limit='.$GLOBALS['limit'].'&start='.$GLOBALS['start'].'&order='.$GLOBALS['order'].'&sort='.$GLOBALS['sort'].'&filter='.$GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_SAVEDOKEY);
257 257
                 exit(0);
258 258
                 break;
259 259
             case 'delete':
@@ -263,13 +263,13 @@  discard block
 block discarded – undo
263 263
                     $songs = $songsHandler->get($id);
264 264
                     if (!$songsHandler->delete($songs)) {
265 265
                         redirect_header(
266
-                            $_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'],
266
+                            $_SERVER['SCRIPT_NAME'].'?op='.$GLOBALS['op'].'&fct=list&limit='.$GLOBALS['limit'].'&start='.$GLOBALS['start'].'&order='.$GLOBALS['order'].'&sort='.$GLOBALS['sort'].'&filter='.$GLOBALS['filter'],
267 267
                             10,
268 268
                             _AM_SONGLIST_MSG_SONGS_FAILEDTODELETE
269 269
                         );
270 270
                         exit(0);
271 271
                     }
272
-                    redirect_header($_SERVER['SCRIPT_NAME'] . '?op=' . $GLOBALS['op'] . '&fct=list&limit=' . $GLOBALS['limit'] . '&start=' . $GLOBALS['start'] . '&order=' . $GLOBALS['order'] . '&sort=' . $GLOBALS['sort'] . '&filter=' . $GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_DELETED);
272
+                    redirect_header($_SERVER['SCRIPT_NAME'].'?op='.$GLOBALS['op'].'&fct=list&limit='.$GLOBALS['limit'].'&start='.$GLOBALS['start'].'&order='.$GLOBALS['order'].'&sort='.$GLOBALS['sort'].'&filter='.$GLOBALS['filter'], 10, _AM_SONGLIST_MSG_SONGS_DELETED);
273 273
                     exit(0);
274 274
                 }
275 275
                 $songs = $songsHandler->get(Request::getInt('id', 0, 'REQUEST'));
Please login to merge, or discard this patch.