Skip to content
Permalink
Browse files

Add lock after preview on encrypted files in build diffs

  • Loading branch information...
Marlamin committed Aug 9, 2019
1 parent df4b80a commit 705d3148975ec23899cb8014b385c569bbdad8d4
Showing with 6 additions and 2 deletions.
  1. +6 −2 builds/diff_new.php
@@ -18,6 +18,7 @@
$fromBuildName = parseBuildName($fromBuild['description'])['full'];
$toBuildName = parseBuildName($toBuild['description'])['full'];
$encrypted = $pdo->query("SELECT filedataid FROM wow_encrypted")->fetchAll(PDO::FETCH_COLUMN);
?>
<link href="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.19/css/dataTables.bootstrap4.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.19/js/jquery.dataTables.min.js"></script>
@@ -57,6 +58,7 @@ function actionToBadge(action){
}
$(document).ready(function() {
var encrypted = <?=json_encode($encrypted)?>;
var table = $('#buildtable').DataTable({
ajax: '//wow.tools/casc/root/diff_api?from=<?=$fromBuild['root_cdn']?>&to=<?=$toBuild['root_cdn']?>&cb=<?=strtotime("now")?>',
columns: [{
@@ -156,7 +158,9 @@ function actionToBadge(action){
}
break;
}
if(encrypted.includes(parseInt(full.id))){
content += " <i style=\"color: red\" title=\"File is encrypted, preview might be broken\" class=\"fa fa-lock\"></i>";
}
return content;
}
}
@@ -214,7 +218,7 @@ function actionToBadge(action){
<th style='width: 170px;'>FileData ID</th>
<th>Filename</th>
<th style='width: 50px'>Type</th>
<th style='width: 85px'>&nbsp;</th>
<th style='width: 95px'>&nbsp;</th>
</tr>
</thead>
</table>

0 comments on commit 705d314

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