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
class NonRetardedSSP {
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 */

View file

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

View file

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

View file

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

View file

@ -34,7 +34,8 @@
</div>
</div>
<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>
<small>Coming soon</small>
</div>

View file

@ -264,7 +264,9 @@
$f_dateui = $f_date->format("d F Y");
$Recent_update = new DateTime($row['updated_at']);
$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);
//$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";