Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Nov 13, 2023
1 parent 59cea8d commit 3e55861
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions conf/default.php
@@ -1,7 +1,9 @@
<?php

/**
* Default settings for the simplenavi plugin
*/

$conf['natsort'] = 1;
$conf['nsfirst'] = 1;
$conf['usetitle'] = 1;
2 changes: 2 additions & 0 deletions conf/metadata.php
@@ -1,7 +1,9 @@
<?php

/**
* Options for the simplenavi plugin
*/

$meta['natsort'] = array('onoff');
$meta['nsfirst'] = array('onoff');
$meta['usetitle'] = array('onoff');
8 changes: 4 additions & 4 deletions syntax.php
Expand Up @@ -244,10 +244,10 @@ public function cbSearch(&$data, $base, $file, $type, $lvl, $opts)
$id = pathID($file);

if (
$type == 'd' && !(
preg_match('#^' . $id . '(:|$)#', $opts['currentID']) ||
preg_match('#^' . $id . '(:|$)#', getNS($opts['currentID']))

$type == 'd' &&
(
!preg_match('#^' . $id . '(:|$)#', $opts['currentID']) &&
!preg_match('#^' . $id . '(:|$)#', getNS($opts['currentID']))
)
) {
//add but don't recurse
Expand Down

0 comments on commit 3e55861

Please sign in to comment.