Example #1
0
function DEFENSIO_Quarantine()
{
    // remove all
    global $blogid, $pluginMenuURL, $pluginURL, $pluginSelfParam, $blog, $user, $blogURL, $defaultURL, $hostURL, $service, $skinSetting, $configVal, $suri;
    $comment_TYPE = !empty($_GET['t']) ? $_GET['t'] : '';
    if ($comment_TYPE != "T") {
        $comment_TYPE = "C";
    }
    $id = defensio_get_all_comments_id($comment_TYPE);
    //if ( count($id) > 0 ) defensio_make_to_spam($comment_TYPE, implode(',',$id));
    if (count($id) > 0) {
        defensio_make_to_spam($comment_TYPE);
    }
    foreach ($id as $t) {
        $comment_TYPE == 'C' ? deleteCommentInOwner($blogid, $t, false) : deleteTrackback($blogid, $t);
    }
    defensio_clear_comments($comment_TYPE);
    if (array_key_exists('ajaxcall', $_GET)) {
        respond::ResultPage(0);
    } else {
        header("Location: " . $_SERVER['HTTP_REFERER']);
    }
}
Example #2
0
<?php

/// Copyright (c) 2004-2012, Needlworks  / Tatter Network Foundation
/// All rights reserved. Licensed under the GPL.
/// See the GNU General Public License for more details. (/documents/LICENSE, /documents/COPYRIGHT)
require ROOT . '/library/preprocessor.php';
requireModel("blog.comment");
if (isset($suri['id'])) {
    $isAjaxRequest = checkAjaxRequest();
    if (deleteCommentInOwner($blogid, $suri['id']) === true) {
        $isAjaxRequest ? Respond::ResultPage(0) : header("Location: " . $_SERVER['HTTP_REFERER']);
    } else {
        $isAjaxRequest ? Respond::ResultPage(-1) : header("Location: " . $_SERVER['HTTP_REFERER']);
    }
} else {
    $targets = explode('~*_)', $_POST['targets']);
    for ($i = 0; $i < count($targets); $i++) {
        if ($targets[$i] == '') {
            continue;
        }
        deleteCommentInOwner($blogid, $targets[$i], false);
    }
    Respond::ResultPage(0);
}