_abuse_allow($type, $oid)
abuse/abuse.module, line 1015
<?php
function _abuse_allow($type, $oid) {
$object = _abuse_load($type, $oid);
if ($object->uid != 0) {
$account = user_load(array('uid' => $object->uid, 'status' => 1));
}
if ((isset($account) && $account->uid) || $object->uid == 0) {
db_query("UPDATE {abuse} SET valid = -1 WHERE type = '%s' AND oid = %d", $type, $oid);
switch ($type) {
case 'node':
db_query("UPDATE {node} SET status = 1 WHERE nid = %d", $oid);
break;
case 'comment':
db_query("UPDATE {comments} SET status = 0 WHERE cid = %d", $oid);
break;
}
cache_clear_all($oid, 'cache', TRUE);
_abuse_set_status($type, $oid, ABUSE_LIVE);
}
}
?>