From 502157a1c39ac71764554eda8686a05ed6db3680 Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" Date: Wed, 26 Aug 1998 06:14:20 +0000 Subject: [PATCH] Bugzilla source. git-svn-id: svn://10.0.0.236/trunk@8494 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/1x1.gif | Bin 0 -> 82 bytes mozilla/webtools/bugzilla/CGI.tcl | 320 +++++++++ mozilla/webtools/bugzilla/ant.jpg | Bin 0 -> 17469 bytes mozilla/webtools/bugzilla/bug_form.tcl | 216 ++++++ mozilla/webtools/bugzilla/bug_status.html | 194 ++++++ mozilla/webtools/bugzilla/buglist.cgi | 623 ++++++++++++++++++ mozilla/webtools/bugzilla/changepassword.cgi | 74 +++ mozilla/webtools/bugzilla/colchange.cgi | 88 +++ mozilla/webtools/bugzilla/doclosebug.cgi | 53 ++ mozilla/webtools/bugzilla/edit_desc.cgi | 112 ++++ mozilla/webtools/bugzilla/enter_bug.cgi | 227 +++++++ mozilla/webtools/bugzilla/globals.tcl | 435 ++++++++++++ mozilla/webtools/bugzilla/help.html | 55 ++ mozilla/webtools/bugzilla/how_to_mail.html | 80 +++ mozilla/webtools/bugzilla/index.html | 76 +++ mozilla/webtools/bugzilla/long_list.cgi | 78 +++ .../webtools/bugzilla/makeactivitytable.sh | 47 ++ mozilla/webtools/bugzilla/makebugtable.sh | 69 ++ mozilla/webtools/bugzilla/makecctable.sh | 40 ++ .../webtools/bugzilla/makecomponenttable.sh | 102 +++ .../webtools/bugzilla/makeprofilestable.sh | 42 ++ mozilla/webtools/bugzilla/makeversiontable.sh | 51 ++ mozilla/webtools/bugzilla/new_comment.cgi | 41 ++ mozilla/webtools/bugzilla/newquip.html | 34 + mozilla/webtools/bugzilla/post_bug.cgi | 137 ++++ mozilla/webtools/bugzilla/process_bug.cgi | 309 +++++++++ mozilla/webtools/bugzilla/processmail | 238 +++++++ mozilla/webtools/bugzilla/query.cgi | 242 +++++++ mozilla/webtools/bugzilla/relogin.cgi | 52 ++ mozilla/webtools/bugzilla/show_activity.cgi | 58 ++ mozilla/webtools/bugzilla/show_bug.cgi | 44 ++ 31 files changed, 4137 insertions(+) create mode 100644 mozilla/webtools/bugzilla/1x1.gif create mode 100755 mozilla/webtools/bugzilla/CGI.tcl create mode 100644 mozilla/webtools/bugzilla/ant.jpg create mode 100755 mozilla/webtools/bugzilla/bug_form.tcl create mode 100755 mozilla/webtools/bugzilla/bug_status.html create mode 100755 mozilla/webtools/bugzilla/buglist.cgi create mode 100755 mozilla/webtools/bugzilla/changepassword.cgi create mode 100755 mozilla/webtools/bugzilla/colchange.cgi create mode 100755 mozilla/webtools/bugzilla/doclosebug.cgi create mode 100755 mozilla/webtools/bugzilla/edit_desc.cgi create mode 100755 mozilla/webtools/bugzilla/enter_bug.cgi create mode 100644 mozilla/webtools/bugzilla/globals.tcl create mode 100644 mozilla/webtools/bugzilla/help.html create mode 100644 mozilla/webtools/bugzilla/how_to_mail.html create mode 100644 mozilla/webtools/bugzilla/index.html create mode 100755 mozilla/webtools/bugzilla/long_list.cgi create mode 100755 mozilla/webtools/bugzilla/makeactivitytable.sh create mode 100755 mozilla/webtools/bugzilla/makebugtable.sh create mode 100755 mozilla/webtools/bugzilla/makecctable.sh create mode 100755 mozilla/webtools/bugzilla/makecomponenttable.sh create mode 100755 mozilla/webtools/bugzilla/makeprofilestable.sh create mode 100755 mozilla/webtools/bugzilla/makeversiontable.sh create mode 100755 mozilla/webtools/bugzilla/new_comment.cgi create mode 100644 mozilla/webtools/bugzilla/newquip.html create mode 100755 mozilla/webtools/bugzilla/post_bug.cgi create mode 100755 mozilla/webtools/bugzilla/process_bug.cgi create mode 100755 mozilla/webtools/bugzilla/processmail create mode 100755 mozilla/webtools/bugzilla/query.cgi create mode 100755 mozilla/webtools/bugzilla/relogin.cgi create mode 100755 mozilla/webtools/bugzilla/show_activity.cgi create mode 100755 mozilla/webtools/bugzilla/show_bug.cgi diff --git a/mozilla/webtools/bugzilla/1x1.gif b/mozilla/webtools/bugzilla/1x1.gif new file mode 100644 index 0000000000000000000000000000000000000000..b07a89a6eae93da8d6c89f7647ed2bc38b358992 GIT binary patch literal 82 zcmZ?wbhEHbWMp7u_`tyM2MiSdDJv*=<`(1^m87O9q!s1oD!6;PDP-m*rl(pdl;ZNC + +source "globals.tcl" + +proc url_decode {buf} { + regsub -all {\\(.)} $buf {\1} buf ; regsub -all {\\} $buf {\\\\} buf ; + regsub -all { } $buf {\ } buf ; regsub -all {\+} $buf {\ } buf ; + regsub -all {\$} $buf {\$} buf ; regsub -all \n $buf {\n} buf ; + regsub -all {;} $buf {\;} buf ; regsub -all {\[} $buf {\[} buf ; + regsub -all \" $buf \\\" buf ; regsub ^\{ $buf \\\{ buf ; + regsub -all -nocase {%([a-fA-F0-9][a-fA-F0-9])} $buf {[format %c 0x\1]} buf + eval return \"$buf\" +} + +proc url_quote {var} { + regsub -all { } "$var" {%20} var + regsub -all {=} "$var" {%3d} var + regsub -all "\n" "$var" {%0a} var + return $var +} + +proc lookup { a key } { + global $a + set ref [format %s(%s) $a $key] + if { [ info exists $ref] } { + eval return \$$ref + } else { + return "" + } +} + +proc ProcessFormFields {buffer} { + global FORM MFORM + catch {unset FORM} + catch {unset MFORM} + set remaining $buffer + while {![cequal $remaining ""]} { + if {![regexp {^([^&]*)&(.*)$} $remaining foo item remaining]} { + set item $remaining + set remaining "" + } + if {![regexp {^([^=]*)=(.*)$} $item foo name value]} { + set name $item + set value "" + } + set value [url_decode $value] + if {![cequal $value ""]} { + append FORM($name) $value + lappend MFORM($name) $value + } else { + set isnull($name) 1 + } + } + if {[info exists isnull]} { + foreach name [array names isnull] { + if {![info exists FORM($name)]} { + set FORM($name) "" + set MFORM($name) "" + } + } + } +} + +proc FormData { field } { + global FORM + return $FORM($field) +} + +if { [info exists env(REQUEST_METHOD) ] } { + if { $env(REQUEST_METHOD) == "GET" } { + set buffer [lookup env QUERY_STRING] + } else { set buffer [ read stdin $env(CONTENT_LENGTH) ] } + ProcessFormFields $buffer +} + +proc html_quote { var } { + regsub -all {&} "$var" {\&} var + regsub -all {<} "$var" {\<} var + regsub -all {>} "$var" {\>} var + return $var +} +proc value_quote { var } { + regsub -all {&} "$var" {\&} var + regsub -all {"} "$var" {\"} var + regsub -all {<} "$var" {\<} var + regsub -all {>} "$var" {\>} var + return $var +} + +proc value_unquote { var } { + regsub -all {"} $var "\"" var + regsub -all {<} $var "<" var + regsub -all {>} $var ">" var + regsub -all {&} $var {\&} var + return $var +} + +foreach pair [ split [lookup env HTTP_COOKIE] ";" ] { + set pair [string trim $pair] + set eq [string first = $pair ] + if {$eq == -1} { + set COOKIE($pair) "" + } else { + set COOKIE([string range $pair 0 [expr $eq - 1]]) [string range $pair [expr $eq + 1] end] + } +} + +proc navigation_header {} { + global COOKIE FORM next_bug + set buglist [lookup COOKIE BUGLIST] + if { $buglist != "" } { + set bugs [split $buglist :] + set cur [ lsearch -exact $bugs $FORM(id) ] + puts "Bug List: ([expr $cur + 1] of [llength $bugs])" + puts "First" + puts "Last" + if { $cur > 0 } { + puts "Prev" + } else { + puts "Prev" + } + if { $cur < [expr [ llength $bugs ] - 1] } { + set next_bug [lindex $bugs [expr $cur + 1]] + puts "Next" + } else { + puts "Next" + } + } + puts "     Query page" +} + +proc make_options { src default {isregexp 0} } { + set last "" ; set popup "" ; set found 0 + foreach item $src { + if {$item == "-blank-" || $item != $last} { + if { $item == "-blank-" } { set item "" } + set last $item + if {$isregexp ? [regexp $default $item] : [cequal $default $item]} { + append popup "