r2347 updated getFileLinks so it doesn't return empty parent names (otherwise hrefs...
authorAaron Dummer <aaron@dummer.info>
Fri, 16 Jan 2009 17:37:51 +0000 (17:37 +0000)
committerAaron Dummer <aaron@dummer.info>
Fri, 16 Jan 2009 17:37:51 +0000 (17:37 +0000)
inc/database.php

index 372ad79..8953135 100644 (file)
@@ -3629,6 +3629,10 @@ function getFileLinks ($file_id = 0)
                                break;
                }
 
+               // name needs to have some value for hrefs to work
+        if (empty($name))
+                       $name = sprintf("[Unnamed %s]", formatEntityName($row['entity_type']));
+
                $ret[$row['id']] = array(
                                'page' => $page,
                                'id_name' => $id_name,