# HG changeset patch # User Matti Hamalainen # Date 1614078264 -7200 # Node ID 88d0e2ba73ca960baac248abfd6ea12fa953e70e # Parent 79b5d8944eeab3f9dd148770334ebfeb44a8e4b6 quotedb: Use LIKE instead of = for user. diff -r 79b5d8944eea -r 88d0e2ba73ca quotedb.tcl --- a/quotedb.tcl Sat Feb 20 17:52:49 2021 +0200 +++ b/quotedb.tcl Tue Feb 23 13:04:24 2021 +0200 @@ -147,7 +147,7 @@ set qoverride [matchattr $uhand n] set usql "SELECT utime AS utime FROM $utable WHERE id=$unum" if {$qoverride == 0} { - append usql " AND user='[utl_escape $uhand]'" + append usql " AND user LIKE '[utl_escape $uhand]'" set qextra "" } else { set qextra [qdb_qm $utable "update_override"] @@ -196,7 +196,7 @@ set qoverride [matchattr $uhand n] set usql "SELECT utime AS utime FROM $utable WHERE id=$unum" if {$qoverride == 0} { - append usql " AND user='[utl_escape $uhand]'" + append usql " AND user LIKE '[utl_escape $uhand]'" set qextra "" } else { set qextra [qdb_qm $utable "update_override"] @@ -277,7 +277,7 @@ } # Check if user has previously voted this item - set usql "SELECT id AS qid FROM ${utable}_votes WHERE user='[utl_escape $uhand]' AND urlid=$uid" + set usql "SELECT id AS qid FROM ${utable}_votes WHERE user LIKE '[utl_escape $uhand]' AND urlid=$uid" qdb_handle eval $usql { # Yes, update the previous vote set usql "UPDATE ${utable}_votes SET vote=$uvote WHERE id=$qid"