Index: openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl,v diff -u -r1.37.2.1 -r1.37.2.2 --- openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 16 Nov 2013 13:57:44 -0000 1.37.2.1 +++ openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 13 Mar 2014 13:00:02 -0000 1.37.2.2 @@ -1,15 +1,15 @@ ::xo::library doc { - XoWiki - Search Service Contracts + XoWiki - Search Service Contracts - @creation-date 2006-01-10 - @author Gustaf Neumann - @cvs-id $Id$ + @creation-date 2006-01-10 + @author Gustaf Neumann + @cvs-id $Id$ } namespace eval ::xowiki {} ad_proc -private ::xowiki::datasource { revision_id } { - @param revision_id + @param revision_id returns a datasource for the search package } { @@ -23,15 +23,15 @@ # no data source for for pages under construction #ns_log notice "--sc page under construction, no datasource" return [list object_id $revision_id title "" \ - content "" keywords "" \ - storage_type text mime text/html] + content "" keywords "" \ + storage_type text mime text/html] } #ns_log notice "--sc setting absolute links for page = $page [$page set name]" set d [dict merge \ - {mime text/html text "" html "" keywords ""} \ - [$page search_render]] + {mime text/html text "" html "" keywords ""} \ + [$page search_render]] if {![dict exists $d title]} { dict set d title [$page title] @@ -46,9 +46,9 @@ # then we have to use CDATA in the description # if {[string first {[1]} $text] > -1} { - append description {} + append description {} } else { - set description [ns_quotehtml $text] + set description [ns_quotehtml $text] } } text/plain { @@ -73,34 +73,34 @@ catch { db_dml delete_old_revisions { delete from txt where object_id in \ - (select revision_id from cr_revisions - where item_id = :item_id and revision_id != :revision_id) + (select revision_id from cr_revisions + where item_id = :item_id and revision_id != :revision_id) } } set pubDate [::xo::db::tcl_date [$page set publish_date] tz] set link [$page detail_link] set result [list object_id $revision_id title [dict get $d title] \ - content $content \ - keywords [dict get $d keywords] \ - storage_type text mime [dict get $d mime] \ - syndication [list \ - link [string map [list & "&"] $link] \ - description $description \ - author [$page set creator] \ - category "" \ - guid "$item_id" \ - pubDate $pubDate] \ - ] + content $content \ + keywords [dict get $d keywords] \ + storage_type text mime [dict get $d mime] \ + syndication [list \ + link [string map [list & "&"] $link] \ + description $description \ + author [$page set creator] \ + category "" \ + guid "$item_id" \ + pubDate $pubDate] \ + ] if {[catch {::xo::at_cleanup} errorMsg]} { ns_log notice "cleanup in ::xowiki::datasource returned $errorMsg" } return $result } ad_proc -private ::xowiki::url { revision_id} { - returns a url for a message to the search package + returns a url for a message to the search package } { return [::xowiki::Package get_url_from_id -revision_id $revision_id] } @@ -156,7 +156,7 @@ contract_name FtsContentProvider owner xowiki } -} + } ad_proc -private ::xowiki::sc::unregister_implementations {} { acs_sc::impl::delete -contract_name FtsContentProvider -impl_name ::xowiki::Page @@ -169,3 +169,9 @@ ::xo::library source_dependent +# +# Local variables: +# mode: tcl +# tcl-indent-level: 2 +# indent-tabs-mode: nil +# End: