"use application/vnd.ms-excel for downloading excel 2003 xml format"

This commit is contained in:
Ralf Becker 2009-11-14 16:08:26 +00:00
parent 003420713b
commit fe41f199bc

View File

@ -587,10 +587,17 @@ abstract class bo_merge
}
else
{
if ($mimetype == 'application/xml' && strpos($merged,'<?mso-application progid="Word.Document"?>') !== false)
if ($mimetype == 'application/xml')
{
if (strpos($merged,'<?mso-application progid="Word.Document"?>') !== false)
{
$mimetype = 'application/msword'; // to open it automatically in word or oowriter
}
elseif (strpos($merged,'<?mso-application progid="Excel.Sheet"?>') !== false)
{
$mimetype = 'application/vnd.ms-excel'; // to open it automatically in excel or oocalc
}
}
ExecMethod2('phpgwapi.browser.content_header',basename($document),$mimetype);
echo $merged;
}