# HG changeset patch # User Matti Hamalainen # Date 1614084102 -7200 # Node ID 3904fcfeeb9a51275ea0c5aa17f4baa3a98a4bcf # Parent fdd20366406eaffeb9c2fcd91b0cf20b294e1c92 quotedb: Rename qdb_get() to qdb_show() and remove extraneous unused argument. diff -r fdd20366406e -r 3904fcfeeb9a quotedb.tcl --- a/quotedb.tcl Tue Feb 23 14:40:37 2021 +0200 +++ b/quotedb.tcl Tue Feb 23 14:41:42 2021 +0200 @@ -302,7 +302,7 @@ #------------------------------------------------------------------------- -proc qdb_get {ucmd utable upublic unick uhost uhand uchan utext uindex} { +proc qdb_show {ucmd utable upublic unick uhost uhand uchan uindex} { global qdb_handle set usql "SELECT total(${utable}_votes.vote) AS uvote, ${utable}.id AS quoteID, ${utable}.utext AS uquote, ${utable}.utime AS utime, ${utable}.user AS uuser FROM ${utable} LEFT JOIN ${utable}_votes ON ${utable}_votes.urlid = ${utable}.id" @@ -452,16 +452,16 @@ if {$utext == "" || $utext == {}} { # No arguments, assume random query - qdb_get $ucmd $utable $upublic $unick $uhost $uhand $uchan $utext -1 + qdb_show $ucmd $utable $upublic $unick $uhost $uhand $uchan -1 } elseif {[regexp {^(stat|stats|tilasto|tilastot)$} $utext]} { # Statistics qdb_stats $ucmd $utable $upublic $unick $uhost $uhand $uchan $utext } elseif {[regexp {^(last|latest|uusin|viimeisin)$} $utext]} { # Latest added - qdb_get $ucmd $utable $upublic $unick $uhost $uhand $uchan $utext -2 + qdb_show $ucmd $utable $upublic $unick $uhost $uhand $uchan -2 } elseif {[regexp {^([0-9]+)$} $utext -> unum]} { # Numeric argument, assume id query - qdb_get $ucmd $utable $upublic $unick $uhost $uhand $uchan $utext $unum + qdb_show $ucmd $utable $upublic $unick $uhost $uhand $uchan $unum } elseif {[regexp {^top\s*([0-9]+)?$} $utext -> uargs]} { # Toplist of quotes qdb_toplist $ucmd $utable $upublic $unick $uhost $uhand $uchan $utext $uargs