Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix #215 -> now can preview office files (.docx,...) if the extension…
Browse files Browse the repository at this point in the history
… is in uppercase
  • Loading branch information
thomasCresson committed Jul 10, 2013
1 parent 4cfb3c9 commit d6f2c63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/plugins/editor.imagick/class.IMagickPreviewer.php
Expand Up @@ -177,7 +177,7 @@ protected function listPreviewFiles($file, $prefix){
$index = 0;
if(isset($this->pluginConf["UNOCONV"]) && !empty($this->pluginConf["UNOCONV"])){
$officeExt = array('xls', 'xlsx', 'ods', 'doc', 'docx', 'odt', 'ppt', 'pptx', 'odp', 'rtf');
$extension = pathinfo($file, PATHINFO_EXTENSION);
$extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
if(in_array($extension, $officeExt)){
$unoDoc = $prefix."_unoconv.pdf";
if(is_file($unoDoc)) $file = $unoDoc;
Expand Down Expand Up @@ -205,7 +205,7 @@ public function generateJpegsCallback($masterFile, $targetFile){
$officeExt = array('xls', 'xlsx', 'ods', 'doc', 'docx', 'odt', 'ppt', 'pptx', 'odp', 'rtf');
}

$extension = pathinfo($masterFile, PATHINFO_EXTENSION);
$extension = strtolower(pathinfo($masterFile, PATHINFO_EXTENSION));
$node = new AJXP_Node($masterFile);
$masterFile = $node->getRealFile();

Expand Down

0 comments on commit d6f2c63

Please sign in to comment.