enhanced wiki detection in code_file.php

This commit is contained in:
hyung-hwan 2019-07-30 07:43:30 +00:00
parent 4557870d9c
commit ab5dcb43f7

View File

@ -63,10 +63,16 @@
} }
} }
if ($octet_stream) $is_special_stream = TRUE; if ($octet_stream) $is_special_stream = TRUE;
if (!$is_special_stream) goto check_for_wiki;
} }
else if (in_array($fileext, array('md', 'wc'))) else
{ {
$is_wiki_file = TRUE; check_for_wiki:
if (in_array($fileext, array('md', 'wc')))
{
$is_wiki_file = TRUE;
}
} }
?> ?>
@ -672,7 +678,7 @@ $(function () {
}); });
<?php if ($is_wiki_file): ?> <?php if ($is_wiki_file): ?>
<?php if ($fileext == "wc"): ?> <?php if ($fileext == "wc"): ?>
render_wiki_wc (); render_wiki_wc ();
<?php else: ?> <?php else: ?>