Skip to content

Commit 186263b

Browse files
committed
Apply PSR-12 to media_nstree() function
1 parent de301a3 commit 186263b

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

inc/media.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,13 +1674,13 @@ function media_nstree($ns)
16741674
global $lang;
16751675

16761676
// currently selected namespace
1677-
$ns = cleanID($ns);
1677+
$ns = cleanID($ns);
16781678
if (empty($ns)) {
16791679
global $ID;
16801680
$ns = (string)getNS($ID);
16811681
}
16821682

1683-
$ns_dir = utf8_encodeFN(str_replace(':', '/', $ns));
1683+
$ns_dir = utf8_encodeFN(str_replace(':', '/', $ns));
16841684

16851685
$data = [];
16861686
search($data, $conf['mediadir'], 'search_index', ['ns' => $ns_dir, 'nofiles' => true]);
@@ -1694,8 +1694,11 @@ function media_nstree($ns)
16941694
$pos = 0;
16951695
$insert = false;
16961696
foreach ($ns_parts as $level => $part) {
1697-
if ($tmp_ns) $tmp_ns .= ':' . $part;
1698-
else $tmp_ns = $part;
1697+
if ($tmp_ns) {
1698+
$tmp_ns .= ':' . $part;
1699+
} else {
1700+
$tmp_ns = $part;
1701+
}
16991702

17001703
// find the namespace parts
17011704
while (array_key_exists($pos, $data) && $data[$pos]['id'] != $tmp_ns) {

0 commit comments

Comments
 (0)