Implemented possibliity to open links in new window even if not on homepage (suggested by Marco Sousa - fixes CT#1879)

skala
Yannick Warnier 16 years ago
parent 8ce719150f
commit 29f92689d7
  1. 20
      main/link/link.php
  2. 12
      main/link/linkfunctions.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
}
});
} );
</script>';

@ -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'])."'";

Loading…
Cancel
Save