Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -r1.66 -r1.67 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 12 Jul 2007 18:13:48 -0000 1.66 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 13 Jul 2007 21:12:29 -0000 1.67 @@ -247,6 +247,7 @@ if {[$page procsearch $method] eq ""} { return [my error_msg "Method '$method' is not defined for this object"] } else { + #my log "--invoke $page $method" return [my call $page $method] } } else { @@ -691,8 +692,7 @@ # Package ad_instproc google-sitemap { - -maxentries - + {-max_entries ""} {-changefreq "daily"} {-priority "0.5"} } { @@ -708,34 +708,36 @@ set package_id [my id] set folder_id [::$package_id folder_id] - set limit_clause [expr {[info exists maxentries] ? " limit $maxentries" : ""}] set timerange_clause "" set content { } - db_foreach [my qn get_pages] \ - "select s.body, p.name, p.creator, p.title, p.page_id,\ - p.object_type as content_type, p.last_modified, p.description \ - from xowiki_pagex p, syndication s, cr_items ci \ - where ci.parent_id = $folder_id and ci.live_revision = s.object_id \ - and s.object_id = p.page_id $timerange_clause \ - order by p.last_modified desc $limit_clause \ - " { - #my log "--found $name" - if {[string match "::*" $name]} continue - if {$content_type eq "::xowiki::PageTemplate::"} continue - regexp {^([^.]+)[.][0-9]+(.*)$} $last_modified _ time tz - - set time "[clock format [clock scan $time] -format {%Y-%m-%dT%T}]${tz}:00" - append content \n\ - [::$package_id pretty_link -absolute true $name] \n\ - $time \n\ - $changefreq \n\ - $priority \n\ - \n - } + set sql [::xo::db::sql select \ + -vars "s.body, p.name, p.creator, p.title, p.page_id,\ + p.object_type as content_type, p.last_modified, p.description" \ + -from "xowiki_pagex p, syndication s, cr_items ci" \ + -where "ci.parent_id = $folder_id and ci.live_revision = s.object_id \ + and s.object_id = p.page_id $timerange_clause" \ + -orderby "p.last_modified desc" \ + -limit $max_entries] + my log $sql + db_foreach [my qn get_pages] $sql { + #my log "--found $name" + if {[string match "::*" $name]} continue + if {$content_type eq "::xowiki::PageTemplate::"} continue + + regexp {^([^.]+)[.][0-9]+(.*)$} $last_modified _ time tz + + set time "[clock format [clock scan $time] -format {%Y-%m-%dT%T}]${tz}:00" + append content \n\ + [::$package_id pretty_link -absolute true $name] \n\ + $time \n\ + $changefreq \n\ + $priority \n\ + \n + } append content \n #set t text/plain @@ -783,8 +785,7 @@ } Package instproc google-sitemapindex {} { - # deprecated - ::xowiki::Page [self proc] + [self class] [self proc] } Package instproc edit-new {} {