mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 23:58:54 +01:00
added in ability to handle mltiple values for each entry, plus started with teh regexp for limiting to only class.*.inc.php
This commit is contained in:
parent
e237d169f4
commit
3531c010df
@ -21,9 +21,16 @@
|
|||||||
|
|
||||||
if ($fn)
|
if ($fn)
|
||||||
{
|
{
|
||||||
|
if (preg_match("/^class\.[a-zA-Z0-9]\.inc\.php+$/i",$fn)){
|
||||||
$files[] = $fn;
|
$files[] = $fn;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
echo 'No valid file selected';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
$d = dir('../'.$app.'/inc/');
|
$d = dir('../'.$app.'/inc/');
|
||||||
while ($x = $d->read())
|
while ($x = $d->read())
|
||||||
@ -34,6 +41,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$d->close;
|
$d->close;
|
||||||
|
|
||||||
|
reset($files);
|
||||||
|
|
||||||
|
while(list($key, $value) = each($files))
|
||||||
|
{
|
||||||
|
//echo '$key = '.$key.' and $value = '.$value.'<br>';
|
||||||
|
if (!preg_match("/^(class\.).(\.inc\.php)+$/i",$value)){
|
||||||
|
//unset($files[$key]);
|
||||||
|
//echo '#'.$key.' is bad, and should be unset<br>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
reset($files);
|
reset($files);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,7 +105,7 @@
|
|||||||
|
|
||||||
if($out != $new[0])
|
if($out != $new[0])
|
||||||
{
|
{
|
||||||
$elements[$class][$t][$xkey] = $out;
|
$elements[$class][$t][$xkey][] = $out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user