mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 04:23:01 +00:00
Fix #71 (It says "Original Image" for PDFs).
This commit is contained in:
parent
020b1ff32f
commit
0258757639
3 changed files with 9 additions and 3 deletions
|
@ -3002,11 +3002,14 @@ register_module([
|
|||
{
|
||||
case "application":
|
||||
case "image":
|
||||
if($mime_type == "application/pdf")
|
||||
$fileTypeDisplay = "file";
|
||||
|
||||
$preview_sizes = [ 256, 512, 768, 1024, 1440 ];
|
||||
$preview_html .= "\t\t\t<figure class='preview'>
|
||||
<img src='$previewUrl' />
|
||||
<nav class='image-controls'>
|
||||
<ul><li><a href='" . ($env->storage_prefix == "./" ? $filepath : "?action=preview&size=original&page=" . rawurlencode($env->page)) . "'>🌄 Original image</a></li>";
|
||||
<ul><li><a href='" . ($env->storage_prefix == "./" ? $filepath : "?action=preview&size=original&page=" . rawurlencode($env->page)) . "'>🌄 Original $fileTypeDisplay</a></li>";
|
||||
if($mime_type !== "image/svg+xml")
|
||||
{
|
||||
$preview_html .= "<li>Other Sizes: ";
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
"author": "Starbeamrainbowlabs",
|
||||
"description": "Adds the ability to upload files to Pepperminty Wiki. Uploaded files act as pages and have the special 'File\/' prefix.",
|
||||
"id": "feature-upload",
|
||||
"lastupdate": 1465043339,
|
||||
"lastupdate": 1465043901,
|
||||
"optional": false
|
||||
},
|
||||
{
|
||||
|
|
|
@ -356,11 +356,14 @@ register_module([
|
|||
{
|
||||
case "application":
|
||||
case "image":
|
||||
if($mime_type == "application/pdf")
|
||||
$fileTypeDisplay = "file";
|
||||
|
||||
$preview_sizes = [ 256, 512, 768, 1024, 1440 ];
|
||||
$preview_html .= "\t\t\t<figure class='preview'>
|
||||
<img src='$previewUrl' />
|
||||
<nav class='image-controls'>
|
||||
<ul><li><a href='" . ($env->storage_prefix == "./" ? $filepath : "?action=preview&size=original&page=" . rawurlencode($env->page)) . "'>🌄 Original image</a></li>";
|
||||
<ul><li><a href='" . ($env->storage_prefix == "./" ? $filepath : "?action=preview&size=original&page=" . rawurlencode($env->page)) . "'>🌄 Original $fileTypeDisplay</a></li>";
|
||||
if($mime_type !== "image/svg+xml")
|
||||
{
|
||||
$preview_html .= "<li>Other Sizes: ";
|
||||
|
|
Loading…
Reference in a new issue