diff --git a/upload/source/include/misc/misc_ajax.php b/upload/source/include/misc/misc_ajax.php index 008a24f381e8c4770ca2e489f1234ac826beaeed..05f21e01fcf1c8dbf22d5a8a110e6739ef63f656 100644 --- a/upload/source/include/misc/misc_ajax.php +++ b/upload/source/include/misc/misc_ajax.php @@ -143,7 +143,7 @@ if($op == 'comment') { } $id = intval($_GET['id']); if($id) { - C::t('home_notification')->delete_by_id_uid($id, $uid); + C::t('home_notification')->delete_by_id_uid($id, $_G['uid']); } showmessage('do_success'); diff --git a/upload/source/include/spacecp/spacecp_common.php b/upload/source/include/spacecp/spacecp_common.php index 207e3ef881e748a9dd1a6711cce272d89df753ad..f5064ff52c1f6017ae79a8b49636b90903db382b 100644 --- a/upload/source/include/spacecp/spacecp_common.php +++ b/upload/source/include/spacecp/spacecp_common.php @@ -16,6 +16,7 @@ $op = empty($_GET['op'])?'':trim($_GET['op']); if($op == 'ignore') { $type = empty($_GET['type'])?'':preg_replace("/[^0-9a-zA-Z\_\-\.]/", '', $_GET['type']); + $id = empty($_GET['id']) ? 0 : intval($_GET['id']); if(submitcheck('ignoresubmit')) { $authorid = empty($_POST['authorid']) ? 0 : intval($_POST['authorid']); if($type) { @@ -26,7 +27,7 @@ if($op == 'ignore') { $space['privacy']['filter_note'][$type_uid] = $type_uid; privacy_update(); } - showmessage('do_success', dreferer(), array(), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true)); + showmessage('do_success', dreferer(), array('id' => $id ,'type' => $type ,'uid' => $authorid), array('showdialog'=>1, 'showmsg' => true, 'closetime' => true)); } $formid = random(8); diff --git a/upload/template/default/home/space_notice.htm b/upload/template/default/home/space_notice.htm index cadeb1b4c1a9a13a87449ba2a2219fddec4d205e..6b2067e311bb129455e7ec8b83b05bd6eca8cfe0 100644 --- a/upload/template/default/home/space_notice.htm +++ b/upload/template/default/home/space_notice.htm @@ -54,13 +54,22 @@ function errorhandle_pokeignore(msg, values) { deleteQueryNotice(values['uid'], 'pokeQuery'); } + function succeedhandle_noticeignore(url,msg, values) { + if(values['type'] == "poke") { + deleteQueryNotice(values['uid'], 'pokeQuery'); + } else if(values['type'] == "friend" ) { + deleteQueryNotice(values['uid'], 'pendingFriend'); + } else { + deleteQueryNotice(values['id'], 'notice'); + } + }