function plugin_comment_action() { global $vars, $post; // Petit SPAM Check (Client(Browser)-Server Ticket Check) $spam = FALSE; if (isset($post['encode_hint']) && $post['encode_hint'] != '') { if (PKWK_ENCODING_HINT != $post['encode_hint']) { $spam = TRUE; } } else { if (PKWK_ENCODING_HINT != '') { $spam = TRUE; } } // if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing'); if (auth::check_role('readonly')) { die_message('PKWK_READONLY prohibits editing'); } if (!is_page($vars['refer']) && auth::is_check_role(PKWK_CREATE_PAGE)) { die_message(_('PKWK_CREATE_PAGE prohibits editing')); } // If SPAM, goto jail. if ($spam) { return plugin_comment_honeypot(); } return plugin_comment_write(); }
function plugin_comment_action() { global $vars, $post, $_comment_messages; // if (PKWK_READONLY) die_message('PKWK_READONLY prohibits editing'); if (Auth::check_role('readonly')) { die_message(sprintf($_comment_messages['err_prohibit'], 'PKWK_READONLY')); } if (!is_page($vars['refer']) && Auth::is_check_role(PKWK_CREATE_PAGE)) { Utility::dieMessage(sprintf($_comment_messages['err_prohibit'], 'PKWK_CREATE_PAGE')); } return plugin_comment_write(); }