Index: openacs-4/packages/xowiki/tcl/link-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/link-procs.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/xowiki/tcl/link-procs.tcl 30 Nov 2006 20:15:59 -0000 1.14
+++ openacs-4/packages/xowiki/tcl/link-procs.tcl 10 Dec 2006 16:56:52 -0000 1.15
@@ -106,7 +106,12 @@
# image links
#
- Class create ::xowiki::Link::image -superclass ::xowiki::Link
+ Class create ::xowiki::Link::image -superclass ::xowiki::Link \
+ -parameter {
+ href
+ float width height padding margin border border-width
+ position top botton left right
+ }
::xowiki::Link::image instproc render {} {
my instvar name package_id label
set page [my page]
@@ -130,10 +135,24 @@
}
}
::xowiki::Link::image instproc render_found {link label} {
+ set style ""
+ foreach a {
+ float width height padding margin border border-width
+ position top botton left right
+ } {
+ if {[my exists $a]} {append style "$a: [my set $a];"}
+ }
+ if {$style ne ""} {set style "style='$style'"}
set label [string map [list ' "'"] $label]
- return ""
+ if {[my exists href]} {
+ set href [my set href]
+ if {[string match "java*" $href]} {set href .}
+ return ""
+ } else {
+ return ""
+ }
}
-
+
Class create ::xowiki::Link::file -superclass ::xowiki::Link::image
::xowiki::Link::file instproc resolve {} {
set item_id [next]
Index: openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl 5 Dec 2006 10:14:12 -0000 1.4
+++ openacs-4/packages/xowiki/tcl/xowiki-callback-procs.tcl 10 Dec 2006 16:56:52 -0000 1.5
@@ -193,12 +193,20 @@
}
}
-
if {[apm_version_names_compare $from_version_name "0.34"] == -1 &&
[apm_version_names_compare $to_version_name "0.34"] > -1} {
ns_log notice "-- upgrading to 0.34"
::xowiki::notifications-install
}
+
+ if {[apm_version_names_compare $from_version_name "0.39"] == -1 &&
+ [apm_version_names_compare $to_version_name "0.39"] > -1} {
+ ns_log notice "-- upgrading to 0.39"
+ catch {db_dml create-xowiki-last-visited-time-idx \
+ "create index xowiki_last_visited_time_idx on xowiki_last_visited(time)"
+ }
+ }
+
}
ad_proc fix_all_package_ids {} {
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 -r1.60 -r1.61
--- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 9 Dec 2006 10:53:29 -0000 1.60
+++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 10 Dec 2006 16:56:52 -0000 1.61
@@ -84,6 +84,8 @@
"create unique index xowiki_last_visited_index_unique ON xowiki_last_visited(user_id, page_id)"
db_dml create-xowiki-last-visited-index \
"create index xowiki_last_visited_index ON xowiki_last_visited(user_id, package_id)"
+ db_dml create-xowiki-last-visited-time-idx \
+ "create index xowiki_last_visited_time_idx on xowiki_last_visited(time)"
}
if {![db_0or1row check-tag-table \
@@ -653,7 +655,9 @@
Page instproc anchor {ch arg} {
set label $arg
set link $arg
- regexp {^(.*)[|](.*)$} $arg _ link label
+ set options ""
+ regexp {^([^|]+)[|](.*)$} $arg _ link label
+ regexp {^([^|]+)[|](.*)$} $label _ label options
if {[string match "http*//*" $link] || [string match "//*" $link]} {
regsub {^//} $link / link
return "$ch$label"
@@ -687,7 +691,12 @@
-type $link_type -name $name -lang $lang \
-stripped_name $normalized_name -label $label \
-folder_id $parent_id -package_id $package_id
- return $ch[[self]::link render]
+
+ if {[catch {eval [self]::link configure $options} error]} {
+ return "${ch}Error during processing of options: $error
"
+ } else {
+ return $ch[[self]::link render]
+ }
}
Page instproc references {} {