+
+
+Pages that link to this page:
+
+
+
+
+@content;noquote@
+
+
+
+
Index: openacs-4/packages/wiki/lib/page.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/lib/page.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/wiki/lib/page.tcl 27 Sep 2005 12:46:10 -0000 1.5
+++ openacs-4/packages/wiki/lib/page.tcl 25 Oct 2005 14:58:04 -0000 1.6
@@ -51,10 +51,25 @@
}
-db_1row get_content "select content,title from cr_revisions, cr_items where revision_id=live_revision and cr_items.item_id=:item_id"
+if {![db_0or1row get_content "select content,title from cr_revisions, cr_items where revision_id=live_revision and cr_items.item_id=:item_id"]} {
+ set form [rp_getform]
+ ns_log debug "
+DB --------------------------------------------------------------------------------
+DB DAVE debugging /var/lib/aolserver/openacs-5-head-cr-tcl-api/packages/wiki/lib/page.tcl
+DB --------------------------------------------------------------------------------
+DB form = '${form}'
+DB [ns_set find $form "item_id"]
+DB --------------------------------------------------------------------------------"
+ if {[ns_set find $form "item_id"] < 0} {
+ rp_form_put item_id $item_id
+ rp_form_put name $name
+ }
+ rp_internal_redirect "/packages/wiki/lib/new"
+}
set stream [Wikit::Format::TextToStream $content]
set refs [Wikit::Format::StreamToRefs $stream "wiki::get_info"]
+
db_multirow related_items get_related_items "select cr.name, cr.title, cr.description from cr_revisionsx cr, cr_items ci, cr_item_rels cir where cir.related_object_id=:item_id and cir.relation_tag='wiki_reference' and ci.live_revision=cr.revision_id and ci.item_id=cir.item_id"
set content [ad_wiki_text_to_html $content "wiki::get_info"]
Index: openacs-4/packages/wiki/tcl/wikit-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wiki/tcl/wikit-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/wiki/tcl/wikit-procs.tcl 27 Sep 2005 12:46:10 -0000 1.3
+++ openacs-4/packages/wiki/tcl/wikit-procs.tcl 25 Oct 2005 14:59:36 -0000 1.4
@@ -111,15 +111,6 @@
foreach line [split $text \n] {
# Per line, classify the it and extract the main textual information.
foreach {tag depth txt aux} [linetype $line] break ; # lassign
-ns_log debug "
-DB --------------------------------------------------------------------------------
-DB DAVE debugging /var/lib/aolserver/openacs-5-2/packages/wiki/tcl/wikit-procs.tcl
-DB --------------------------------------------------------------------------------
-DB tag = '${tag}'
-DB depth = '${depth}'
-DB txt = '${txt}'
-DB aux = '${aux}'
-DB --------------------------------------------------------------------------------"
# Classification tags
#
# UL, OL, DL = Lists (unordered/bullet, ordered/enum,
@@ -526,10 +517,10 @@
x {
# support embedded images if present in "images" view
set iseq ""
- if {[regexp {\.(gif|jpg|png)$} $text - ifmt]} {
+ if {[regexp -nocase {\.(gif|jpg|png)$} $text - ifmt]} {
set iseq [mk::select wdb.images url $text -count 1]
if {$iseq != "" && [info commands eim_$iseq] == ""} {
- if {$ifmt == "jpg"} { set ifmt jpeg }
+ if {[string equal -nocase $ifmt "jpg"]} { set ifmt jpeg }
catch { package require tkimg::$ifmt }
catch {
image create photo eim_$iseq -format $ifmt \
@@ -702,7 +693,7 @@
[quote $text] $html_frag(_a)
}
x {
- if {[regexp {\.(gif|jpg|png)$} $text]} {
+ if {[regexp -nocase {\.(gif|jpg|png)$} $text]} {
append result $html_frag(i_) $text $html_frag(tc)
} else {
append result \
@@ -736,6 +727,9 @@
regsub -all {<} $q {\<} q
regsub -all {>} $q {\>} q
regsub -all {&(#\d+;)} $q {\&\1} q
+ # allow