Hi Folkes,
I get the error Warning: preg_match() [function.preg-match]: Compilation failed, in detail I get this error in my namespace tree:
Warning: preg_match() [function.preg-match]: Compilation failed: missing terminating ] for character class at offset 17 in /var/kunden/webs/myuser/lfep/inc/search.php on line 122
search.php looks like this:
Lines 107 - 126
/**
* Build the browsable index of pages
*
* $opts['ns'] is the currently viewed namespace
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function search_index(&$data,$base,$file,$type,$lvl,$opts){
global $conf;
$opts = array(
'pagesonly' => true,
'listdirs' => true,
'listfiles' => !$opts['nofiles'],
'sneakyacl' => $conf['sneaky_index'],
// Hacky, should rather use recmatch
'depth' => preg_match('#^'.$file.'(/|$)#','/'.$opts['ns']) ? 0 : -1
);
return search_universal($data, $base, $file, $type, $lvl, $opts);
}
Any idea, where I have to close the bracket? What is the solution here? Thanks in advance!
Regards