  def destroy_comment
    Log.add_info(request, params.inspect)

    return unless request.post?

    comment = Comment.find(params[:comment_id])
    @item = comment.item

    unless @login_user.admin?(User::AUTH_ITEM) or \
              comment.user_id == @login_user.id or \
              @item.user_id == @login_user.id
      render(:text => 'ERROR:' + t('msg.need_to_be_admin'))
      return
    end

    comment.destroy

    case @item.xtype
      when Item::XTYPE_PROJECT
        if comment.xtype == Comment::XTYPE_APPLY

          flash[:notice] = t('msg.cancel_success')
          render(:partial => 'ajax_team_apply')

        else
          render(:text => '')
        end

      else
        render(:text => '')
    end
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component.