From: Mark Wooding Date: Thu, 26 Nov 2015 15:44:33 +0000 (+0000) Subject: bin/pastebin.userv: Don't throw the supplied content away. X-Git-Url: https://git.distorted.org.uk/~mdw/odin-cgi/commitdiff_plain/5dbae673c9b8a426f4dd0d57a8e203fdf46b2936?hp=98984c9d2db5bc19f73b28aa277a40608a935b22 bin/pastebin.userv: Don't throw the supplied content away. Oh, where do I start? There's just so much edit debris here that it's not funny. --- diff --git a/bin/pastebin.userv b/bin/pastebin.userv index fd263bd..fe9e55d 100755 --- a/bin/pastebin.userv +++ b/bin/pastebin.userv @@ -60,10 +60,6 @@ EOF $op->bad if @ARGV; $op->ok or Odin::fail "usage: new [-l LANG] [-t TITLE]"; $p{content} = read_content; - my $db = Odin::open_db; - my $c = ""; - while (read STDIN, my $buf, 8192) { $c .= $buf; } - $p{content} = read_content; @{$db->selectall_arrayref ("SELECT lang FROM odin_pastebin_lang WHERE lang = ?", undef, $p{lang})} or Odin::fail "unknown language `$p{lang}'";