Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.272 -r1.273 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 17 May 2018 14:26:31 -0000 1.272 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 20 May 2018 11:01:57 -0000 1.273 @@ -508,7 +508,7 @@ # # Disabled fields are not returned by the browsers. For some - # fields, we require to be sent. therefore we include in these + # fields, we require to be sent. Therefore we include in these # cases the value in an additional hidden field. Maybe we should # change in the future the "name" of the disabled entry to keep # some hypothetical html-checker quiet. Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.223 -r1.224 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 18 May 2018 09:11:36 -0000 1.223 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 20 May 2018 11:01:57 -0000 1.224 @@ -1565,7 +1565,7 @@ :get_parameters # The following snippet opens a window, where a user can edit the - # posted info. however, it seems not possible to add tags this + # posted info. However, it seems not possible to add tags this # way automatically. Alternatively, one could use the API as # described below; this supports tags, but no editing... # http://farm.tucows.com/blog/_archives/2005/3/24/462869.html#adding @@ -4060,8 +4060,10 @@ } if {[info exists voting_form]} { - # if the user provided a voting form name without a language prefix, - # add one. + # + # If the user provided a voting form name without a language + # prefix, add one. + # if {![regexp {^..:} $voting_form]} { set obj ${:__including_page} set voting_form [$obj lang]:$voting_form @@ -4538,7 +4540,7 @@ autoPlay: false, autoBuffering: false, - // provide MP4 file for Flash version 9.0.115 and above. otherwise use FLV + // Provide MP4 file for Flash version 9.0.115 and above. Otherwise use FLV url: '$mp4' } 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.104 -r1.105 --- openacs-4/packages/xowiki/tcl/link-procs.tcl 25 Apr 2018 08:51:36 -0000 1.104 +++ openacs-4/packages/xowiki/tcl/link-procs.tcl 20 May 2018 11:01:57 -0000 1.105 @@ -89,7 +89,7 @@ set target [:target] if {[info commands ::xowiki::template::$target] ne ""} { # - # The target template exists. use the template + # The target template exists. Use the template # # This is a situation, where potentially a # recursive inclusion is happening. The included content is @@ -165,7 +165,7 @@ } else { set object_type [[$page info class] set object_type] if {$object_type ne "::xowiki::Page" && $object_type ne "::xowiki::PlainPage"} { - # TODO: this is a temporary solution. we should find a way to + # TODO: this is a temporary solution. We should find a way to # pass similar to file or image entries the type of this # entry. Maybe we can get the type as well from a kind of # blackboard, where the type of the "edit" wiki-menu-entry is 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.318 -r1.319 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 16 May 2018 15:23:55 -0000 1.318 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 20 May 2018 11:01:57 -0000 1.319 @@ -313,7 +313,7 @@ return "" } # - # The item might be in a folder along the folder path. so it + # The item might be in a folder along the folder path. So it # will be found by the object resolver. For the time being, we # do nothing more about this. # @@ -682,7 +682,7 @@ Package instproc resolve_page_name_and_init_context {{-lang} page_name} { # todo: currently only used from - # Page->resolve_included_page_name. maybe, it could be replaced by + # Page->resolve_included_page_name. Maybe, it could be replaced by # get_page_from_name or get_page_from_item_ref set page "" # @@ -887,7 +887,7 @@ if {![regexp {^[.a-zA-Z0-9_-]+$} $method]} { return [:error_msg "No valid method provided!"] } - + # # Call the method on the resolved page. This call might trigger an # ad_script_abort, so use ad_try to catch these properly. @@ -906,7 +906,7 @@ # Set the invoke object, such it might be used later # ::xo::cc invoke_object $page_or_package - + #:log "--r resolve_page '${:object}' => $page_or_package" if {$page_or_package ne ""} { # @@ -925,7 +925,7 @@ if {[:exists_query_parameter deref]} { set deref [:query_parameter deref] } - + #:log "invoke on LINK <$method> default deref $deref" if {$deref} { set target [$page_or_package get_target_from_link_page] @@ -966,7 +966,7 @@ -template_file $error_template \ "error during [ns_quotehtml $method]:
[ns_quotehtml $errorMsg]
"] } - + } finally { if {$batch_mode} { ${:id} unset -nocomplain __batch_mode Index: openacs-4/packages/xowiki/tcl/template-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/Attic/template-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/xowiki/tcl/template-procs.tcl 7 Aug 2017 23:48:30 -0000 1.6 +++ openacs-4/packages/xowiki/tcl/template-procs.tcl 20 May 2018 11:01:57 -0000 1.7 @@ -10,10 +10,12 @@ src varlist } { - return a the output of a tcl/adp pair as a string. adp_level is - set to the calling procedure so that pass by reference works. - and example of using this is in the search indexer for various content + + Return a the output of a tcl/adp pair as a string. "adp_level" is + set to the calling procedure so that pass by reference works. and + example of using this is in the search indexer for various content types: +
     bookshelf::book::get -book_id $book_id -array bookdata
     set body [template::adp_include /packages/bookshelf/lib/one-book \ 
Index: openacs-4/packages/xowiki/tcl/tree-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/tree-procs.tcl,v
diff -u -r1.21 -r1.22
--- openacs-4/packages/xowiki/tcl/tree-procs.tcl	18 Apr 2018 09:09:13 -0000	1.21
+++ openacs-4/packages/xowiki/tcl/tree-procs.tcl	20 May 2018 11:01:57 -0000	1.22
@@ -222,7 +222,7 @@
 
   TreeRenderer create TreeRenderer=list 
   TreeRenderer=list proc include_head_entries {args} {
-    # In the general case, we have nothing to include.  more
+    # In the general case, we have nothing to include.  More
     # specialized renders will provide their head entries.
   }
   TreeRenderer=list proc render {tree} {
Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v
diff -u -r1.145 -r1.146
--- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl	17 May 2018 07:35:53 -0000	1.145
+++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl	20 May 2018 11:01:57 -0000	1.146
@@ -74,7 +74,9 @@
         #:msg "we got richtext spec for $__field = '$s'"
         set __spec $s
         set __wspec [lindex $__spec 0]
-        # old style folder spec substitution. ugly.
+        #
+        # Old style folder spec substitution. Ugly.
+        #
         if {[:folderspec] ne ""} {
           # append the folder spec to its options
           set __newspec [list $__wspec]
@@ -88,7 +90,8 @@
         }
       } elseif {[lindex $__wspec 0] eq "="} {
         # 
-        # get the information from the attribute definitions & given specs
+        # Get the information from the attribute definitions and given
+        # specs.
         #
 
         set f [${:data} create_raw_form_field \
@@ -385,7 +388,9 @@
         ![${:data} istype ::xowiki::PageTemplate] } {
       if {[${:data} istype ::xowiki::PageInstance]} {
         if {[${:data} set instance_attributes] ne ""} {
-          # fieldless page instances are not notified. problem?
+          #
+          # Field-less page instances are not notified. Problem?
+          #
           # :log "--i instance_attributes = <[${:data} set instance_attributes]>"
           ::xowiki::notification::do_notifications -page ${:data}
         }
@@ -855,7 +860,8 @@
     #       foreach field $fields {
     #         $field setAttribute name $id.[$field getAttribute name]
     #       }
-    #       # updating is rather crude. we need the item_id in advance to fill it
+    #       # Updating is rather crude. We need the item_id in advance to fill it.
+    #       #
     #       # into the items, but it is returned from saving the file.
     #       :log "item_id=$item_id form=[$root asHTML] [${:data} serialize]"
     #       ${:data} update_content [${:data} revision_id] [list [$root asHTML] [lindex $form 1] ]
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.523 -r1.524
--- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl	20 May 2018 10:21:21 -0000	1.523
+++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl	20 May 2018 11:01:57 -0000	1.524
@@ -564,7 +564,7 @@
       #
       # The following statement drops the leading colons from the object
       # names such that the imported objects are inserted into the
-      # current (rather than the global) namespace. rather than the
+      # current (rather than the global) namespace. Rather than the
       # global namespace. The approach is cruel, but backward compatible
       # and avoids potential name clashes with pre-existing objects.
       #
@@ -729,10 +729,9 @@
 
 
   Form instproc marshall {{-mode export}} {
-    #set form_fields [:create_form_fields_from_form_constraints \
-                                 #                     [:get_form_constraints]]
+    #set form_fields [:create_form_fields_from_form_constraints [:get_form_constraints]]
     #:log "--ff=$form_fields"
-    #my build_instance_attribute_map $form_fields
+    # :build_instance_attribute_map $form_fields
     next
   }
 
@@ -780,7 +779,7 @@
     # use different xowiki::Forms in its life-cycle.
     #
     # Note, that only types of form-fields implied by the derived form
-    # constraints are recognized. E.g. in workflows, it might be
+    # constraints are recognized. E.g. In workflows, it might be
     # necessary to move e.g. category definitions into the global form
     # constraints.
     #
@@ -1274,7 +1273,7 @@
     if {[llength [info commands ${:page_template}]] == 0} {
       ::xo::db::CrClass get_instance_from_db -item_id ${:page_template}
     }
-    return [expr {[${:page_template} name] eq "en:link.form"}]    
+    return [expr {[${:page_template} name] eq "en:link.form"}]
   }
 
   #
@@ -2267,7 +2266,7 @@
     ad_try {
       [self]::link configure {*}$options
       set result [[self]::link]
-      
+
     } on error {errorMsg} {
       ns_log error "$errorMsg\n$::errorInfo"
       set result "
Error during processing of options [list $options]\ @@ -2679,7 +2678,7 @@ if {$update_references || [llength [:references get unresolved]] > 0} { :references_update [lsort -unique [:references get resolved]] } - #my unset -nocomplain __references + # unset -nocomplain :__references # #:log "Page [:name] render with_footer $with_footer - [ns_conn isconnected] - [catch {ns_conn content}]" # @@ -3141,7 +3140,7 @@ File instproc full_file_name {} { if {![info exists :full_file_name]} { if {[info exists :revision_id]} { - # + # # For a given revision_id, the full_file_name will never # change. Therefore, we can easily cache the full file name # for the revision_id. @@ -3378,7 +3377,7 @@ } else { set name "" } - + return [append name [::xowiki::utility formCSSclass [:name]]] } @@ -3632,7 +3631,7 @@ :set_payload ${:text} next } - + Object instproc set_payload {cmd} { set payload [self]::payload if {[:isobject $payload]} {$payload destroy} @@ -3647,7 +3646,7 @@ ::xo::clusterwide ns_cache flush xotcl_object_cache ${:item_id} } } - + Object instproc get_payload {var {default ""}} { set payload [self]::payload if {![:isobject $payload]} { @@ -3808,7 +3807,7 @@ ::xo::Package require $package_id } } - #my array set __ia [:instance_attributes] + # array set :__ia [:instance_attributes] next } FormPage instproc initialize {} { @@ -4163,7 +4162,7 @@ lappend list_of_folders [$folder item_id] } } - + if {$include_child_folders eq "direct"} { # # Get all children of the current folder on the first level and @@ -4180,7 +4179,7 @@ } lappend list_of_folders {*}$child_folders } - + $result set folder_ids $list_of_folders foreach folder_id $list_of_folders { @@ -4619,14 +4618,19 @@ } Page instproc unset_temporary_instance_variables {} { - # don't marshall/save/cache the following vars - #my array unset __ia + # + # Don't marshall/save/cache the following vars: + # + # array unset :__ia array unset :__field_in_form array unset :__field_needed } Page instproc map_categories {category_ids} { - # could be optimized, if we do not want to have categories (form constraints?) + # + # Could be optimized, if we do not want to have categories (form + # constraints?) + # #:log "--category::map_object -remove_old -object_id ${:item_id} <$category_ids>" category::map_object -remove_old -object_id ${:item_id} $category_ids } @@ -4641,7 +4645,7 @@ # # The method save_data is called typically via www-callable methods # and has some similarity to "new_data" and "edit_data" in - # "ad_forms". it performs some updates in an instance (e.g. caused + # "ad_forms". It performs some updates in an instance (e.g. caused # by categories), saves the data and calls finally the notification # procs. # 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.357 -r1.358 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 20 May 2018 10:13:23 -0000 1.357 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 20 May 2018 11:01:57 -0000 1.358 @@ -1,5 +1,5 @@ ::xo::library doc { - XoWiki - www procs. These procs are the methods called on xowiki pages via + XoWiki - www procs. These procs are the methods called on xowiki pages via the web interface. @creation-date 2006-04-10 @@ -15,8 +15,8 @@ # naming convention dashes as separators. # # - # externally callable method: bulk-delete - # + # Externally callable method: bulk-delete + # Page instproc www-bulk-delete {} { set package_id ${:package_id} ::security::csrf::validate @@ -39,8 +39,8 @@ } # - # externally callable method: clipboard-add - # + # Externally callable method: clipboard-add + # Page instproc www-clipboard-add {} { if {![:exists_form_parameter "objects"]} { :msg "nothing to copy" @@ -50,8 +50,10 @@ # the page_name is the name exactly as stored in the content repository set item_id [::xo::db::CrClass lookup -name $page_name -parent_id ${:item_id}] if {$item_id == 0} { - # when the pasted item was from a child-resources includelet - # included on e.g. a plain page. we look for a sibling. + # + # When the pasted item was from a child-resources includelet + # included on e.g. a plain page. We look for a sibling. + # set item_id [::xo::db::CrClass lookup -name $page_name -parent_id ${:parent_id}] } #:msg "want to copy $page_name // $item_id" @@ -62,16 +64,16 @@ } # - # externally callable method: clipboard-clear - # + # Externally callable method: clipboard-clear + # Page instproc www-clipboard-clear {} { ::xowiki::clipboard clear ${:package_id} returnredirect [:query_parameter "return_url" [::xo::cc url]] } # - # externally callable method: clipboard-content - # + # Externally callable method: clipboard-content + # Page instproc www-clipboard-content {} { set clipboard [::xowiki::clipboard get] if {$clipboard eq ""} { @@ -89,8 +91,8 @@ } # - # externally callable method: clipboard-copy - # + # Externally callable method: clipboard-copy + # Page instproc www-clipboard-copy {} { set package_id ${:package_id} set clipboard [::xowiki::clipboard get] @@ -111,24 +113,24 @@ } # - # externally callable method: clipboard-export - # + # Externally callable method: clipboard-export + # Page instproc www-clipboard-export {} { set clipboard [::xowiki::clipboard get] ::xowiki::exporter export $clipboard ns_conn close ::xowiki::clipboard clear #${:package_id} returnredirect [:query_parameter "return_url" [::xo::cc url]] } - + # - # externally callable method: create-new - # + # Externally callable method: create-new + # Page instproc www-create-new { - {-parent_id 0} - {-view_method edit} - {-name ""} + {-parent_id 0} + {-view_method edit} + {-name ""} {-nls_language ""} {-publish_status ""} } { @@ -224,7 +226,7 @@ if {$publish_status ne "" && $publish_status in {"production" "ready" "live" "expired"}} { $f publish_status $publish_status } - + if {$name eq ""} { $f save_new } else { @@ -257,13 +259,13 @@ } # - # externally callable method: create-or-use - # + # Externally callable method: create-or-use + # Page instproc www-create-or-use { - {-parent_id 0} - {-view_method edit} - {-name ""} + {-parent_id 0} + {-view_method edit} + {-name ""} {-nls_language ""} } { # can be overloaded @@ -273,8 +275,8 @@ } # - # externally callable method: csv-dump - # + # Externally callable method: csv-dump + # Page instproc www-csv-dump {} { if {![:is_form]} { @@ -298,8 +300,8 @@ } # - # externally callable method: use-template - # + # Externally callable method: use-template + # PageInstance instproc www-use-template {} { set package_id ${:package_id} set formName [:query_parameter "form" ""] @@ -310,7 +312,7 @@ array set "" [$package_id item_ref -default_lang $lang -parent_id [$package_id folder_id] $formName] if {$(item_id) == 0} { error "cannot lookup page $formName" } ::xo::db::CrClass get_instance_from_db -item_id $(item_id) - if {[info commands ::$(item_id)] eq "" + if {[info commands ::$(item_id)] eq "" || "::xowiki::PageTemplate" ni [$(item_id) info precedence]} { error "OK $formName is not suited to be used as template. Should be a Form!" } @@ -324,11 +326,11 @@ } $package_id returnredirect [::xo::cc url] } - + # - # externally callable method: delete - # + # Externally callable method: delete + # Page instproc www-delete {} { # delete always via package @@ -349,10 +351,10 @@ next } } - + # - # externally callable method: delete-revision - # + # Externally callable method: delete-revision + # Page instproc www-delete-revision {} { set item_id ${:item_id} @@ -387,8 +389,8 @@ } # - # externally callable method: diff - # + # Externally callable method: diff + # Page instproc www-diff {} { @@ -429,7 +431,7 @@ set title "Differences for ${:name}" set context [list $title] - + # try util::html diff if it is available and works ad_try { set content [::util::html_diff -old $html2 -new $html1 -show_old_p t] @@ -452,15 +454,15 @@ set out "" set i 0 set j 0 - + #set lines1 [split $doc1 "\n"] #set lines2 [split $doc2 "\n"] - + regsub -all \n $doc1 "
" doc1 regsub -all \n $doc2 "
" doc2 set lines1 [split $doc1 " "] set lines2 [split $doc2 " "] - + foreach { x1 x2 } [list::longestCommonSubsequence $lines1 $lines2] { foreach p $x1 q $x2 { while { $i < $p } { @@ -497,13 +499,13 @@ } # - # externally callable method: download + # Externally callable method: download # File instproc www-download {} { # # determine the delivery method # - set use_bg_delivery [expr {![catch {ns_conn contentsentlength}] && + set use_bg_delivery [expr {![catch {ns_conn contentsentlength}] && [info commands ::bgdelivery] ne ""}] # # The package where the object is coming from might be different @@ -574,8 +576,8 @@ # } # - # helper methods for externally callable method: edit - # + # Helper methods for externally callable method: edit + # Page instproc edit_set_default_values {} { set package_id ${:package_id} @@ -585,7 +587,7 @@ #:log "setting [self] set $key [$package_id query_parameter $key]" set :$key [$package_id query_parameter $key] } - } + } } Page instproc edit_set_file_selector_folder {} { @@ -619,11 +621,11 @@ } # - # externally callable method: edit - # + # Externally callable method: edit + # Page instproc www-edit { - {-new:boolean false} + {-new:boolean false} {-autoname:boolean false} {-validation_errors ""} } { @@ -637,7 +639,7 @@ set submit_link [:query_parameter "return_url" "."] set return_url $submit_link } else { - # before we used "." as default submit link (resulting in a "ad_returnredirect ."). + # before we used "." as default submit link (resulting in a "ad_returnredirect ."). # However, this does not seem to work in case we have folders in use.... #set submit_link "." set submit_link [:pretty_link] @@ -691,7 +693,7 @@ } #:log "form rendered" ::xowiki::f1 instvar edit_form_page_title context formTemplate - + if {[info exists item_id]} { set rev_link [$package_id make_link [self] revisions] set view_link [$package_id make_link [self] view] @@ -743,7 +745,7 @@ # can be overloaded return [:pretty_link] } - + FormPage instproc www-edit { {-validation_errors ""} {-disable_input_fields 0} @@ -762,7 +764,7 @@ set anon_instances [:get_anon_instances] #:log form=$form #:log anon_instances=$anon_instances - + set field_names [:field_names -form $form] #:msg field_names=$field_names set form_fields [:create_form_fields $field_names] @@ -779,9 +781,9 @@ } #:log formgiven=$formgiven - # check name field: + # check name field: # - if it is for anon instances, hide it, - # - if it is required but hidden, show it anyway + # - if it is required but hidden, show it anyway # (might happen, when e.g. set via @cr_fields ... hidden) set name_field [:lookup_form_field -name _name $form_fields] if {$anon_instances} { @@ -812,7 +814,7 @@ #:show_fields $form_fields #:log "__form_action [:form_parameter __form_action {}]" - + if {[:form_parameter __form_action ""] eq "save-form-data"} { #:log "we have to validate" # @@ -831,14 +833,14 @@ #:msg "$validation_errors errors in $form_fields" #foreach f $form_fields { :log "$f: [$f name] '[$f set value]' err: [$f error_msg] " } # - # In case we are triggered internally, we might not have a - # a connection, so we don't present the form with the + # In case we are triggered internally, we might not have a + # a connection, so we don't present the form with the # error messages again, but we return simply the validation # problems. # if {[$package_id exists __batch_mode]} { set errors [list] - foreach f $form_fields { + foreach f $form_fields { if {[$f error_msg] ne ""} { lappend errors [list field [$f name] value [$f set value] error [$f error_msg]] } @@ -893,7 +895,7 @@ #:log "__redirect_method=$redirect_method" return [:www-view] } else { - # + # # Build the input form and display the current values. # if {[:is_new_entry ${:name}]} { @@ -946,7 +948,7 @@ :form_fields_sanity_check $form_fields :post_process_form_fields $form_fields - # The following command would be correct, but does not work due to a bug in + # The following command would be correct, but does not work due to a bug in # tdom. # set form [:regsub_eval \ # [template::adp_variable_regexp] $form \ @@ -993,7 +995,7 @@ ::html::input -type hidden -name __current_revision_id -value ${:revision_id} ::html::CSRFToken } - # insert automatic form fields on top + # insert automatic form fields on top foreach att $field_names { #if {$formgiven && ![string match _* $att]} continue if {[info exists :__field_in_form($att)]} continue @@ -1003,7 +1005,7 @@ } } $fcn # - # append some fields after the HTML contents of the form + # append some fields after the HTML contents of the form # set button_class(wym) "" set button_class(xinha) "" @@ -1024,7 +1026,7 @@ } } - # insert unreported errors + # insert unreported errors foreach f $form_fields { if {[$f set error_msg] ne "" && ![$f exists error_reported]} { $f render_error_msg @@ -1035,7 +1037,7 @@ } if {$formNode ne ""} { - + if {[:exists_query_parameter "return_url"]} { set return_url [:query_parameter "return_url"] } else { @@ -1092,10 +1094,10 @@ } } - + # - # externally callable method: file-upload - # + # Externally callable method: file-upload + # FormPage instproc www-file-upload {} { # @@ -1132,8 +1134,8 @@ } # - # externally callable method: toggle-modebutton - # + # Externally callable method: toggle-modebutton + # FormPage instproc www-toggle-modebutton {} { # # This method is typically called via modebutton in a POST request via ajax; @@ -1153,18 +1155,18 @@ #${:package_id} returnredirect [ns_set get $form return_url [::xo::cc url]] ns_return 200 text/plain ok } - + # - # externally callable method: list - # + # Externally callable method: list + # Page instproc www-list {} { if {[:is_form]} { # The following line is here to provide a short description for # larger form-usages (a few MB) where otherwise # "ad_html_text_convert" in Page.get_description tend to use forever # (at least in Tcl 8.5) set :description "form-usages for ${:name} [:title]" - + return [:www-view [:include [list form-usages -form_item_id ${:item_id}]]] } if {[:is_folder_page]} { @@ -1175,8 +1177,8 @@ } # - # externally callable method: make-live-revision - # + # Externally callable method: make-live-revision + # Page instproc www-make-live-revision {} { set package_id ${:package_id} @@ -1193,8 +1195,8 @@ } # - # externally callable method: popular-tags - # + # Externally callable method: popular-tags + # Page instproc www-popular-tags {} { set limit [:query_parameter "limit" 20] @@ -1217,12 +1219,12 @@ } # - # externally callable method: save-attributes - # + # Externally callable method: save-attributes + # Page ad_instproc www-save-attributes {} { - The method save-attributes is typically callable over the - REST interface. It allows one to save attributes of a + The method save-attributes is typically callable over the + REST interface. It allows one to save attributes of a page without adding a new revision. } { set field_names [:field_names] @@ -1257,7 +1259,7 @@ foreach form_field $form_fields { set s [$form_field slot] if {$s eq ""} { - # empty slot means that we have an instance_attribute; + # empty slot means that we have an instance_attribute; # we save all in one statement below set update_instance_attributes 1 } else { @@ -1272,7 +1274,7 @@ } else { # # perform standard update (with revision) - # + # :save_data \ -use_given_publish_date [expr {"_publish_date" in $field_names}] \ [::xo::cc form_parameter __object_name ""] $category_ids @@ -1289,8 +1291,8 @@ } # - # externally callable method: revisions - # + # Externally callable method: revisions + # Page instproc www-revisions {} { set context [list [list [${:package_id} url] ${:name} ] [_ xotcl-core.revisions]] @@ -1305,8 +1307,8 @@ } # - # externally callable method: save-tags - # + # Externally callable method: save-tags + # Page instproc www-save-tags {} { ::xowiki::Page save_tags \ @@ -1321,8 +1323,8 @@ } # - # externally callable method: validate-attribute - # + # Externally callable method: validate-attribute + # Page instproc www-validate-attribute {} { set field_names [:field_names] @@ -1351,8 +1353,8 @@ } # - # externally callable method: view - # + # Externally callable method: view + # Page instproc www-view {{content ""}} { # The method "view" is used primarily for the toplevel call, when @@ -1376,7 +1378,7 @@ # set object_type [$page_package_id get_parameter object_type [:info class]] set rev_link [$page_package_id make_link -with_entities 0 [self] revisions] - + if {[$context_package_id query_parameter m ""] eq "edit"} { set view_link [$page_package_id make_link -with_entities 0 [self] view return_url] set edit_link "" @@ -1390,8 +1392,8 @@ } else { set new_link [:new_link $page_package_id] } - - set admin_link [$context_package_id make_link -privilege admin -link admin/ $context_package_id {} {}] + + set admin_link [$context_package_id make_link -privilege admin -link admin/ $context_package_id {} {}] set index_link [$context_package_id make_link -privilege public -link "" $context_package_id {} {}] set toc_link [$context_package_id make_link -privilege public -link "list" $context_package_id {} {}] set import_link [$context_package_id make_link -privilege admin -link "" $context_package_id {} {}] @@ -1406,8 +1408,8 @@ set notification_subscribe_link \ [export_vars -base /notifications/request-new \ {{return_url $notifications_return_url} - {pretty_name $notification_text} - {type_id $notification_type} + {pretty_name $notification_text} + {type_id $notification_type} {object_id $context_package_id}}] set notification_image \ " -1} { #if {$form_vars} { #set auto_field_in_form($f) 1 #} set reduced_attributes [lreplace $reduced_attributes $p $p] - } + } } - #:msg reduced_attributes(after)=$reduced_attributes + #:msg reduced_attributes(after)=$reduced_attributes #:msg fields_from_form=[array names :__field_in_form] set field_names [list _name] @@ -2405,7 +2411,7 @@ $f help_text "" } } - if {[$f exists transmit_field_always] + if {[$f exists transmit_field_always] && "::xowiki::formfield::omit" in [$f info mixin]} { # Never omit these fields, this would cause problems with # autonames and empty languages. Set these fields to hidden @@ -2428,7 +2434,7 @@ } } -::xo::library source_dependent +::xo::library source_dependent # Index: openacs-4/packages/xowiki/tcl/yui-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/yui-procs.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/xowiki/tcl/yui-procs.tcl 9 May 2018 15:33:34 -0000 1.13 +++ openacs-4/packages/xowiki/tcl/yui-procs.tcl 20 May 2018 11:01:57 -0000 1.14 @@ -351,7 +351,7 @@ # the tree-procs uses the local yahoo-dom-event. # In future, the YUI loader object should be capable of - # resolving such conflicts. for now, the simple fix is to stick to + # resolving such conflicts. For now, the simple fix is to stick to # the local versions, because then the requireJS function takes care # of duplicates. #