diff --git a/codepot/src/codepot/views/code_file.php b/codepot/src/codepot/views/code_file.php index 1b5750e6..223d4ff7 100644 --- a/codepot/src/codepot/views/code_file.php +++ b/codepot/src/codepot/views/code_file.php @@ -14,15 +14,24 @@ { if ($pn == 'svn:mime-type') { - if ($pv == 'application/octet-stream' && - in_array (strtolower($fileext), array ('png', 'jpg', 'gif', 'tif', 'bmp', 'ico'))) + if ($pv == 'application/octet-stream') { - $img = @imagecreatefromstring ($file['content']); - if ($img !== FALSE) + $lower_fileext = strtolower($fileext); + if (in_array ($lower_fileext, array ('png', 'jpg', 'gif', 'tif', 'bmp', 'ico'))) + { + $img = @imagecreatefromstring ($file['content']); + if ($img !== FALSE) + { + @imagedestroy ($img); + $is_image_file = TRUE; + $is_special_stream = TRUE; + break; + } + } + else if (in_array ($lower_fileext, array ('pdf'))) { - @imagedestroy ($img); - $is_image_file = TRUE; $is_special_stream = TRUE; + $is_pdf_file = TRUE; break; } } @@ -502,7 +511,7 @@ if ($login['settings'] != NULL && print '
'; print ''; print ''; - print ''; + print ''; print '/'; print ''; print ''; diff --git a/codepot/src/js/Makefile.in b/codepot/src/js/Makefile.in index a4992e55..9b86b637 100644 --- a/codepot/src/js/Makefile.in +++ b/codepot/src/js/Makefile.in @@ -181,7 +181,7 @@ www_DATA = \ medium-editor-tables.js \ showdown.js \ d3.min.js \ - CodeFlower.js \ + CodeFlower.js \ pdf.min.js \ pdf.worker.min.js