diff options
author | Michael Hamann <michael@content-space.de> | 2011-01-09 12:59:58 +0100 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2011-01-12 20:24:23 +0100 |
commit | 01032c33d1c2c00e6c2f04f0bdd9b9ac0057ded6 (patch) | |
tree | 8a7dae98599b552fbc8e4070c95e7aa880b012cc /inc/pageutils.php | |
parent | 283c7183458261e20d78d545539cdaa727ee1590 (diff) | |
download | rpg-01032c33d1c2c00e6c2f04f0bdd9b9ac0057ded6.tar.gz rpg-01032c33d1c2c00e6c2f04f0bdd9b9ac0057ded6.tar.bz2 |
Fix FS#2131 - metaFiles returning unrelated files
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r-- | inc/pageutils.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php index 5d24c12bb..216debd9a 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -316,9 +316,8 @@ function metaFiles($id){ $name = noNS($id); $ns = getNS($id); $dir = ($ns) ? metaFN($ns,'').'/' : metaFN($ns,''); - $files = array(); - $files = glob($dir.$name.'.*'); - return $files; + $files = glob($dir.$name.'.*', GLOB_MARK); + return $files ? preg_grep('/^'.preg_quote($dir.$name, '/').'\.[^.\/]*$/u', $files) : array(); } /** |