Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
update: check log file being viewed, for easy deletion log_viewer.php
Browse files Browse the repository at this point in the history
fix: empty $cats partials/categories.php
  • Loading branch information
darkalchemy committed Feb 3, 2019
1 parent 43d7c87 commit 0352e85
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
bump: version to .6
update: README
update: dependencies
update: check log file being viewed, for easy deletion log_viewer.php
fix: empty $cats partials/categories.php

### 28 Jan, 2019
update: composer.json
Expand Down
2 changes: 1 addition & 1 deletion admin/log_viewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class_check($class);
" . mksize(filesize($file)) . "
</td>
<td class='has-text-centered w-10'>
<input type='checkbox' name='logs[]' value='" . urlencode($file) . "'>
<input type='checkbox' name='logs[]' value='" . urlencode($file) . "'" . (!empty($_GET['file']) && $_GET['file'] === $file ? ' checked' : '') . ">
</td>
</tr>";
}
Expand Down
16 changes: 9 additions & 7 deletions partials/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
<div id='parents' class='level-center'>";

$children = '';
foreach ($grouped as $cat) {
$main_div .= format_row($cat, 'parent', $cat['name']);
$children .= "
if (!empty($cats) && is_array($cats)) {
foreach ($grouped as $cat) {
$main_div .= format_row($cat, 'parent', $cat['name']);
$children .= "
<div id='{$cat['name']}' class='top20 level-center children padding20 bg-02 round10" . (!in_array($cat['id'], $cats) ? ' is_hidden' : '') . "'>";
foreach ($cat['children'] as $child) {
$children .= format_row($child, 'child', $cat['name']);
}
$children .= '
foreach ($cat['children'] as $child) {
$children .= format_row($child, 'child', $cat['name']);
}
$children .= '
</div>';
}
}

$main_div .= "
Expand Down

0 comments on commit 0352e85

Please sign in to comment.