Index: openacs-4/contrib/packages/irc-logger/tcl/irc-logger-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/irc-logger/tcl/irc-logger-procs.tcl,v diff -u -r1.6.4.1 -r1.6.4.2 --- openacs-4/contrib/packages/irc-logger/tcl/irc-logger-procs.tcl 31 Mar 2004 22:39:21 -0000 1.6.4.1 +++ openacs-4/contrib/packages/irc-logger/tcl/irc-logger-procs.tcl 12 Sep 2013 14:27:44 -0000 1.6.4.2 @@ -52,6 +52,7 @@ ad_proc -public irc::logger::apply_xslt { -rdf_log:required -xsl_style:required + {-package_id ""} } { Transform the RDF IRC log to HTML using passed XSL stylesheet. @@ -79,7 +80,7 @@ if {![catch {set xsl [dom parse [read [open $xsl_style r]]]} error_msg]} { # Transform the RDF DOM tree to an HTML DOM tree - + if {![catch {set html [$rdf xslt $xsl]} error_msg]} { # Serialize the HTML DOM tree as HTML text @@ -97,10 +98,15 @@ } # clean up the dom references, otherwise we have a mem leak. - $rdf delete - $xsl delete - $html delete - + if {[info exists rdf]} { + $rdf delete + } + if {[info exists xsl]} { + $xsl delete + } + if {[info exists html]} { + $html delete + } return $text } @@ -215,7 +221,9 @@ -xsl_style [parameter::get \ -parameter xsl_stylesheet \ -package_id $package_id \ - -default "[acs_package_root_dir [apm_package_key_from_id $package_id]]/data/default.xsl"]] + -default "[acs_package_root_dir [apm_package_key_from_id $package_id]]/data/default.xsl"] \ + -package_id $package_id] + if {![empty_string_p $irc_html_log]} { # The transformation was succesful. Time to create @@ -406,9 +414,15 @@ # Locate the first user with a screen name of 'nick' on this # site. DB caching reduces the number of hits on the DB # itself. + + # community_member_url was changed to require a conn + # it always returned / for the subsite since we run from a + # scheduled proc. This needs to be smarter. + set community_member_url "[ad_parameter -package_id [ad_acs_kernel_id] CommunityMemberURL]?[export_vars {user_id}]" + if {[db_0or1row get_user {}]} { - set link "$nick" + set link "$nick" } else { set link $nick }