From 38d98806c0093210138b76580e6d59be81c94cb7 Mon Sep 17 00:00:00 2001 From: tomas <tomas@cfc7b370-4200-0410-a6e3-cb6bdb053afe> Date: Thu, 3 Feb 2005 02:19:47 +0000 Subject: [PATCH] Dummy metadata XML string returned from getMetaData if there is no metadata. --- livesupport/modules/storageServer/var/MetaData.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/livesupport/modules/storageServer/var/MetaData.php b/livesupport/modules/storageServer/var/MetaData.php index aa892d3a7..6d03bcc20 100644 --- a/livesupport/modules/storageServer/var/MetaData.php +++ b/livesupport/modules/storageServer/var/MetaData.php @@ -23,7 +23,7 @@ Author : $Author: tomas $ - Version : $Revision: 1.14 $ + Version : $Revision: 1.15 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/storageServer/var/MetaData.php,v $ ------------------------------------------------------------------------------*/ @@ -167,7 +167,10 @@ class MetaData{ function getMetaData() { // return $this->genXMLDoc(); // obsolete - return file_get_contents($this->fname); + if(file_exists($this->fname)) + return file_get_contents($this->fname); + else + return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<metadata/>\n"; } /**