Index: openacs-4/packages/xowiki/tcl/chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/chat-procs.tcl,v diff -u -N -r1.27 -r1.28 --- openacs-4/packages/xowiki/tcl/chat-procs.tcl 17 May 2018 07:35:52 -0000 1.27 +++ openacs-4/packages/xowiki/tcl/chat-procs.tcl 11 Jun 2018 18:47:26 -0000 1.28 @@ -11,7 +11,7 @@ # Chat instproc render {} { # :orderby time # set result "" - # foreach child [:children] { + # foreach child [:children] { # set msg [$child msg] # set user_id [$child user_id] # set timelong [clock format [$child time]] @@ -47,7 +47,7 @@ } elseif {[string index $path end] ne "/"} { append path / } - + if {$mode eq ""} { # # The parameter "mode" was not specified, we try to guess the @@ -56,10 +56,10 @@ # The most conservative mode is # - "polling" (which requires for every connected client polling # requests), followed by - # - "scripted-streaming" (which opens and "infinitely long" HTML - # files with embedded script tags; very portable, but this + # - "scripted-streaming" (which opens and "infinitely long" HTML + # files with embedded script tags; very portable, but this # causes the loading indicator to spin), followed by - # - "streaming" (true streaming, but this requires + # - "streaming" (true streaming, but this requires # an HTTP stack supporting partial reads). # # NOTICE 1: The guessing is based on current versions of the @@ -87,7 +87,7 @@ set mode scripted-streaming if {![regexp msie|opera [string tolower [ns_set get [ns_conn headers] User-Agent]]]} { # Explorer doesn't expose partial response until request state != 4, while Opera fires - # onreadystateevent only once. For this reason, for every browser except them, we could + # onreadystateevent only once. For this reason, for every browser except them, we could # use the nice mode without the spinning load indicator. # set mode streaming @@ -148,8 +148,8 @@ -id "messages-form" \ -event "submit" \ -script [subst { - chatSendMsg(\"$send_url\",chatReceiver); - }] + chatSendMsg(\"$send_url\",chatReceiver); + }] return "\
[join $entries {, }]\n" : ""}] } @@ -1398,19 +1399,19 @@ }} id } - + my-tags instproc render {} { :get_parameters ::xo::Page requireJS urn:ad:js:get-http-object - + set p_link [${:__including_page} pretty_link] set return_url [::xo::cc url]?[::xo::cc actual_query] set weblog_page [$package_id get_parameter weblog_page weblog] set save_tag_link [$package_id make_link -link $p_link ${:__including_page} \ save-tags return_url] set popular_tags_link [$package_id make_link -link $p_link ${:__including_page} \ popular-tags] - + set :tags [lsort [::xowiki::Page get_tags -user_id [::xo::cc user_id] \ -item_id [${:__including_page} item_id] -package_id $package_id]] set entries [list] @@ -1445,7 +1446,7 @@ return $content } - + ::xowiki::IncludeletClass create my-categories \ -superclass ::xowiki::Includelet \ -parameter { @@ -1454,7 +1455,7 @@ {-summary 1} }} } - + my-categories instproc render {} { :get_parameters set content "" @@ -1503,10 +1504,10 @@ ::xowiki::IncludeletClass create my-general-comments \ -superclass ::xowiki::Includelet \ -parameter {{__decoration none}} - + my-general-comments instproc render {} { :get_parameters - set item_id [${:__including_page} item_id] + set item_id [${:__including_page} item_id] set gc_return_url [$package_id url] # # Even, if general_comments is turned on, don't offer the @@ -1528,7 +1529,7 @@ return "$gc_link" } } - + ::xowiki::IncludeletClass create digg \ -superclass ::xowiki::Includelet \ -parameter { @@ -1538,7 +1539,7 @@ {-url} }} } - + digg instproc render {} { :get_parameters set digg_link [export_vars -base "http://digg.com/submit" { @@ -1560,7 +1561,7 @@ {-url} }} } - + delicious instproc render {} { :get_parameters @@ -1590,7 +1591,7 @@ {-rssurl} }} } - + my-yahoo-publisher instproc render {} { :get_parameters @@ -1604,24 +1605,24 @@ # - # my-references lists the pages which are referring to the + # my-references lists the pages which are referring to the # including page # ::xowiki::IncludeletClass create my-references \ -superclass ::xowiki::Includelet \ -parameter {{__decoration none}} - + my-references instproc render {} { :get_parameters - set item_id [${:__including_page} item_id] + set item_id [${:__including_page} item_id] set refs [list] - # The same image might be linked both, as img or file on one page, + # The same image might be linked both, as img or file on one page, # so we need DISTINCT. xo::dc foreach -prepare integer get_references { SELECT DISTINCT page,ci.name,ci.parent_id,o.package_id as pid - from xowiki_references,cr_items ci,acs_objects o + from xowiki_references,cr_items ci,acs_objects o where reference = :item_id and ci.item_id = page and ci.item_id = o.object_id } { if {$pid eq ""} { @@ -1652,17 +1653,17 @@ } # - # my-refers lists the pages which are referred to by the + # my-refers lists the pages which are referred to by the # including page # ::xowiki::IncludeletClass create my-refers \ -superclass ::xowiki::Includelet \ -parameter {{__decoration none}} - + my-refers instproc render {} { :get_parameters - set item_id [${:__including_page} item_id] + set item_id [${:__including_page} item_id] set refs [list] ::xo::dc foreach get_refers "SELECT DISTINCT reference,ci.name,ci.parent_id,o.package_id as pid \ @@ -1722,8 +1723,8 @@ if {[::xo::cc user_id] == 0} { switch -- $show_anonymous { nothing {return ""} - all {set summary 0} - default {set summary 1} + all {set summary 0} + default {set summary 1} } } @@ -1739,7 +1740,7 @@ set select_users "user_id, to_char(max(time),'YYYY-MM-DD HH24:MI:SS') as max_time from xowiki_last_visited " } - # allow for caching prepared value. + # allow for caching prepared value. set since [::xo::dc interval $interval] set since_condition "time > TO_TIMESTAMP(:since,'YYYY-MM-DD HH24:MI:SS')" @@ -1769,7 +1770,7 @@ foreach value $values { lassign $value user_id time set seen($user_id) $time - + regexp {^([^.]+)[.]} $time _ time set pretty_time [util::age_pretty -timestamp_ansi $time \ -sysdate_ansi [clock_to_ansi [clock seconds]] \ @@ -1782,8 +1783,8 @@ } if {$output ne ""} {set output "