docs: def perform_request_vote(cmt_id, client_ip_address, value, uid=-1):
      """
      Vote positively or negatively for a comment/review
      :param cmt_id: review id
      :param value: +1 for voting positively
                    -1 for voting negatively
      :return: integer 1 if successful, integer 0 if not
      """
      cmt_id = wash_url_argument(cmt_id, 'int')
      client_ip_address = wash_url_argument(client_ip_address, 'str')
      value = wash_url_argument(value, 'int')
      uid = wash_url_argument(uid, 'int')
      if cmt_id > 0 and value in [-1,
                                  1] and check_user_can_vote(cmt_id,
                                                             client_ip_address,
                                                             uid):
          action_date = convert_datestruct_to_datetext(time.localtime())
          action_code = CFG_WEBCOMMENT_ACTION_CODE['VOTE']
          # FIXME compatibility with postgresql
          query = """INSERT INTO "cmtACTIONHISTORY" ("id_cmtRECORDCOMMENT",
                      id_bibrec, id_user, client_host, action_time,
                      action_code)
                     VALUES (%s, NULL ,%s, inet_aton(%s), %s, %s)"""
          params = (cmt_id, uid, client_ip_address, action_date, action_code)
          run_sql(query, params)
          return query_record_useful_review(cmt_id, value)
      else:
          return 0