summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/pageutils.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php
index 216debd9a..cd01dcae7 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -311,13 +311,13 @@ function metaFN($id,$ext){
* returns an array of full paths to all metafiles of a given ID
*
* @author Esther Brunner <esther@kaffeehaus.ch>
+ * @author Michael Hamann <michael@content-space.de>
*/
function metaFiles($id){
- $name = noNS($id);
- $ns = getNS($id);
- $dir = ($ns) ? metaFN($ns,'').'/' : metaFN($ns,'');
- $files = glob($dir.$name.'.*', GLOB_MARK);
- return $files ? preg_grep('/^'.preg_quote($dir.$name, '/').'\.[^.\/]*$/u', $files) : array();
+ $basename = metaFN($id, '');
+ $files = glob($basename.'.*', GLOB_MARK);
+ // filter files like foo.bar.meta when $id == 'foo'
+ return $files ? preg_grep('/^'.preg_quote($basename, '/').'\.[^.\/]*$/u', $files) : array();
}
/**