Commit 908ef174 authored by Frank Bergmann's avatar Frank Bergmann

- OpenACS 5.9 Import

parent b019de5e
<master>
<property name="doc(title)">#acs-tcl.Server#</property>
<p>
#acs-tcl.There#
</p>
<if @message@ not nil>
<p>
@message;noquote@
</p>
</if>
<br>
<a href="@prev_url@">#acs-tcl.Return_prev#</a>
<if @bt_instance@ ne "">
<if @auto_submit_p@ gt 0>
<if @user_id@ gt 0>
<br>
<formtemplate id="bug_edit"></formtemplate>
<br>
#acs-tcl.Bug_History#
<br><br>
<formtemplate id="bug_history"></formtemplate>
</if>
<else>
</else>
</if>
</if>
<else>
<pre>@stacktrace@</pre>
</else>
This diff is collapsed.
<?xml version="1.0"?>
<!DOCTYPE queryset PUBLIC "-//OpenACS//DTD XQL 1.0//EN" "http://www.thecodemill.biz/repository/xql.dtd">
<!-- -->
<!-- @author Victor Guerra (guerra@galileo.edu) -->
<!-- @creation-date 2005-02-06 -->
<!-- @arch-tag: d0117c72-fd55-4faa-b2cb-89ec5ce0c0ef -->
<!-- @cvs-id $Id$ -->
<queryset>
<fullquery name="get_user_info">
<querytext>
select p.first_names||' '||p.last_name as user_name, pa.email as user_email
from persons p, parties pa
where pa.party_id = p.person_id
and p.person_id = :user_id
</querytext>
</fullquery>
<fullquery name = "search_bug">
<querytext>
select bug_id
from bt_auto_bugs
where error_file =:error_file
and package_id = :bug_package_id
</querytext>
</fullquery>
<fullquery name = "insert_auto_bug">
<querytext>
insert into bt_auto_bugs(bug_id, package_id, error_file)
values (:bug_id, :bug_package_id, :error_file)
</querytext>
</fullquery>
<fullquery name = "increase_reported_times">
<querytext>
update bt_auto_bugs
set times_reported = times_reported + 1
where bug_id = :bug_id
</querytext>
</fullquery>
<fullquery name = "select_times_reported">
<querytext>
select times_reported
from bt_auto_bugs
where bug_id = :bug_id
</querytext>
</fullquery>
</queryset>
\ No newline at end of file
# FIXME: Peter M - This file cannot be watched with the APM as it
# re-initializes the reload level to 0 everytime it is sourced. Could
# we move these initialization to an -init.tcl file instead?
# Initialize loader NSV arrays. See apm-procs.tcl for a description of
# these arrays.
nsv_array set apm_library_mtime [list]
nsv_array set apm_version_procs_loaded_p [list]
nsv_array set apm_reload_watch [list]
nsv_array set apm_package_info [list]
nsv_set apm_properties reload_level 0
This diff is collapsed.
#
# Add Tcl traces for asserted tcl commands.
#
# Add the traces only, when the functions are active (i.e. the
# controling package parameter has not the default value), because
# adding the traces has performance impact on potentially frequently
# called tcl commands (such as e.g. ns_log)
#
# Therefore, activating/deactivating requires a server restart.
#
set trace ""
foreach {parameter default cmd} {
TclTraceLogServerities "" {trace add execution ::ns_log enter {::tcltrace::before-ns_log}}
TclTraceSaveNsReturn 0 {trace add execution ::ns_return enter {::tcltrace::before-ns_return}}
} {
if {[::parameter::get_from_package_key \
-package_key acs-tcl \
-parameter $parameter \
-default $default] ne $default} {
append trace \n$cmd
}
}
if {$trace ne ""} {
ns_ictl trace create $trace
}
ad_library {
Tcl trace procs, accompanied by tcltrace-init.tcl
Add Tcl execution traces to asserted Tcl commands
@author Gustaf Neumann (neumann@wu-wien.ac.at)
@creation-date 2015-06-11
@cvs-id $Id$
}
namespace eval ::tcltrace {
ad_proc -private before-ns_return { cmd op } {
Execute this proc before ns_return is called
@param cmd the full command as executed by Tcl
@param op the trace operation
} {
lassign $cmd cmdname statuscode mimetype content
if {[::parameter::get_from_package_key \
-package_key acs-tcl \
-parameter TclTraceSaveNsReturn \
-default 0]} {
if {$statuscode == 200
&& $mimetype eq "text/html"} {
set name [ns_conn url]
regsub {/$} $name /index name
set fullname [ad_tmpdir]/ns_saved$name.html
ns_log notice "before-ns_return: save content of ns_return to file:$fullname"
set dirname [file dirname $fullname]
if {![file isdirectory $dirname]} {
file mkdir $dirname
}
set f [open $fullname w]
puts $f $content
close $f
} else {
ns_log notice "before-ns_return: ignore statuscode $statuscode mime-type $mimetype"
}
}
}
ad_proc -private before-ns_log { cmd op } {
Execute this proc before ns_log is called
@param cmd the full command as executed by Tcl
@param op the trace operation
} {
lassign $cmd cmdname severity msg
set severity [string totitle $severity]
if {![info exists ::__log_severities]} {
set ::__log_severities [::parameter::get_from_package_key \
-package_key acs-tcl \
-parameter TclTraceLogServerities \
-default ""]
}
if {$severity in $::__log_severities} {
# we do not want i18n raw strings substituted via ds_comment.
# Maybe we should add this substitution there....
regsub -all {\#([a-zA-Z0-9._-]+)\#} $msg {\&#35;\1\&#35;} msg
catch {ds_comment "$cmdname $severity $msg"}
} else {
#catch {ds_comment "ignore $severity $msg"}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment