Index: openacs-4/packages/xowiki/xowiki.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/xowiki.info,v
diff -u -N -r1.123 -r1.124
--- openacs-4/packages/xowiki/xowiki.info 26 Nov 2009 11:16:44 -0000 1.123
+++ openacs-4/packages/xowiki/xowiki.info 12 Dec 2009 10:53:37 -0000 1.124
@@ -10,11 +10,11 @@
t
xowiki
-
+
Gustaf Neumann
A more generic xotcl-based wikis example with object types
and subtypes based on the content repository (with category support)
- 2009-11-26
+ 2009-12-12
Gustaf Neumann, WU Wien
<pre>
XoWiki is a Wiki implementation for OpenACS in XOTcl. Instead of
@@ -56,12 +56,12 @@
BSD-Style
0
-
+
-
+
Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v
diff -u -N -r1.133 -r1.134
--- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 11 Dec 2009 14:01:15 -0000 1.133
+++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 12 Dec 2009 10:53:37 -0000 1.134
@@ -3190,8 +3190,8 @@
{__decoration plain}
{parameter_declaration {
{-form}
- {-var _state}
- {-orderby "value,desc"}
+ {-property _state}
+ {-orderby "count,desc"}
}}
}
@@ -3201,33 +3201,34 @@
set form_item_ids [::xowiki::Weblog instantiate_forms -forms $form -package_id $package_id]
set items [::xowiki::FormPage get_form_entries \
-base_item_ids $form_item_ids -form_fields "" \
- -always_queried_attributes "*" \
- -publish_status ready -package_id $package_id]
+ -always_queried_attributes "*" -initialize false \
+ -publish_status all -package_id $package_id]
foreach i [$items children] {
set value ""
- if {[string match _* $var]} {
- set varname [string range $var 1 end]
+ if {[string match _* $property]} {
+ set varname [string range $property 1 end]
if {[$i exists $varname]} {set value [$i set $varname]}
} else {
array set __ia [$i set instance_attributes]
- set varname __ia($var)
- if {[my exists $varname]} {set value [my set $varname]}
+ set varname __ia($property)
+ if {[info exists $varname]} {set value [set $varname]}
}
- if {[info exists count($value)]} {incr count($value)} else {set count($value) 1}
+ if {[info exists __count($value)]} {incr __count($value)} else {set __count($value) 1}
}
TableWidget t1 -volatile \
-columns {
- Field name -orderby name -label name
Field value -orderby value -label value
+ Field count -orderby count -label count
}
-
+
foreach {att order} [split $orderby ,] break
t1 orderby -order [expr {$order eq "asc" ? "increasing" : "decreasing"}] $att
- foreach {name value} [array get count] {
- t1 add -name $name -value $value
+ foreach {value count} [array get __count] {
+ t1 add -value $value -count $count
}
+
return [t1 asHTML]
}
Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v
diff -u -N -r1.381 -r1.382
--- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 30 Nov 2009 10:22:00 -0000 1.381
+++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 12 Dec 2009 10:53:37 -0000 1.382
@@ -2234,12 +2234,12 @@
}
set form_item_id [my item_id]
set items [::xowiki::FormPage get_form_entries \
- -base_item_ids $form_item_id -form_fields "" \
- -publish_status ready -package_id $package_id]
+ -base_item_ids $form_item_id -form_fields "" -initialize false \
+ -publish_status all -package_id $package_id]
# collect all instances attributes of all items
foreach i [$items children] {array set vars [$i set instance_attributes]}
array set vars [list _name 1 _last_modified 1 _creation_user 1]
- set attributes [lsort [array names vars]]
+ set attributes [lsort -dictionary [array names vars]]
# make sure, we the includelet honors the cvs generation
set includelet_key name:form-usages,form_item_ids:$form_item_id,field_names:[join $attributes " "],
::xo::cc set queryparm(includelet_key) $includelet_key
@@ -2327,6 +2327,7 @@
{-orderby ""}
{-page_size 20}
{-page_number ""}
+ {-initialize true}
} {
#
# Get query attributes for all tables (to allow e.g. sorting by time)
@@ -2426,7 +2427,7 @@
set named_objects [expr {$always_queried_attributes eq "*"}]
set items [::xowiki::FormPage instantiate_objects -sql $sql \
-named_objects $named_objects -object_named_after "item_id" \
- -object_class ::xowiki::FormPage]
+ -object_class ::xowiki::FormPage -initialize $initialize]
if {!$use_hstore && $wc(tcl) ne "true"} {
# Make sure, that the expr method is available;