From 7afb91f1c5d0df370fce74145c8bbe93fe77bcff Mon Sep 17 00:00:00 2001 From: Jeongkyu Shin Date: Mon, 17 Nov 2014 13:20:58 -0500 Subject: [PATCH] refs #1703 : enhanced - checkbox information is now saved. - --- .../owner/communication/comment/index.php | 26 ++++++++++++++++--- .../owner/communication/trackback/index.php | 20 +++++++++++--- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/interface/owner/communication/comment/index.php b/interface/owner/communication/comment/index.php index 8535f3722..081cda933 100644 --- a/interface/owner/communication/comment/index.php +++ b/interface/owner/communication/comment/index.php @@ -26,7 +26,8 @@ 'perPage' => array('int', 1, 'mandatory' => false), 'search' => array('string', 'default' => ''), 'withSearch' => array(array('on'), 'mandatory' => false), - 'status' => array('string', 'mandatory' => false) + 'status' => array('string', 'mandatory' => false), + 'deleteItemsFromSameIP' => array('int','mandatory' => false) ) ); require ROOT . '/library/preprocessor.php'; @@ -42,7 +43,7 @@ $perPage = Setting::getBlogSettingGlobal('rowsPerPage', 10); if (isset($_POST['perPage']) && is_numeric($_POST['perPage'])) { $perPage = $_POST['perPage']; - setBlogSetting('rowsPerPage', $_POST['perPage']); + Setting::setBlogSettingGlobal('rowsPerPage', $_POST['perPage']); } $tabsClass = array(); @@ -57,14 +58,30 @@ if($_POST['status']=='comment') { $tabsClass['comment'] = true; $visibilityText = _t('댓글'); + $midfix = 'Comment'; } else if($_POST['status']=='guestbook') { $tabsClass['guestbook'] = true; $visibilityText = _t('방명록'); + $midfix = 'Guestbook'; } } else { $tabsClass['comment'] = true; $visibilityText = _t('댓글'); + $midfix = 'Comment'; } + +$deleteCommentsFromSameIP = intval(Setting::getBlogSettingGlobal('delete'.$midfix.'sFromSameIP', 0)); + +if (isset($_POST['deleteItemsFromSameIP'])) { + if ($_POST['deleteItemsFromSameIP'] == '1') { + Setting::setBlogSettingGlobal('delete'.$midfix.'sFromSameIP',1); + $deleteCommentsFromSameIP = 1; + } else { + Setting::setBlogSettingGlobal('delete'.$midfix.'sFromSameIP',0); + $deleteCommentsFromSameIP = 0; + } +} + if(isset($tabsClass['comment']) && $tabsClass['comment'] == true) { list($comments, $paging) = getCommentsWithPagingForOwner($blogid, $categoryId, $name, $ip, $search, $suri['page'], $perPage); } else { @@ -292,7 +309,8 @@ function toggleThisTr(tr, isActive) { - + ;document.getElementById('list-form').submit();" /> + @@ -422,7 +440,7 @@ function toggleThisTr(tr, isActive) { - + " />
diff --git a/interface/owner/communication/trackback/index.php b/interface/owner/communication/trackback/index.php index 606dff7a0..9d848394d 100644 --- a/interface/owner/communication/trackback/index.php +++ b/interface/owner/communication/trackback/index.php @@ -28,7 +28,8 @@ 'withSearch' => array(array('on'), 'mandatory' => false), 'search' => array('string', 'default' => ''), 'perPage' => array('int', 1, 'mandatory' => false), - 'status' => array('string', 'mandatory' => false) + 'status' => array('string', 'mandatory' => false), + 'deleteItemsFromSameIP' => array('int','mandatory' => false) ) ); require ROOT . '/library/preprocessor.php'; @@ -42,7 +43,17 @@ $perPage = Setting::getBlogSettingGlobal('rowsPerPage', 10); if (isset($_POST['perPage']) && is_numeric($_POST['perPage'])) { $perPage = $_POST['perPage']; - setBlogSetting('rowsPerPage', $_POST['perPage']); + Setting::setBlogSettingGlobal('rowsPerPage', $_POST['perPage']); +} +$deleteTrackbacksFromSameIP = intval(Setting::getBlogSettingGlobal('deleteTrackbacksFromSameIP', 0)); +if (isset($_POST['deleteItemsFromSameIP'])) { + if ($_POST['deleteItemsFromSameIP'] == '1') { + Setting::setBlogSettingGlobal('deleteTrackbacksFromSameIP',1); + $deleteTrackbacksFromSameIP = 1; + } else { + Setting::setBlogSettingGlobal('deleteTrackbacksFromSameIP',0); + $deleteTrackbacksFromSameIP = 0; + } } $tabsClass = array(); @@ -323,7 +334,8 @@ function toggleThisTr(tr, isActive) { if(isset($tabsClass['received'])) { ?> - + + ;document.getElementById('list-form').submit();" /> @@ -472,7 +484,7 @@ function toggleThisTr(tr, isActive) { - + " />