Skip to content

Commit

Permalink
Update posts.php
Browse files Browse the repository at this point in the history
pataisyta kodo vieta 274 eilutė core/tools/posts.php 

Signed-off-by: Darius Jakaitis <105962203+flusity@users.noreply.github.com>
  • Loading branch information
flusity committed Oct 24, 2023
1 parent 81252bc commit 6943991
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/tools/posts.php
Expand Up @@ -272,13 +272,17 @@ function loadPostAddForm(postMenuId) {
</script>
<?php
if (isset($_GET['edit_post_id'])) {
$edit_post_id = $_GET['edit_post_id'];
echo "<script>loadPostEditForm($edit_post_id);</script>";
$edit_post_id = filter_input(INPUT_GET, 'edit_post_id', FILTER_SANITIZE_NUMBER_INT);
$safe_edit_post_id = htmlspecialchars($edit_post_id, ENT_QUOTES, 'UTF-8');
echo "<script>loadPostEditForm($safe_edit_post_id);</script>";
}

if (isset($_GET['menu_id'])) {
$menu_id = $_GET['menu_id'];
echo "<script>loadPostAddForm($menu_id);</script>";
$menu_id = filter_input(INPUT_GET, 'menu_id', FILTER_SANITIZE_NUMBER_INT);
$safe_menu_id = htmlspecialchars($menu_id, ENT_QUOTES, 'UTF-8');
echo "<script>loadPostAddForm($safe_menu_id);</script>";
}

?>
<script src="js/admin-post-edit.js"></script>

Expand Down

0 comments on commit 6943991

Please sign in to comment.