Admin
Back
@@ -19,6 +19,7 @@
popular tags
References to this Page:
Revisions
+ Search
Title
View
Your Tags
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 -N -r1.1 -r1.2
--- openacs-4/packages/xowiki/tcl/package-procs.tcl 26 Jul 2006 22:56:46 -0000 1.1
+++ openacs-4/packages/xowiki/tcl/package-procs.tcl 31 Jul 2006 21:24:12 -0000 1.2
@@ -249,8 +249,9 @@
} {
my instvar folder_id
db_foreach get_pages "select page_id from xowiki_page, cr_revisions r, cr_items i \
- where page_id = r.revision_id and i.item_id = r.item_id and i.parent_id = $folder_id " {
- search::queue -object_id $page_id -event DELETE
+ where page_id = r.revision_id and i.item_id = r.item_id and i.parent_id = $folder_id \
+ and i.live_revision = page_id" {
+ #search::queue -object_id $page_id -event DELETE
search::queue -object_id $page_id -event INSERT
}
}
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.43 -r1.44
--- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 26 Jul 2006 22:56:46 -0000 1.43
+++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 31 Jul 2006 21:24:12 -0000 1.44
@@ -239,6 +239,26 @@
"
}
}
+
+ if {[apm_version_names_compare $from_version_name "0.31"] == -1 &&
+ [apm_version_names_compare $to_version_name "0.31"] > -1} {
+ ns_log notice "-- upgrading to 0.31"
+ set folder_ids [list]
+ set package_ids [list]
+ db_foreach get_xowiki_packages {select * from apm_packages where package_key = 'xowiki'} {
+ 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
+ (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
+ i.item_id = r.item_id and i.parent_id = :folder_id)}
+ Package create ::$package_id -volatile -folder_id $folder_id -use_ns_conn false
+ ::$package_id reindex
+ }
+ }
+ }
}
#
@@ -771,7 +791,11 @@
append __template_variables__ "\n"
regsub -all [template::adp_variable_regexp] $content {\1@\2;noquote@} content
set template_code [template::adp_compile -string $content]
+ #my log "--pl before adp_eval '[template::adp_level]'"
+ set my_parse_level [template::adp_level]
if {[catch {set template_value [template::adp_eval template_code]} errmsg]} {
+ set ::template::parse_level $my_parse_level
+ #my log "--pl after adp_eval '[template::adp_level]' mpl=$my_parse_level"
return "Error in Page $name: $errmsg
$contentPossible values are$__template_variables__"
}
return $template_value
Index: openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl,v
diff -u -N -r1.11 -r1.12
--- openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 26 Jul 2006 22:56:46 -0000 1.11
+++ openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 31 Jul 2006 21:24:12 -0000 1.12
@@ -13,7 +13,7 @@
returns a datasource for the search package
} {
- ns_log notice "--datasource called with revision_id = $revision_id"
+ ns_log notice "--sc datasource called with revision_id = $revision_id"
set page [::xowiki::Package instantiate_from_page -revision_id $revision_id]
$page volatile
@@ -22,13 +22,24 @@
set text [ad_html_text_convert -from text/html -to text/plain -- $html]
#set text [ad_text_to_html $html]; #this could be used for entity encoded html text in rss entries
- ns_log notice "-- INDEXING $revision_id -> $text"
+ #ns_log notice "--sc INDEXING $revision_id -> $text"
#$page set unresolved_references 0
$page instvar item_id
+ db_dml delete_old_revisions {delete from txt where object_id in \
+ (select revision_id from cr_revisions where item_id = :item_id and revision_id != :revision_id)}
+ foreach tag {h1 h2 h3 h4 h5 b strong} {
+ foreach {match words} [regexp -all -inline "<$tag>(\[^<\]+)$tag>" $html] {
+ foreach w [split $words] {
+ if {$w eq ""} continue
+ set word($w) 1
+ }
+ }
+ }
+ ns_log notice "--sc keywords $revision_id -> [array names word]"
return [list object_id $revision_id title [$page title] \
- content $text keywords {} \
- storage_type text mime text/plain \
+ content $html keywords [array names word] \
+ storage_type text mime text/html \
syndication [list \
link [::xowiki::Page pretty_link -fully_qualified 1 [$page set name]] \
description $text \
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 -N -r1.1 -r1.2
--- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 26 Jul 2006 22:56:46 -0000 1.1
+++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 31 Jul 2006 21:24:12 -0000 1.2
@@ -122,7 +122,7 @@
set page [self]
$package_id return_page -adp $template_file -variables {
references name title item_id page context header_stuff return_url
- content references lang_links
+ content references lang_links package_id
rev_link edit_link delete_link new_link admin_link index_link
tags no_tags tags_with_links save_tag_link popular_tags_link
gc_link gc_comments
Index: openacs-4/packages/xowiki/www/view-default.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/view-default.adp,v
diff -u -N -r1.1 -r1.2
--- openacs-4/packages/xowiki/www/view-default.adp 26 Jul 2006 22:56:46 -0000 1.1
+++ openacs-4/packages/xowiki/www/view-default.adp 31 Jul 2006 21:24:13 -0000 1.2
@@ -32,7 +32,11 @@
#xowiki.new# ·
#xowiki.delete# ·
#xowiki.admin# ·
+ #xowiki.search# ·
#xowiki.index#
+
+
+
@content;noquote@
Index: openacs-4/packages/xowiki/www/pages/index.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/pages/Attic/index.vuh,v
diff -u -N
--- openacs-4/packages/xowiki/www/pages/index.vuh 23 Jun 2006 08:18:24 -0000 1.10
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
-ad_page_contract {
- This is the main page for the package. It displays all entries
- provides links to create, edit and delete these
-
- @author Gustaf Neumann (gustaf.neumann@wu-wien.ac.at)
- @creation-date Oct 23, 2005
- @cvs-id $Id: index.vuh,v 1.10 2006/06/23 08:18:24 gustafn Exp $
-
- @param object_type show objects of this class and its subclasses
-} -query {
- object_type:optional
- folder_id:optional
-}
-
-if {![info exists object_type]} {
- set object_type ::xowiki::Page
-}
-if {![info exists folder_id]} {
- set folder_id [$object_type require_folder -name xowiki]
-}
-
-set path [ns_urldecode [ad_conn path_info]]
-#ns_log notice "-- path=<$path>"
-if {$path ne ""} {
- set item_id [::Generic::CrItem lookup -name $path -parent_id $folder_id]
-
- if {$item_id == 0} {
- if {[regexp {^(..)/(.*)$} $path _ lang name]} {
- set name $lang:$name
- } elseif {![regexp {^..:} $path]} {
- set name [string range [lang::conn::locale] 0 1]:$path
- }
- if {[info exists name]} {
- set item_id [::Generic::CrItem lookup -name $name -parent_id $folder_id]
- }
- if {$item_id == 0} {
- # if subst_blank_in_name is turned on, try to resolve based on _
- set subst_blank_in_name [$folder_id get_payload subst_blank_in_name]
- if {$subst_blank_in_name == 1} {
- regsub -all { } $name "_" name
- set item_id [::Generic::CrItem lookup -name $name -parent_id $folder_id]
- }
- }
- }
- #ns_log notice "-- path=<$path> item_id=$item_id"
- if {$item_id != 0} {
- if {[ns_queryget item_id] eq ""} {rp_form_put item_id $item_id}
- if {[ns_queryget folder_id] eq ""} {rp_form_put folder_id $folder_id}
- rp_internal_redirect "/packages/xowiki/www/view"
- ad_script_abort
- }
-}