1212 */
1313class helper_plugin_pluginrepo_repository extends Plugin
1414{
15- public array $ dokuReleases = []; // array of DokuWiki releases (name & date)
15+ private array $ dokuReleases = []; // array of DokuWiki releases (name & date)
1616
1717 public array $ types = [
1818 1 => 'Syntax ' ,
@@ -292,15 +292,15 @@ public function getPlugins($filter = null)
292292 $ sortsql = $ this ->getPluginsSortSql ($ sort );
293293
294294 $ alltypes = 0 ;
295- foreach (array_keys ($ this ->types ) as $ t ) {
296- $ alltypes += $ t ;
295+ foreach (array_keys ($ this ->types ) as $ number ) {
296+ $ alltypes += $ number ;
297297 }
298298
299299 if ($ tag ) {
300300 if ($ type < 1 || $ type > $ alltypes ) {
301301 $ type = $ alltypes ; //all types
302302 }
303- $ sql = "SELECT A.*, SUBSTR(A.plugin,10) as simplename
303+ $ sql = " SELECT A.*, SUBSTR(A.plugin,10) as simplename
304304 FROM plugins A
305305 WHERE A.type = 32 AND $ where_filtered
306306 AND (A.type & :plugin_type)
@@ -317,7 +317,7 @@ public function getPlugins($filter = null)
317317 $ values
318318 );
319319 } elseif ($ type > 0 && $ type <= $ alltypes ) {
320- $ sql = "SELECT A.*, SUBSTR(A.plugin,10) as simplename
320+ $ sql = " SELECT A.*, SUBSTR(A.plugin,10) as simplename
321321 FROM plugins A
322322 WHERE A.type = 32 AND $ where_filtered
323323 AND (A.type & :plugin_type)
@@ -427,8 +427,8 @@ public function getFilteredPlugins(
427427
428428 // default to all extensions
429429 if ($ type == 0 ) {
430- foreach (array_keys ($ this ->types ) as $ t ) {
431- $ type += $ t ;
430+ foreach (array_keys ($ this ->types ) as $ number ) {
431+ $ type += $ number ;
432432 }
433433 }
434434
@@ -1025,11 +1025,11 @@ public function parsetags($string)
10251025 public function listtype ($ type , $ target , $ sep = ', ' )
10261026 {
10271027 $ types = [];
1028- foreach ($ this ->types as $ k => $ v ) {
1029- if ($ type & $ k ) {
1030- $ url = wl ($ target , ['plugintype ' => $ k ]) . '#extension__table ' ;
1031- $ types [] = '<a href=" ' . $ url . '" class="wikilink1" title="List all ' . $ v . ' plugins"> '
1032- . $ v
1028+ foreach ($ this ->types as $ number => $ label ) {
1029+ if ($ type & $ number ) {
1030+ $ url = wl ($ target , ['plugintype ' => $ number ]) . '#extension__table ' ;
1031+ $ types [] = '<a href=" ' . $ url . '" class="wikilink1" title="List all ' . $ label . ' plugins"> '
1032+ . $ label
10331033 . '</a> ' ;
10341034 }
10351035 }
@@ -1046,9 +1046,9 @@ public function listtype($type, $target, $sep = ', ')
10461046 public function listtypes ($ type )
10471047 {
10481048 $ types = [];
1049- foreach ($ this ->types as $ k => $ v ) {
1050- if ($ type & $ k ) {
1051- $ types [] = $ v ;
1049+ foreach ($ this ->types as $ number => $ label ) {
1050+ if ($ type & $ number ) {
1051+ $ types [] = $ label ;
10521052 }
10531053 }
10541054 sort ($ types );
@@ -1064,9 +1064,9 @@ public function listtypes($type)
10641064 public function parsetype ($ types )
10651065 {
10661066 $ type = 0 ;
1067- foreach ($ this ->types as $ k => $ v ) {
1068- if (preg_match ('# ' . preg_quote ($ v ) . '#i ' , $ types )) {
1069- $ type += $ k ;
1067+ foreach ($ this ->types as $ number => $ label ) {
1068+ if (preg_match ('# ' . preg_quote ($ label ) . '#i ' , $ types )) {
1069+ $ type += $ number ;
10701070 }
10711071 }
10721072 if ($ type === 0 && $ types === '' ) {
0 commit comments