Reformat code.

This commit is contained in:
Floorb 2021-08-22 22:05:26 -04:00
parent 7cd0aec39e
commit 9349d245a0
19 changed files with 1558 additions and 834 deletions

View file

@ -1,4 +1,5 @@
<?php <?php
class NonRetardedSSP { class NonRetardedSSP {
public static function run(DatabaseHandle $conn, array $request, string $countQuery, string $query) { public static function run(DatabaseHandle $conn, array $request, string $countQuery, string $query) {
/* Some of these parameters might not be passed; zero is an OK default */ /* Some of these parameters might not be passed; zero is an OK default */

View file

@ -40,7 +40,9 @@ function getreports($conn, $count = 10) {
function tagsToHtml(string|array $tags) : string { function tagsToHtml(string|array $tags) : string {
$output = ""; $output = "";
if (is_array($tags)) { if (is_array($tags)) {
$tagsSplit = array_map(function($tag) { return $tag['name']; }, $tags); $tagsSplit = array_map(function ($tag) {
return $tag['name'];
}, $tags);
} else { } else {
$tagsSplit = explode(",", $tags); $tagsSplit = explode(",", $tags);
} }

View file

@ -355,7 +355,6 @@ CONTENT HERE!
</footer> </footer>
<script> <script>
const whenReady = (callback) => { const whenReady = (callback) => {
if (document.readyState !== 'loading') { if (document.readyState !== 'loading') {

File diff suppressed because it is too large Load diff

View file

@ -4,11 +4,13 @@ table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
cursor: default !important; cursor: default !important;
background-color: #e8e8e8; background-color: #e8e8e8;
} }
table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before, table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before, table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before { table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
display: none !important; display: none !important;
} }
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control, table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control { table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
position: relative; position: relative;
@ -16,6 +18,7 @@ table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
padding-top: 25px; padding-top: 25px;
cursor: pointer; cursor: pointer;
} }
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before, table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before { table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
top: 50%; top: 50%;
@ -36,14 +39,17 @@ table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
content: "\f054"; content: "\f054";
color: #3298dc; color: #3298dc;
} }
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before, table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before { table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
content: "\f078"; content: "\f078";
} }
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control, table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control { table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control {
padding-left: 27px; padding-left: 27px;
} }
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control:before, table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control:before { table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control:before {
left: 4px; left: 4px;
@ -53,6 +59,7 @@ table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control:befor
line-height: 14px; line-height: 14px;
text-indent: 3px; text-indent: 3px;
} }
table.dataTable.dtr-column > tbody > tr > td.dtr-control, table.dataTable.dtr-column > tbody > tr > td.dtr-control,
table.dataTable.dtr-column > tbody > tr > th.dtr-control, table.dataTable.dtr-column > tbody > tr > th.dtr-control,
table.dataTable.dtr-column > tbody > tr > td.control, table.dataTable.dtr-column > tbody > tr > td.control,
@ -60,6 +67,7 @@ table.dataTable.dtr-column > tbody > tr > th.control {
position: relative; position: relative;
cursor: pointer; cursor: pointer;
} }
table.dataTable.dtr-column > tbody > tr > td.dtr-control:before, table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr > th.dtr-control:before, table.dataTable.dtr-column > tbody > tr > th.dtr-control:before,
table.dataTable.dtr-column > tbody > tr > td.control:before, table.dataTable.dtr-column > tbody > tr > td.control:before,
@ -82,39 +90,48 @@ table.dataTable.dtr-column > tbody > tr > th.control:before {
content: "\f054"; content: "\f054";
color: #3298dc; color: #3298dc;
} }
table.dataTable.dtr-column > tbody > tr.parent td.dtr-control:before, table.dataTable.dtr-column > tbody > tr.parent td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.parent th.dtr-control:before, table.dataTable.dtr-column > tbody > tr.parent th.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.parent td.control:before, table.dataTable.dtr-column > tbody > tr.parent td.control:before,
table.dataTable.dtr-column > tbody > tr.parent th.control:before { table.dataTable.dtr-column > tbody > tr.parent th.control:before {
content: "\f078"; content: "\f078";
} }
table.dataTable > tbody > tr.child { table.dataTable > tbody > tr.child {
padding: 0.5em 1em; padding: 0.5em 1em;
} }
table.dataTable > tbody > tr.child:hover { table.dataTable > tbody > tr.child:hover {
background: transparent !important; background: transparent !important;
} }
table.dataTable > tbody > tr.child ul.dtr-details { table.dataTable > tbody > tr.child ul.dtr-details {
display: inline-block; display: inline-block;
list-style-type: none; list-style-type: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
table.dataTable > tbody > tr.child ul.dtr-details > li { table.dataTable > tbody > tr.child ul.dtr-details > li {
border-bottom: 1px solid #efefef; border-bottom: 1px solid #efefef;
padding: 0.5em 0; padding: 0.5em 0;
} }
table.dataTable > tbody > tr.child ul.dtr-details > li:first-child { table.dataTable > tbody > tr.child ul.dtr-details > li:first-child {
padding-top: 0; padding-top: 0;
} }
table.dataTable > tbody > tr.child ul.dtr-details > li:last-child { table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
border-bottom: none; border-bottom: none;
} }
table.dataTable > tbody > tr.child span.dtr-title { table.dataTable > tbody > tr.child span.dtr-title {
display: inline-block; display: inline-block;
min-width: 75px; min-width: 75px;
font-weight: bold; font-weight: bold;
} }
div.dtr-modal { div.dtr-modal {
position: fixed; position: fixed;
box-sizing: border-box; box-sizing: border-box;
@ -125,6 +142,7 @@ div.dtr-modal {
z-index: 100; z-index: 100;
padding: 10em 1em; padding: 10em 1em;
} }
div.dtr-modal div.dtr-modal-display { div.dtr-modal div.dtr-modal-display {
position: absolute; position: absolute;
top: 0; top: 0;
@ -142,10 +160,12 @@ div.dtr-modal div.dtr-modal-display {
border-radius: 0.5em; border-radius: 0.5em;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
} }
div.dtr-modal div.dtr-modal-content { div.dtr-modal div.dtr-modal-content {
position: relative; position: relative;
padding: 1em; padding: 1em;
} }
div.dtr-modal div.dtr-modal-close { div.dtr-modal div.dtr-modal-close {
position: absolute; position: absolute;
top: 6px; top: 6px;
@ -159,9 +179,11 @@ div.dtr-modal div.dtr-modal-close {
cursor: pointer; cursor: pointer;
z-index: 12; z-index: 12;
} }
div.dtr-modal div.dtr-modal-close:hover { div.dtr-modal div.dtr-modal-close:hover {
background-color: #eaeaea; background-color: #eaeaea;
} }
div.dtr-modal div.dtr-modal-background { div.dtr-modal div.dtr-modal-background {
position: fixed; position: fixed;
top: 0; top: 0;
@ -171,6 +193,7 @@ div.dtr-modal div.dtr-modal-background {
z-index: 101; z-index: 101;
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
} }
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
div.dtr-modal div.dtr-modal-display { div.dtr-modal div.dtr-modal-display {
width: 95%; width: 95%;

View file

@ -6,13 +6,16 @@ table.dt-rowReorder-float {
outline-offset: -2px; outline-offset: -2px;
z-index: 2001; z-index: 2001;
} }
tr.dt-rowReorder-moving { tr.dt-rowReorder-moving {
outline: 2px solid #555; outline: 2px solid #555;
outline-offset: -2px; outline-offset: -2px;
} }
body.dt-rowReorder-noOverflow { body.dt-rowReorder-noOverflow {
overflow-x: hidden; overflow-x: hidden;
} }
table.dataTable td.reorder { table.dataTable td.reorder {
text-align: center; text-align: center;
cursor: move; cursor: move;

View file

@ -34,7 +34,8 @@
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<button disabled type="submit" name="Gen_key" class="button is-info">Generate New Key</button> <button disabled type="submit" name="Gen_key" class="button is-info">Generate New Key
</button>
<br> <br>
<small>Coming soon</small> <small>Coming soon</small>
</div> </div>

View file

@ -264,7 +264,9 @@
$f_dateui = $f_date->format("d F Y"); $f_dateui = $f_date->format("d F Y");
$Recent_update = new DateTime($row['updated_at']); $Recent_update = new DateTime($row['updated_at']);
$Recent_update_u = date_format($Recent_update, 'U'); $Recent_update_u = date_format($Recent_update, 'U');
$tagArray2 = array_map(function ($tag) { return $tag['name'];}, getPasteTags($conn, $f_id)); $tagArray2 = array_map(function ($tag) {
return $tag['name'];
}, getPasteTags($conn, $f_id));
$f_tags = implode(',', $tagArray2); $f_tags = implode(',', $tagArray2);
//$p_link = ($mod_rewrite == '1') ? "$f_id" : "paste.php?favdel=$fu_id"; //$p_link = ($mod_rewrite == '1') ? "$f_id" : "paste.php?favdel=$fu_id";
//$f_delete_link = ($mod_rewrite == '1') ? "user.php?favdel&user=$profile_username&fid=$f_id" : "user.php?favdel&user=$profile_username&fid=$f_id"; //$f_delete_link = ($mod_rewrite == '1') ? "user.php?favdel&user=$profile_username&fid=$f_id" : "user.php?favdel&user=$profile_username&fid=$f_id";