Skip to content
Permalink
Browse files

Merge pull request #37 from bloerwald/master

 build diffs/previews: treat html, htm,  txt as text files
  • Loading branch information...
Marlamin committed Aug 13, 2019
2 parents 6595f44 + 0918d56 commit 90ad8e44e662d3f29dc0a0088c323abf0e0fd02e
Showing with 6 additions and 3 deletions.
  1. +5 −2 builds/diff_new.php
  2. +1 −1 files/scripts/preview_api.php
@@ -132,11 +132,14 @@ function actionToBadge(action){
}
break;
case "blp":
case "htm":
case "html":
case "lua":
case "xsd":
case "xml":
case "sbt":
case "toc":
case "txt":
case "xml":
case "xsd":
content = "<a style='cursor: pointer' data-toggle='modal' data-target='#previewModal' onClick='fillDiffModal(\"<?= $fromBuild['hash'] ?>\", \"<?= $toBuild['hash'] ?>\", \"" + full.id + "\")'>Preview</a>";
break;
default:
@@ -78,7 +78,7 @@ function downloadFile($params, $outfile){
<div class="tab-pane" id="raw" role="tabpanel" aria-labelledby="raw-tab"><pre style='max-height: 500px;'><code><?=htmlentities($output)?></pre></code></div>
</div>
<?php
}else if($type == "xml" || $type == "xsd" || $type == "lua" || $type == "toc"){
}else if($type == "xml" || $type == "xsd" || $type == "lua" || $type == "toc" || $type == "htm" || $type == "html" || $type == "sbt" || $type == "txt"){
echo "<pre style='max-height: 500px;'><code>".htmlentities(file_get_contents($tempfile))."</pre></code>";
}else{
// dump via hd

0 comments on commit 90ad8e4

Please sign in to comment.
You can’t perform that action at this time.