diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 23e994d4bc8..01c3310a3f8 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -525,7 +525,7 @@ IMG; public function addImageToManifest($file) { // Get the file extension - $ext = substr(strrchr($val, '.'), 1); + $ext = substr(strrchr($file, '.'), 1); // Create the correct image XML entry to add to the manifest (this is necessary because ODT format requires that we keep a list of the images in the manifest.xml) $add = ' '."\n"; // Append the image to the manifest @@ -539,7 +539,7 @@ IMG; * @throws OdfException * @return void */ - public function exportAsAttachedFile($name="") + public function exportAsAttachedFile($name = "") { $this->_save(); if (headers_sent($filename, $linenum)) { @@ -772,6 +772,4 @@ IMG; $this->contentXml = preg_replace($searchreg, "", $this->contentXml); return $matches[1]; } - } -