Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/edit.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/error-template.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/oacs-view.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/oacs-view2.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/oacs-view3-bootstrap.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/oacs-view3.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/revisions.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-book.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-book.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-default.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-links.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-mobile.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-modal-content.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-page.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-page.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/resources/templates/view-plain.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl,v
diff -u -r1.45 -r1.45.2.1
--- openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl 3 Jul 2015 11:09:48 -0000 1.45
+++ openacs-4/packages/xowiki/tcl/adp-generator-procs.tcl 26 May 2016 16:00:31 -0000 1.45.2.1
@@ -91,7 +91,7 @@
ADP_Generator instproc init {} {
set name [namespace tail [self]]
- set filename [file dirname [info script]]/../www/$name.adp
+ set filename [file dirname [info script]]/../resources/templates/$name.adp
# generate the adp file, if it does not exist
if {[catch {set f [open $filename w]} errorMsg]} {
my log "Warning: cannot overwrite ADP $filename, ignoring possible changes"
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.291.2.20 -r1.291.2.21
--- openacs-4/packages/xowiki/tcl/package-procs.tcl 12 May 2016 08:20:08 -0000 1.291.2.20
+++ openacs-4/packages/xowiki/tcl/package-procs.tcl 26 May 2016 16:00:31 -0000 1.291.2.21
@@ -912,7 +912,7 @@
Package instproc error_msg {{-template_file error-template} {-status_code 200} error_msg} {
my instvar id
if {![regexp {^[./]} $template_file]} {
- set template_file /packages/xowiki/www/$template_file
+ set template_file [my get_adp_template $template_file]
}
set context [list [$id instance_name]]
set title Error
@@ -1130,6 +1130,44 @@
return $packages
}
+ Package instproc get_adp_template {name} {
+ #
+ # Obtain the template from a name. In earlier versions, the
+ # templates that xowiki used were in the www directory. This had
+ # the disadvantage, that for e.g. the template "edit.adp" a call
+ # of "/xowiki/edit" returned an error, since the index.vuh file
+ # was bypassed and xowiki/www/edit.adp was called. Therefore the
+ # recommended place was changed to
+ # xowiki/resources/templates/. However, this method hides the
+ # location change and maintains backward compatibility. In some
+ # later versions, the www location will be deprecated.
+ #
+ foreach package_key [list [my package_key] xowiki] {
+
+ #
+ # backward compatibility check
+ #
+ foreach location {resources/templates www} {
+
+ set tmpl /packages/$package_key/$location/$name
+ set fn [acs_root_dir]/$tmpl
+
+ if {[file readable $fn.adp]} {
+ set result [::template::themed_template $tmpl]
+ #ns_log notice "template is <$result>"
+ if {$result ne ""} {
+ if {$location eq "www"} {
+ ns_log warning "you should move the template $tmpl to /packages/$package_key/resources/templates/"
+ }
+ return $result
+ }
+ }
+ }
+ }
+ return ""
+ }
+
+
Package instproc prefixed_lookup {{-default_lang ""} -lang:required -stripped_name:required -parent_id:required} {
# todo unify with package->lookup
#
@@ -1532,6 +1570,11 @@
if {$(lang) eq "tag"} {
# todo: missing: tag links to subdirectories, also on url generation
set tag $stripped_url
+ if {![regexp {^[\w.,: -]+$} $tag]} {
+ ad_return_complaint 1 "invalid tag"
+ ad_script_abort
+ }
+
set summary [::xo::cc query_parameter summary 0]
set popular [::xo::cc query_parameter popular 0]
if {$summary eq ""} {set summary 0}
@@ -1834,7 +1877,7 @@
-package_id $id -user_id [::xo::cc user_id] \
$object $method]
if {$allowed} {
- #my log "--p calling $object ([$object name] [$object info class]) '$method'"
+ my log "--p calling $object ([$object name] [$object info class]) '$method'"
$object www-$method {*}$options
} else {
my log "not allowed to call $object $method"
Index: openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl,v
diff -u -r1.37.2.8 -r1.37.2.9
--- openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 21 Mar 2016 19:12:38 -0000 1.37.2.8
+++ openacs-4/packages/xowiki/tcl/xowiki-utility-procs.tcl 26 May 2016 16:00:31 -0000 1.37.2.9
@@ -650,7 +650,7 @@
}
return $pairs
}
-
+
my proc get_page_order_items {-parent_id {-publish_status "production"} page_orders} {
set likes [list]
foreach page_order $page_orders {
Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v
diff -u -r1.327.2.19 -r1.327.2.20
--- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 25 May 2016 19:33:46 -0000 1.327.2.19
+++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 26 May 2016 16:00:31 -0000 1.327.2.20
@@ -694,8 +694,7 @@
::xo::Page set_property doc title "[$package_id instance_name] - $edit_form_page_title"
array set property_doc [::xo::Page get_property doc]
- set tmpl [acs_root_dir]/packages/[[my package_id] package_key]/www/edit
- set edit_tmpl [::template::themed_template [expr {[file readable $tmpl] ? $tmpl : "/packages/xowiki/www/edit" }]]
+ set edit_tmpl [$package_id get_adp_template "edit"]
set html [$package_id return_page -adp $edit_tmpl \
-form f1 \
-variables {item_id parent_id edit_form_page_title context formTemplate
@@ -1283,7 +1282,7 @@
::xo::Page set_property doc title $title
set content [next]
array set property_doc [::xo::Page get_property doc]
- $package_id return_page -adp /packages/xowiki/www/revisions -variables {
+ $package_id return_page -adp [$package_id get_adp_template revisions] -variables {
content context {page_id $item_id} title property_doc
}
}
@@ -1501,7 +1500,7 @@
set master [$context_package_id get_parameter "master" 1]
if {![string is boolean -strict $master]} {
- ad_page_contract_handle_datasource_error "value of master is not boolean"
+ ad_return_complaint 1 "value of master is not boolean"
ad_script_abort
}
@@ -1539,9 +1538,13 @@
catch {::xo::cc unset cache([list $context_package_id get_parameter template_file])}
set template_file [my query_parameter "template_file" \
[::$context_package_id get_parameter template_file view-default]]
- # if the template_file does not have a path, assume it in xowiki/www
+ #
+ # if the template_file does not have a path, assume it in the
+ # standard location
+ #
if {![regexp {^[./]} $template_file]} {
- set template_file /packages/xowiki/www/$template_file
+ #set template_file /packages/xowiki/www/$template_file
+ set template_file [[my package_id] get_adp_template $template_file]
}
#
@@ -1607,7 +1610,9 @@
if {$template ne ""} {
set __including_page $page
- set __adp_stub [acs_root_dir]/packages/xowiki/www/view-default
+ #set __adp_stub [acs_root_dir]/packages/xowiki/www/view-default
+ set __adp_stub [$context_package_id get_adp_template view-default]
+
set template_code [template::adp_compile -string $template]
#
# make sure that and tags are processed
Fisheye: Tag 1.8.2.2 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/www/edit.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.9.2.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/www/error-template.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.7.2.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/www/revisions.adp'.
Fisheye: No comparison available. Pass `N' to diff?