diff --git a/main/link/link.php b/main/link/link.php index dd778147a5..6a6dd3ad6e 100755 --- a/main/link/link.php +++ b/main/link/link.php @@ -39,26 +39,6 @@ $(document).ready( function() { $(".actions:eq("+i+")").hide(); } } - - $("#div_target").attr("style","display:none;")//hide - - $("#id_check_target").click(function () { - if($(this).attr("checked")==true) { - $("#div_target").attr("style","display:block;")//show - } else { - $("#div_target").attr("style","display:none;")//hide - } - }); - - $(window).load(function () { - if($("#id_check_target").attr("checked")==true) { - $("#div_target").attr("style","display:block;")//show - } else { - $("#div_target").attr("style","display:none;")//hide - } - }); - - } ); '; diff --git a/main/link/linkfunctions.php b/main/link/linkfunctions.php index cc42d3923d..18e3344d44 100755 --- a/main/link/linkfunctions.php +++ b/main/link/linkfunctions.php @@ -318,14 +318,10 @@ function editlinkcategory($type) { // This is used to put the modified info of the link-form into the database if ($_POST['submitLink']) { - if ($_POST['onhomepage'] == '') { - $onhomepage = 0; - $mytarget = ''; - } else { - $onhomepage = Security::remove_XSS($_POST['onhomepage']); - $target = Security::remove_XSS($_POST['target_link']); - $mytarget = ",target='".$target."'"; - } + $onhomepage = Security::remove_XSS($_POST['onhomepage']); + $target = Security::remove_XSS($_POST['target_link']); + if (empty($mytarget)) { $mytarget = '_self'; } + $mytarget = ",target='".$target."'"; // Finding the old category_id $sql = "SELECT * FROM ".$tbl_link." WHERE id='".intval($_POST['id'])."'";