Index: openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.tcl,v
diff -u -r1.2.2.1 -r1.2.2.2
--- openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.tcl 8 May 2019 14:33:40 -0000 1.2.2.1
+++ openacs-4/packages/xowiki/resources/templates/view-book-no-ajax.tcl 26 Aug 2020 18:46:08 -0000 1.2.2.2
@@ -19,7 +19,7 @@
set page_title "
[$i current] $title
"
} else {
set book_relpos 0.0%
- set page_title "$title
"
+ set page_title "$title
"
}
}
set header_stuff [::xo::Page header_stuff]
Index: openacs-4/packages/xowiki/resources/templates/view-book.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/resources/templates/view-book.tcl,v
diff -u -r1.2.2.1 -r1.2.2.2
--- openacs-4/packages/xowiki/resources/templates/view-book.tcl 8 May 2019 14:33:40 -0000 1.2.2.1
+++ openacs-4/packages/xowiki/resources/templates/view-book.tcl 26 Aug 2020 18:46:08 -0000 1.2.2.2
@@ -18,7 +18,7 @@
set page_title "[$i current] $title
"
} else {
set book_relpos 0.0%
- set page_title "$title
"
+ set page_title "$title
"
}
}
Index: openacs-4/packages/xowiki/tcl/notification-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/notification-procs.tcl,v
diff -u -r1.23.2.3 -r1.23.2.4
--- openacs-4/packages/xowiki/tcl/notification-procs.tcl 8 Aug 2020 08:08:20 -0000 1.23.2.3
+++ openacs-4/packages/xowiki/tcl/notification-procs.tcl 26 Aug 2020 18:46:08 -0000 1.23.2.4
@@ -1,15 +1,14 @@
::xo::library doc {
XoWiki - Notification procs
-
+
@creation-date 2006-08-08
@author Gustaf Neumann
- @cvs-id $Id$
}
namespace eval ::xowiki {
-
+
ad_proc -private ::xowiki::notifications-install {} {
-
+
set impl_id [acs_sc::impl::new_from_spec -spec {
name xowiki_notif_type
contract_name NotificationType
@@ -19,54 +18,62 @@
ProcessReply xowiki::notification::process_reply
}
}]
-
+
set type_id [notification::type::new \
-sc_impl_id $impl_id \
-short_name xowiki_notif \
-pretty_name "XoWiki Notification" \
-description "Notification of a new XoWiki page"]
-
+
foreach delivery {email} {
notification::type::delivery_method_enable -type_id $type_id \
- -delivery_method_id [notification::delivery::get_id -short_name $delivery]
+ -delivery_method_id [notification::delivery::get_id \
+ -short_name $delivery]
}
-
+
foreach interval {instant hourly daily} {
notification::type::interval_enable -type_id $type_id \
- -interval_id [notification::interval::get_id_from_name -name $interval]
+ -interval_id [notification::interval::get_id_from_name \
+ -name $interval]
}
}
-
-
+
+
ad_proc -private ::xowiki::notifications-uninstall {} {
-
+
set type_id [notification::type::get_type_id -short_name xowiki_notif]
-
+
foreach delivery {email} {
notification::type::delivery_method_disable -type_id $type_id \
- -delivery_method_id [notification::delivery::get_id -short_name $delivery]
+ -delivery_method_id [notification::delivery::get_id \
+ -short_name $delivery]
}
foreach interval {instant hourly daily} {
notification::type::interval_disable -type_id $type_id \
- -interval_id [notification::interval::get_id_from_name -name $interval]
+ -interval_id [notification::interval::get_id_from_name \
+ -name $interval]
}
-
+
notification::type::delete -short_name xowiki_notif
-
+
acs_sc::impl::delete \
-contract_name "NotificationType" \
- -impl_name xowiki_notif_type
+ -impl_name xowiki_notif_type
}
}
namespace eval ::xowiki::notification {
ad_proc -private get_url {id} {
- if {[::xo::dc 0or1row is_package_id {select 1 from apm_packages where package_id = :id}]} {
+ if {[::xo::dc 0or1row is_package_id {
+ select 1 from apm_packages where package_id = :id}]
+ } {
#
# the specified id is a package_id
#
- set node_id [::xo::dc get_value get_node_id {select node_id from site_nodes where object_id = :id}]
+ set node_id [::xo::dc get_value get_node_id {
+ select node_id from site_nodes where object_id = :id
+ }]
set url [site_node::get_url -node_id $node_id]
return $url
}
@@ -83,11 +90,11 @@
# id is a revision_id
return [::xowiki::url $id]
}
-
-
+
+
ad_proc -public do_notifications {
{-revision_id}
- {-page}
+ {-page}
{-html}
{-text}
{-new:boolean true}
@@ -98,27 +105,28 @@
} {
if {![info exists page]} {
- set page [::xowiki::Package instantiate_page_from_id -revision_id $revision_id]
+ set page [::xowiki::Package instantiate_page_from_id \
+ -revision_id $revision_id]
$page volatile
} else {
set revision_id [$page set revision_id]
}
#ns_log notice "--n notification proc called for page [$page name] (revision_id $revision_id) in state [$page publish_status]"
-
+
if {[$page set publish_status] eq "production"} {
#
# Don't do notification for pages under construction.
#
ns_log notice "--n xowiki::notification NO notification due to production state"
return
}
- set pretty_link [$page pretty_link]
+ set pretty_link [$page pretty_link]
$page absolute_links 1
if {![info exists html]} {
set html [$page notification_render]
}
-
+
if {$html eq ""} {
#
# The notification renderer returned empty. Nothing to do.
@@ -134,7 +142,7 @@
# pretty_link as base-url.
#
set html [ad_html_qualify_links -path [ad_file dirname $pretty_link] $html]
-
+
if {![info exists text]} {
set text [ad_html_text_convert -from text/html -to text/plain -- $html]
}
@@ -145,17 +153,22 @@
append text [dict get $details text]
$page instvar package_id
- set state [expr {[$page set last_modified] eq [$page set creation_date] ? "New" : "Updated"}]
+ set state [expr {[$page set last_modified] eq [$page set creation_date]
+ ? "New" : "Updated"}]
set instance_name [::$package_id instance_name]
- set notif_user_id [expr {[$page exists modifying_user] ? [$page set modifying_user] : [$page set creation_user]}]
+ set notif_user_id [expr {[$page exists modifying_user]
+ ? [$page set modifying_user]
+ : [$page set creation_user]}]
#ns_log notice "--n per directory [$page set title] ($state)"
notification::new \
-type_id [notification::type::get_type_id -short_name xowiki_notif] \
-object_id [$page set package_id] \
-response_id [$page set revision_id] \
- -notif_subject [$page notification_subject -instance_name $instance_name -state $state] \
+ -notif_subject [$page notification_subject \
+ -instance_name $instance_name \
+ -state $state] \
-notif_text $text \
-notif_html $html \
-notif_user $notif_user_id
@@ -166,7 +179,8 @@
set tree_id [category::get_tree $cat_id]
array unset cat
array unset label
- foreach category_info [::xowiki::Category get_category_infos -tree_id $tree_id] {
+ foreach category_info [::xowiki::Category get_category_infos \
+ -tree_id $tree_id] {
lassign $category_info category_id category_label deprecated_p level
set cat($level) $category_id
set label($level) $category_label
@@ -175,10 +189,14 @@
foreach level [array names cat] {
#ns_log notice "--n category $cat($level) $label($level): [$page set title] ($state)"
notification::new \
- -type_id [notification::type::get_type_id -short_name xowiki_notif] \
+ -type_id [notification::type::get_type_id \
+ -short_name xowiki_notif] \
-object_id $cat($level) \
-response_id [$page set revision_id] \
- -notif_subject [$page notification_subject -instance_name $instance_name -category_label $label($level) -state $state] \
+ -notif_subject [$page notification_subject \
+ -instance_name $instance_name \
+ -category_label $label($level) \
+ -state $state] \
-notif_text $text \
-notif_html $html \
-notif_user $notif_user_id
@@ -189,18 +207,18 @@
ad_proc -private process_reply { reply_id} {
Handles a reply to an xowiki notification.
-
+
@author Deds Castillo (deds@i-manila.com.ph)
@creation-date 2006-06-08
-
+
} {
# DEDS: need to decide on what to do with this
# do we publish it as comment?
# for now, drop it
return "f"
- }
+ }
}
-::xo::library source_dependent
+::xo::library source_dependent
#
# Local variables:
Index: openacs-4/packages/xowiki/tcl/xowiki-init.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-init.tcl,v
diff -u -r1.3.2.1 -r1.3.2.2
--- openacs-4/packages/xowiki/tcl/xowiki-init.tcl 8 Mar 2020 17:32:23 -0000 1.3.2.1
+++ openacs-4/packages/xowiki/tcl/xowiki-init.tcl 26 Aug 2020 18:46:08 -0000 1.3.2.2
@@ -6,7 +6,9 @@
# are usable. If we would do thisduring loading, we would have
# problems with not-yet loaded library files from other packages.
#
-if {[nsv_exists xowiki must_update_hkeys] && [nsv_get xowiki must_update_hkeys]} {
+if {[nsv_exists xowiki must_update_hkeys]
+ && [nsv_get xowiki must_update_hkeys]
+ } {
::xowiki::hstore::update_update_all_form_instances
nsv_unset xowiki must_update_hkeys
}
@@ -24,13 +26,13 @@
# example, if search is available for a certain subsite (when search
# is subsite aware).
#
-if { [site_node::get_package_url -package_key search] eq "" } {
+if { [site_node::get_package_url -package_key search] eq "" } {
ns_log Warning "xowiki: Search package is not mounted."
set ::xowiki::search_mounted_p 0
} elseif { $search_driver eq ""} {
ns_log Warning "xowiki: FtsEngineDriver parameter in package search is empty."
set ::xowiki::search_mounted_p 0
-} elseif { [apm_package_id_from_key $search_driver] == 0} {
+} elseif { [apm_package_id_from_key $search_driver] == 0} {
ns_log Warning "xowiki Search driver $search_driver is not installed."
set ::xowiki::search_mounted_p 0
} else {
Index: openacs-4/packages/xowiki/tcl/xowiki-mode-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-mode-procs.tcl,v
diff -u -r1.3.2.1 -r1.3.2.2
--- openacs-4/packages/xowiki/tcl/xowiki-mode-procs.tcl 8 Mar 2020 17:32:23 -0000 1.3.2.1
+++ openacs-4/packages/xowiki/tcl/xowiki-mode-procs.tcl 26 Aug 2020 18:46:08 -0000 1.3.2.2
@@ -41,14 +41,14 @@
return [ad_get_client_property -cache_only t xowiki $mode_name]
}
- :public method toggle {} {
+ :public method toggle {} {
#
# Switch state of the toggle
#
set oldState [:get]
:set [expr {!$oldState}]
}
-
+
:public method set {value:boolean} {
#
# Set the mode to the specified value
@@ -65,7 +65,10 @@
::xowiki::Mode create ::xowiki::mode::admin {
:public object method default {} {
# Admins are per default in admin-mode
- return [::xo::cc permission -object_id [xo::cc package_id] -privilege admin -party_id [xo::cc user_id]]
+ return [::xo::cc permission \
+ -object_id [xo::cc package_id] \
+ -privilege admin \
+ -party_id [xo::cc user_id]]
}
}
#
Index: openacs-4/packages/xowiki/tcl/test/test-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/test/test-procs.tcl,v
diff -u -r1.15.2.14 -r1.15.2.15
--- openacs-4/packages/xowiki/tcl/test/test-procs.tcl 26 Aug 2020 18:35:00 -0000 1.15.2.14
+++ openacs-4/packages/xowiki/tcl/test/test-procs.tcl 26 Aug 2020 18:46:08 -0000 1.15.2.15
@@ -98,7 +98,7 @@
aa_log " $name => $item_id"
return $item_id
}
-
+
ad_proc -private ::xowiki::test::require_link {name parent_id package_id target_ref} {
set item_id [::xo::db::CrClass lookup -name $name -parent_id $parent_id]
@@ -146,7 +146,7 @@
}
ns_log notice "Page $name => $item_id"
aa_log " $name => $item_id"
-
+
return $item_id
}
Index: openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl,v
diff -u -r1.15.2.10 -r1.15.2.11
--- openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl 13 Jul 2020 12:02:34 -0000 1.15.2.10
+++ openacs-4/packages/xowiki/tcl/upgrade/upgrade.tcl 26 Aug 2020 18:46:08 -0000 1.15.2.11
@@ -50,7 +50,7 @@
} else {
ns_log notice "-- no new class for $oldClass"
}
- }
+ }
}
}
@@ -143,13 +143,13 @@
::xowiki::PageTemplate ::xowiki::PageInstance} {
db_dml delete_orphan_revisions "
delete from cr_revisions where revision_id in (
- select r.revision_id from cr_items i,cr_revisions r
- where i.content_type = '$class' and r.item_id = i.item_id
+ select r.revision_id from cr_items i,cr_revisions r
+ where i.content_type = '$class' and r.item_id = i.item_id
and not r.revision_id in (select [$class id_column] from [$class table_name]))
"
db_dml delete_orphan_items "
- delete from acs_objects where object_type = '$class'
- and not object_id in (select item_id from cr_items where content_type = '$class')
+ delete from acs_objects where object_type = '$class'
+ and not object_id in (select item_id from cr_items where content_type = '$class')
and not object_id in (select [$class id_column] from [$class table_name])
"
}
@@ -164,10 +164,10 @@
set folder_id [db_string get_folder_id "select f.folder_id from cr_items c, cr_folders f \
where c.name = 'xowiki: $package_id' and c.item_id = f.folder_id"]
if {$folder_id ne ""} {
- db_dml update_package_id {update acs_objects set package_id = :package_id where object_id in
+ db_dml update_package_id {update acs_objects set package_id = :package_id where object_id in
(select item_id as object_id from cr_items where parent_id = :folder_id)}
- db_dml update_package_id {update acs_objects set package_id = :package_id where object_id in
- (select r.revision_id as object_id from cr_revisions r, cr_items i where
+ db_dml update_package_id {update acs_objects set package_id = :package_id where object_id in
+ (select r.revision_id as object_id from cr_revisions r, cr_items i where
i.item_id = r.item_id and i.parent_id = :folder_id)}
::xowiki::Package initialize -package_id $package_id -init_url false
::$package_id reindex
@@ -201,7 +201,7 @@
-drop_column t
}
# drop old non-conformant indices
- foreach index { xowiki_ref_index
+ foreach index { xowiki_ref_index
xowiki_last_visited_index_unique xowiki_last_visited_index
xowiki_tags_index_tag xowiki_tags_index_user
} {
@@ -294,7 +294,7 @@
#
::xowiki::add_ltree_order_column
- # for all xowiki package instances
+ # for all xowiki package instances
foreach package_id [::xowiki::Package instances] {
::xowiki::Package initialize -package_id $package_id -init_url false
# rename swf:name and image:name to file:name
@@ -427,7 +427,7 @@
foreach file {
tcl/xowiki-portlet-procs.tcl
www/delete-revision.tcl www/delete.tcl www/edit.tcl www/revisions.tcl
- www/index.adp www/index.tcl
+ www/index.adp www/index.tcl
www/view.adp www/view.tcl
www/make-live-revision.tcl www/popular_tags.tcl www/save_tags.tcl www/weblog.tcl
www/portlets/categories-recent.adp
@@ -438,16 +438,16 @@
www/portlets/last-visited.tcl
www/portlets/most-popular.adp
www/portlets/most-popular.tcl
- www/portlets/recent.adp
- www/portlets/recent.tcl
+ www/portlets/recent.adp
+ www/portlets/recent.tcl
www/portlets/rss-button.adp
www/portlets/rss-button.tcl
www/portlets/tags.tcl
www/portlets/weblog.adp
www/portlets/weblog.tcl
www/portlets/wiki.adp
www/portlets/wiki.tcl
- www/prototypes/announcements.page
+ www/prototypes/announcements.page
www/admin/regression_test.tcl
} {
if {[ad_file exists $dir/$file]} {
@@ -597,7 +597,7 @@
if {[apm_version_names_compare $from_version_name $v] == -1 &&
[apm_version_names_compare $to_version_name $v] > -1} {
ns_log notice "-- upgrading to $v"
-
+
foreach object_type {PlainPage Page File PodcastItem PageTemplate PageInstance Object Form FormPage} {
set pretty_name_key "#xowiki.${object_type}_pretty_name#"
set pretty_plural_key "#xowiki.${object_type}_pretty_plural#"
@@ -613,7 +613,7 @@
if {[apm_version_names_compare $from_version_name $v] == -1 &&
[apm_version_names_compare $to_version_name $v] > -1} {
ns_log notice "-- upgrading to $v"
-
+
foreach package_id [::xowiki::Package instances -closure true] {
::xowiki::Package initialize -package_id $package_id -init_url false
# reload updated prototype pages
@@ -675,7 +675,7 @@
if {[apm_version_names_compare $from_version_name $v] == -1 &&
[apm_version_names_compare $to_version_name $v] > -1} {
ns_log notice "-- upgrading to $v"
-
+
foreach package_id [::xowiki::Package instances -closure true] {
ns_log notice "::xowiki::Package initialize -package_id $package_id -init_url false"
if {[catch {
@@ -696,7 +696,7 @@
if {[apm_version_names_compare $from_version_name $v] == -1 &&
[apm_version_names_compare $to_version_name $v] > -1} {
ns_log notice "-- upgrading to $v"
-
+
foreach package_id [::xowiki::Package instances -closure true] {
ns_log notice "::xowiki::Package initialize -package_id $package_id -init_url false"
if {[catch {
@@ -736,7 +736,7 @@
foreach package_id [::xowiki::Package instances -closure true] {
::xowiki::Package initialize -package_id $package_id -init_url false
# reload updated prototype pages
- ::$package_id www-import-prototype-page categories-portlet
+ ::$package_id www-import-prototype-page categories-portlet
}
#
# This "ON DELETE CASCADE" was missed in the old good days and
@@ -842,7 +842,7 @@
}
}
-
+
}
#
Index: openacs-4/packages/xowiki/www/admin/delete-type.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/delete-type.tcl,v
diff -u -r1.15.2.1 -r1.15.2.2
--- openacs-4/packages/xowiki/www/admin/delete-type.tcl 8 May 2019 19:59:57 -0000 1.15.2.1
+++ openacs-4/packages/xowiki/www/admin/delete-type.tcl 26 Aug 2020 18:46:08 -0000 1.15.2.2
@@ -5,21 +5,28 @@
@creation-date Aug 11, 2006
@cvs-id $Id$
- @param object_type
+ @param object_type
@param query
} -parameter {
{-object_type ::xowiki::Page}
{-return_url "."}
}
-set sql [$object_type instance_select_query -with_subtypes 0 -folder_id [::$package_id folder_id]]
+set sql [$object_type instance_select_query \
+ -with_subtypes 0 \
+ -folder_id [::$package_id folder_id]]
xo::dc foreach retrieve_instances $sql {
permission::require_write_permission -object_id $item_id
::$package_id www-delete -item_id $item_id -name $name
}
-# drop type requires that all pages of all xowiki instances are deleted
-# foreach type [$object_type object_types -subtypes_first true] {$type drop_object_type}
+#
+# Drop type would require that all pages of all xowiki instances are
+# deleted:
+#
+# foreach type [$object_type object_types -subtypes_first true] {
+# $type drop_object_type
+# }
ad_returnredirect $return_url
ad_script_abort
Index: openacs-4/packages/xowiki/www/admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/index.tcl,v
diff -u -r1.31.2.3 -r1.31.2.4
--- openacs-4/packages/xowiki/www/admin/index.tcl 28 Feb 2020 14:05:05 -0000 1.31.2.3
+++ openacs-4/packages/xowiki/www/admin/index.tcl 26 Aug 2020 18:46:08 -0000 1.31.2.4
@@ -1,6 +1,6 @@
::xowiki::Package initialize -ad_doc {
- This is the admin page for the package. It displays all of the types
+ This is the admin page for the package. It displays all of the types
of wiki pages provides links to delete them
@author Gustaf Neumann neumann@wu-wien.ac.at
Index: openacs-4/packages/xowiki/www/ckeditor-images/delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/ckeditor-images/delete.tcl,v
diff -u -r1.5.2.1 -r1.5.2.2
--- openacs-4/packages/xowiki/www/ckeditor-images/delete.tcl 7 Feb 2020 08:44:05 -0000 1.5.2.1
+++ openacs-4/packages/xowiki/www/ckeditor-images/delete.tcl 26 Aug 2020 18:46:08 -0000 1.5.2.2
@@ -1,9 +1,9 @@
ad_page_contract {
-
+
} {
- parent_id:notnull,integer
- revision:notnull,integer
-}
+ parent_id:notnull,integer
+ revision:notnull,integer
+}
set item_id [content::revision::item_id -revision_id $revision]
content::item::delete -item_id $item_id
Index: openacs-4/packages/xowiki/www/xinha/insert-ilink.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/xinha/insert-ilink.tcl,v
diff -u -r1.8 -r1.8.2.1
--- openacs-4/packages/xowiki/www/xinha/insert-ilink.tcl 7 Aug 2017 23:48:31 -0000 1.8
+++ openacs-4/packages/xowiki/www/xinha/insert-ilink.tcl 26 Aug 2020 18:46:08 -0000 1.8.2.1
@@ -1,5 +1,5 @@
ad_page_contract {
- @author Guenter Ernst guenter.ernst@wu-wien.ac.at,
+ @author Guenter Ernst guenter.ernst@wu-wien.ac.at,
@author Gustaf Neumann neumann@wu-wien.ac.at
@creation-date 13.07.2004
@cvs-id $Id$
@@ -8,7 +8,7 @@
{folder_id:naturalnum,optional}
{file_types *}
}
-
+
set selector_type "file"
set file_selector_link [export_vars -base file-selector \
{fs_package_id folder_id selector_type file_types}]
Index: openacs-4/packages/xowiki/www/xinha/insert-image.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/xinha/insert-image.tcl,v
diff -u -r1.8 -r1.8.2.1
--- openacs-4/packages/xowiki/www/xinha/insert-image.tcl 7 Aug 2017 23:48:31 -0000 1.8
+++ openacs-4/packages/xowiki/www/xinha/insert-image.tcl 26 Aug 2020 18:46:08 -0000 1.8.2.1
@@ -1,13 +1,13 @@
ad_page_contract {
- @author Guenter Ernst guenter.ernst@wu-wien.ac.at,
+ @author Guenter Ernst guenter.ernst@wu-wien.ac.at,
@author Gustaf Neumann neumann@wu-wien.ac.at
@creation-date 13.07.2004
@cvs-id $Id$
} {
{fs_package_id:naturalnum,optional}
{folder_id:naturalnum,optional}
}
-
+
set selector_type "image"
set file_selector_link [export_vars -base file-selector \
{fs_package_id folder_id selector_type}]