Changeset 8928


Ignore:
Timestamp:
09/06/10 10:33:50 (21 months ago)
Author:
CrawfordCurrie
Message:

Item8841: properly document topic creation with edit, remove dead parameters, add as many defaults as I can work out without going nuts trying to reverse-engineer the code

Location:
trunk/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/data/System/CommandAndCGIScripts.txt

    r8907 r8928  
    1212---++ CGI Scripts 
    1313Details on CGI scripts located in the =bin= directory. 
     14 
     15Note that a blank in the 'Default' column means that the parameter 
     16is not required, and has no default. _required_ means the 
     17parameter is required, and has no default. text _in italics_ describes 
     18default behaviour if no value is given. 
    1419 
    1520---+++ General Information 
     
    2429$ save -topic MyWeb.MyTopic -user admin -action save -text "New text of the topic" 
    2530</verbatim> 
    26 All parameters require a value, even if that is the empty string. 
     31All parameters require a value, even if that is the empty string. Note that parameters passed on the command-line should *not* be URL-encoded. 
     32 
     33When calling a =tools= script from the command line, you normally need to be cd'd to the =bin directory e.g. 
     34<verbatim class="bash"> 
     35$ cd bin 
     36$ ../tools/mailnotify -q -nonews -nochanges -Main -System 
     37</verbatim> 
    2738 
    2839---++++ Common parameters 
     
    3041 
    3142| *Parameter* | *Description* | *Default* | 
    32 | =cover= | Specifies temporary skin path to prepend to the skin path for this script only (see [[Skins]]) | none | 
     43| =cover= | Specifies temporary skin path to prepend to the skin path for this script only (see [[Skins]]) | | 
    3344| =debugenableplugins= | During debugging it can be useful to selectively disable all but a subset of plugins. This parameter allows the caller to specify a comma-separated list of plugins that should be enabled. | | 
    3445| =foswikioriginalquery= | The original query that was being made before a redirect for user confirmation was required. | | 
     
    3748| =refresh= | If the Foswiki page cache is in use, setting this parameter will invalidate the cache. Valid values are =on= and =all=. See PageCaching for more information on the page cache. | | 
    3849| =response= | Used as part of the request validation process. | | 
    39 | =skin= | Overrides the default skin path (see [[Skins]]) | value of the SKIN preference | 
    40 | =t= | While the =t= parameter is not actively used by any scripts, it is used when building links to scripts such as =edit=, to ensure that each edit link is unique. This stops the browser from trying to use a cached reply from a previous call to the script. | generally set to current time, in seconds | 
     50| =skin= | Overrides the default skin path (see [[Skins]]) | _value of the =SKIN= preference_ | 
     51| =t= | While the =t= parameter is not actively used by any scripts, it is used when building links to scripts such as =edit=, to ensure that each edit link is unique. This stops the browser from trying to use a cached reply from a previous call to the script. | _generally set to current time, in seconds_ | 
    4152| =topic= | Overrides the web.topic path given in the URL (specify Web.<nop>TopicName) | | 
    4253| =user= | Command-line only; set the name of the user performing the action. Note: this usage is inherently insecure, as it bypasses webserver login constraints. For this reason only authorised users should be allowed to execute scripts from the command line. | | 
     
    4758 
    4859| *Parameter* | *Description* | *Default* | 
    49 | =filename= | Name of existing attachment (if provided, this is a "manage attachment" action) | none (in which case this is a "new attachment" action) | 
     60| =filename= | Name of existing attachment (if provided, this is a "manage attachment" action) | _this is a "new attachment" action_ | 
    5061 
    5162---+++ =changes= 
     
    5566 
    5667| *Parameter* | *Description* | *Default* | 
    57 | =minor= | If 0, show only major changes. If 1, show all the changes (both minor and major) | 0 | 
     68| =minor= | If 0, show only major changes. If 1, show all the changes (both minor and major) | _show major changes_ | 
    5869 
    5970The main difference between invoking this script and using WebChanges is that WebChanges is based on a =%<nop>SEARCH%=, while this script reads the =changes= file in each web, making it much faster. 
     
    6576 
    6677---+++ =edit= 
    67 The =edit= script understands the following parameters, typically supplied by HTML input fields: 
    68  
    69 | *Parameter* | *Description* | *Default* | 
    70 | =action= | If =action=text=, then hide the form. If =action=form=, then hide the normal text area and only edit the form. | | 
     78The =edit= script understands the following parameters, typically supplied by HTML input fields. 
     79 
     80A major role of the =edit= script is new topic creation. Parameters that are mainly relevant to new topic creation are marked with %ICON{"wip"}% 
     81 
     82| *Parameter name* | *Description* | *Default* | 
     83| =action= | If =action=text=, then hide the form. If =action=form=, then hide the normal text area and only edit the form. | _edit both_ | 
    7184| =breaklock= | If set, any lease conflicts will be ignored, and the edit will proceed even if someone is already editing the topic. | | 
    72 | =contenttype= | Optional parameter that defines the application type to write into the CGI header. Defaults to =text/html=. May be used to invoke alternative client applications | | 
    73 | =formtemplate= | Name of the form to instantiate in the topic. Overrides any form set in the =templatetopic=. Set to 'none' to remove any existing form. | | 
    74 | =notemplateexpansion= | Do not expand any Macros in the template defined by templatetopic. Use this when you want a verbatim copy of a topic | ="off"= | 
    75 | =onlynewtopic= | If set, error if the topic already exists | ="off"= | 
    76 | =onlywikiname= | If set, error if the topic name is not a WikiWord | ="off"= | 
    77 | =redirectto= | If the user continues from edit to save, and if the save (or cancels the edit) process is successful, save will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | | 
    78 | =rev= | Lets you specify a specific revision to use as the basis of the edit. Any save will of course create a new revision. | | 
     85| =contenttype= | Optional parameter that defines the application type to write into the CGI header. May be used to invoke alternative client applications | =text/html= | 
     86| =formtemplate= | Name of the form to instantiate in the topic. Set to =none= to remove any existing form. | | 
     87| =notemplateexpansion= | %ICON{"wip"}% Do not expand any macros in the template topic.  (see [[#NewTopicCreation][New topic creation]] below) | _expand_ | 
     88| =onlynewtopic= | %ICON{"wip"}% If =on=, error if the topic already exists | _edit existing topic_ | 
     89| =onlywikiname= | %ICON{"wip"}% If =on=, error if the name of a topic being created is not a WikiWord | _allow non-wikiword names_ | 
     90| =redirectto= | If the user continues from edit to save, and if the save (or cancel) process is successful, save will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | | 
     91| =rev= | Lets you specify a specific revision to use as the basis of the edit. | _latest_ | 
    7992| =template= | Allows you to specify a different skin template. Overrides any setting of =[[SkinTemplates#TemplatePreferences][EDIT_TEMPLATE]]=. | | 
    80 | =templatetopic= | The name of the template topic, copied to get the initial content (new topic _only_) | | 
    81 | =text= | Text to be edited. If this parameter is not given, the text is taken from the database. This parameter is mainly used for initialising new topics with user-supplied content. | | 
    82 | =topicparent= | Sets the parent topic | | 
    83 | &lt;any name&gt; | Any parameter can passed to the new topic; if the template topic contains =%<nop>URLPARAM{"= &lt;any name&gt; ="}%=, it will be replaced by its value | | 
    84  
    85 Form field values are passed in parameters named 'field' - for example, if I have a field =Status= the parameter name is =Status=. 
    86    1 The first sequence of ten or more =X= characters in the topic name will be converted on save to a number such that the resulting topic name is unique in the target web. 
     93| =templatetopic= | %ICON{"wip"}% The name of the template topic, copied to get the initial content for a new topic. (see [[#NewTopicCreation][New topic creation]] below) | | 
     94| =text= | %ICON{"wip"}% Set the text to be edited. If this parameter is not given, the text is taken from the existing topic (if it exists) | | 
     95| =topicparent= | Sets the parent topic. | | 
     96| _&lt;any name&gt;_ | This can be used in two ways; first, if the topic has a form with a field called _&lt;any name&gt;_, it will set the value of that field. %ICON{"wip"}% Second, it can be expanded in the topic text during topic creation - see [[#NewTopicCreation][New topic creation]] below | | 
    8797 
    8898__Skin notes:__ 
     
    93103 
    94104In most skins that are based on the default templates (such as Pattern skin) you can easily change the =Edit= and =Edit Wiki<nop>Text= buttons to append the =action= parameter, by setting the [[PreferenceSettings][preference]] [[VarEDITACTION][EDITACTION]] to the value =text= or =form=. (You can always get back to editing the whole topic by removing the =action= parameter from the URL browser Location window, and reloading the edit window). 
     105 
     106#NewTopicCreation 
     107__New topic creation %ICON{"wip"}%:__ 
     108 
     109The string AUTOINC followed by one or more digits anywhere in the topic name will be converted to a number such that the resulting topic name is unique in the target web. However this doesn't happen until the topic is saved. 
     110 
     111When a new topic is created using edit, the topic isn't actually created until the edit is saved. The content of the new topic is initialised according to the parameters you pass. 
     112   * =templatetopic= - defines the full name (web.topic) of a topic to use as a template for the new topic. The template topic is copied and, unless =notemplateexpansion= is set, the following macros are expanded in the topic text: =URLPARAM=, =DATE=, =SERVERTIME=, =GMTIME=, =USERNAME=, =WIKINAME=, =WIKIUSERNAME=, =USERINFO=. 
     113   * =text= - use this as the text of the topic. Macros are *not* expanded in this text. Overrides any text set in the =templatetopic=. 
     114   * =formtemplate= - Overrides any form set in the =templatetopic=. 
     115   * =notemplateexpansion= - given by =templatetopic=. Use this when you want a verbatim copy of a topic. 
     116   * =onlynewtopic= and =onlywikiname= are used to control validation of the new topic name. 
     117   * _&lt;any name&gt;_ - besides the form field value setting described above, when creating a new topic, =%<nop>URLPARAM{"= _&lt;any name&gt;_ ="}%= in the =templatetopic= will be expanded to the parameter value. 
    95118 
    96119---+++ =login= 
    97120Used for logging in with !TemplateLoginManager, and for interactive validation of operations that require user confirmation. 
    98121| *Parameter* | *Description* | *Default* | 
    99 | =foswikiloginaction= | If 'validate', the login script is being used for interactive validation of an operation. Otherwise it is being used for login. | 
    100 | =foswiki_origin= | URL that was being accessed when an access violation occurred. the login process will redirect to this URL if it is successful | none | 
     122| =foswikiloginaction= | If 'validate', the login script is being used for interactive validation of an operation. Otherwise it is being used for login. | | 
     123| =foswiki_origin= | URL that was being accessed when an access violation occurred. the login process will redirect to this URL if it is successful | | 
    101124| =remember= | If set, this will cause the user's login to be retained even after their browser is shut down. | 
    102125| =sudo= | promote login to internal wiki admin (admins only) | | 
    103 | =password= | password of user logging in | none | 
    104 | =username= | username of user logging in (if set, login will attempt to authenticate) | none | 
    105 | =usernamestep= | used to initialise the =username= input field in the login form (will not attempt to authenticate) | none | 
     126| =password= | password of user logging in | | 
     127| =username= | username of user logging in (if set, login will attempt to authenticate) | | 
     128| =usernamestep= | used to initialise the =username= input field in the login form (will not attempt to authenticate) | | 
    106129 
    107130---+++ =logon= 
     
    114137 
    115138| *Parameter* | *Description* | *Default* | 
    116 | =action= | One of =create=, =createweb=, =changePassword=, =resetPassword=, =bulkRegister=, =deleteUserAccount=, =editSettings=, =saveSettings=, =restoreRevision= | none | 
     139| =action= | One of =create=, =createweb=, =changePassword=, =resetPassword=, =bulkRegister=, =deleteUserAccount=, =editSettings=, =saveSettings=, =restoreRevision= | _required_ | 
    117140 
    118141---++++ =action=create= 
    119142Alternative entry point for creation, via =edit=, of a new topic, used by screens that support several actions using =manage=. 
    120143| *Parameter* | *Description* | *Default* | 
    121 | =topic= | Name of topic to create (can be web.topic) | none | 
     144| =topic= | Name of topic to create (can be web.topic) | _required_ | 
    122145Other parameters are the same as for =edit=. 
    123146 
     
    125148Create a new web 
    126149| *Parameter* | *Description* | *Default* | 
    127 | =baseweb= | Name of the web to copy to create the new web | '' | 
    128 | =newtopic= | Value of %<nop>TOPIC% within the web creation message. Optionally used in some skins to signify a non-default home topic. | '' | 
    129 | =newweb= | Name of the new web | '' | 
     150| =baseweb= | Name of the web to copy to create the new web | _required_ | 
     151| =newtopic= | Value of %<nop>TOPIC% within the web creation message. Optionally used in some skins to signify a non-default home topic. | | 
     152| =newweb= | Name of the new web | _required_ | 
    130153| =nosearchall= | Value for NOSEARCHALL | '' | 
    131154| =webbgcolor= | value for WEBBGCOLOR | '' | 
     
    137160---++++ =action=saveSettings= 
    138161| *Parameter* | *Description* | *Default* | 
    139 | =originalrev= | Revision that the edit started on | Most recent revision | 
    140 | =redirectto= | If the savesettings process is successful, save will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | '' | 
    141 | =text= | Text of the topic | '' | 
     162| =originalrev= | Revision that the edit started on | _latest_ | 
     163| =redirectto= | If the savesettings process is successful, save will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | _redirect to the web.topic from the URL path_ | 
     164| =text= | Text of the topic | _required_ | 
    142165All other parameters may be interpreted as form fields, depending on the current form definition in the topic. 
    143166 
     
    145168See BulkRegistration. 
    146169| *Parameter* | *Description* | *Default* | 
    147 | =emailuserswithdetails= | Whether to mail registered users or not | false | 
    148 | =logtopic= | Topic to save the log in | Same as topic name, with 'Result' appended. | 
    149 | =overwritehometopics= | Whether to overwrite existing home topics or not | false | 
     170| =logtopic= | Topic to save the log in | _same as topic name, with 'Result' appended_ | 
     171| =overwritehometopics= | Whether to overwrite existing home topics or not | _do not overwrite_ | 
    150172 
    151173---++++ =action=changePassword= 
    152174Change password, email address, or both, of a user. 
    153175| *Parameter* | *Description* | *Default* | 
    154 | =email= | new email address | _none_ | 
    155 | =oldpassword= | current password | _none_ | 
    156 | =password= | new password | _none_ | 
    157 | =passwordA= | new password confirmation | _none_ | 
    158 | =username= | login name of user to change password for | _none_ | 
     176| =email= | new email address | | 
     177| =oldpassword= | current password | _required, unless current user is an admin_ | 
     178| =password= | new password | | 
     179| =passwordA= | new password confirmation | _required if =password= is given_ | 
     180| =username= | login name of user to change password/email for | _required_ | 
    159181=password, =passwordA= and =email= are optional. If neither or =password= and =passwordA= is set, then the user password is left unchanged. If =email= is unset, their email is left unchanged. 
    160182 
     
    162184Reset the password for a single or multiple users 
    163185| *Parameter* | *Description* | *Default* | 
    164 | =introduction= | message to be sent alongside the reset, most often used to announce to the user that they have been given an account.  | '' | 
    165 | =loginname= | *list* of usernames to reset | none - error if not set | 
     186| =introduction= | message to be sent alongside the reset, most often used to announce to the user that they have been given an account.  | | 
     187| =loginname= | *list* of usernames to reset | _required_ | 
    166188 
    167189This is used by BulkResetPassword and ResetPassword. Only administrators can provide a list of LoginNames, non-admins can only provide a single LoginName.  
     
    172194Unregisters (removes) the currently logged-in user. 
    173195| *Parameter* | *Description* | *Default* | 
    174 | =password= | Users' password | none | 
     196| =password= | Users' password | _required_ | 
    175197 
    176198---++++ =action=restoreRevision= 
     
    180202add a user / list of users to a group 
    181203| *Parameter* | *Description* | *Default* | 
    182 | =create= | create the group if it doesn't exist | false | 
    183 | =groupname= |groupname to change | none - error if not set | 
    184 | =username= | *list* of usernames/wikinames to add to group | none - error if not set | 
     204| =create= | create the group if it doesn't exist | =0= | 
     205| =groupname= |groupname to change | _required_ | 
     206| =username= | *list* of usernames/wikinames to add to group | _required_ | 
    185207 
    186208---++++ =action=removeUserFromGroup= 
    187209remove a user / list of users to a group 
    188210| *Parameter* | *Description* | *Default* | 
    189 | =groupname= |groupname to change | none - error if not set | 
    190 | =username= | *list* of usernames/wikinames to add to group | none - error if not set | 
     211| =groupname= |groupname to change | _required_ | 
     212| =username= | *list* of usernames/wikinames to add to group | _required_ | 
    191213 
    192214---+++ =oops= 
     
    198220 
    199221| *Parameter* | *Description* | *Default* | 
    200 | =def= | Optional, can be set to the name of a single definition within =template=. This definition will be instantiated in the =template= wherever =%<nop>INSTANTIATE%= is seen. This lets you use a single template file for many messages. For an example, see =oopsmanagebad.tmpl=. | | 
     222| =def= | Can be set to the name of a single definition within =template=. This definition will be instantiated in the =template= wherever =%<nop>INSTANTIATE%= is seen. This lets you use a single template file for many messages. For an example, see =oopsmanagebad.tmpl=. | | 
    201223| =paramN= | Where N is an integer from 1 upwards. These values will be substituted into =template= for =%<nop>PARAM1%= etc. | | 
    202 | =template= | Name of the template file to display | | 
     224| =template= | Name of the template file to display | =oops= | 
    203225 
    204226---+++ =preview= 
     
    211233| =context= | number of lines of context | | 
    212234| =render= | the rendering style {sequential, sidebyside, raw, debug} | =DIFFRENDERSTYLE=, =sequential= | 
    213 | =rev1= | the higher revision | | 
    214 | =rev2= | the lower revision | | 
    215 | =type= | {history, diff, last} history diff, version to version, last version to previous | =diff= | 
     235| =rev1= | the higher revision | _latest_ | 
     236| =rev2= | the lower revision | _latest_ | 
     237| =type= | =history= gives a history, =diff= rev1 against rev2, =last= latest to previous | =diff= | 
    216238The =context= parameter is only respected if the back-end store supports 
    217239context diffs. 
     
    220242 
    221243| *Parameter* | *Description* | *Default* | 
    222 | =action= | =register= or =verify= or =approve= | | 
     244| =action= | =register= or =verify= or =approve= | _required_ | 
    223245 
    224246<blockquote class="foswikiHelp"> *%X% Note:* The =register= script can only be called via the HTTP POST method except when the action is =verify=. Make sure you specify =method="post"= if you call the =register= script via a form action. It is not possible to call =register= from an =&lt;a href ...&gt;= link. The =verify= action is an exception as it is used to verify registration by clicking a href link from an email.</blockquote> 
    225247 
    226 | *Parameter* | *Description* | 
    227 | =addtogroups= | Accepts a comma-separated list of group names to add the user to. | 
     248| *Parameter* | *Description* | *Default* | 
     249| =addtogroups= | Accepts a comma-separated list of group names to add the user to. | | 
    228250| =code= | (verify= only) Activation code, verifies a pending registration  | 
    229 | =create= | If a group does not exist, will create it. | 
    230 | =email= | New user's email address | 
    231 | =firstname= | New user's first name | 
    232 | =lastname= | New user's surname | 
    233 | =loginname= | New user's login name | 
    234 | =password= | New user's password | 
    235 | =wikiname= | Wikiname of user being registered | 
     251| =create= | If =on=, and a group being added to does not exist, create it. | | 
     252| =email= | New user's email address | _required_ | 
     253| =firstname= | New user's first name | _required_ | 
     254| =lastname= | New user's surname | _required_ | 
     255| =loginname= | New user's login name | _required_ | 
     256| =password= | New user's password | | 
     257| =wikiname= | Wikiname of user being registered | _required_ | 
    236258| &lt;any name&gt; | Any other parameter passed during registration will normally be passed on into the new user's home topic, or ignored. | 
    237259 
     
    240262 
    241263| *Parameter* | *Description* | *Default* | 
    242 | =action= | =renameweb= or anything else | | 
    243 | =confirm= | if defined, requires a second level of confirmation | | 
     264| =action= | =renameweb= or =renameother= | =renameother= | 
     265| =confirm= | if non-0, requires a second level of confirmation | | 
    244266| =referring_topics= | (internal use only) list of topics that refer to the web or topic being renamed | | 
    245 | =redirectto= | If the rename process is successful, rename will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | | 
     267| =redirectto= | If the rename process is successful, rename will redirect to this topic or URL. The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | _the renamed topic_ | 
    246268 
    247269---++++ =action="renameweb"= 
    248270Rename a web. 
    249271| *Parameter* | *Description* | *Default* | 
    250 | =newparentweb= | new parent web name | existing parent | 
     272| =newparentweb= | new parent web name | _existing parent_ | 
    251273| =newsubweb= | new web name | | 
    252274 
    253 ---++++ =action=<i>anything else</i>= 
     275---++++ =action=renameother= 
    254276Rename a topic or an attachment. 
    255277| *Parameter* | *Description* | *Default* | 
    256 | =attachment= | Attachment to move | =none= | 
    257 | =currentwebonly= | if defined, searches current web only for links to this topic | | 
    258 | =newattachment= | New name for attachment | =attachment=, if given | 
    259 | =newtopic= | new topic name | | 
    260 | =newweb= | new web name | | 
    261 | =nonwikiword= | if defined, a non-wikiword is acceptable for the new topic name | | 
     278| =attachment= | Attachment to move | | 
     279| =currentwebonly= | if non-0, searches current web only for links to this topic | _search all webs_ | 
     280| =newattachment= | New name for attachment | _same as =attachment=, if given_ | 
     281| =newtopic= | new topic name | _required_ | 
     282| =newweb= | new web name | _required_ | 
     283| =nonwikiword= | if =on=, a non-wikiword is acceptable for the new topic name | =off= | 
    262284| =template= | template for error when an attachment doesn't exist, =deleteattachment= for when deleting an attachment | | 
    263285 
     
    272294The =rest= script supports the following parameters: 
    273295| *Parameter* | *Description* | *Default* | 
    274 | =endPoint= | Where to redirect the response once the request is served, in the form "Web.Topic". If not given, the REST script must generate a valid response. | 
     296| =endPoint= | Where to redirect the response once the request is served, in the form "Web.Topic". If not given, the REST script must generate a valid response. | | 
    275297| =password= | See =username= | | 
    276298| =username= | If =TemplateLogin=, or a similar login manager not embedded in the web server, is used, then you need to pass a username and password to the server. The =username= and =password= parameters are used for this purpose. | 
     
    314336 
    315337---+++ =save= 
    316 The =save= script performs a range of save-related functions, as selected by the =action= parameter. 
     338The =save= script performs a range of save-related functions. 
    317339 
    318340| *Parameter* | *Description* | *Default* | 
     
    325347| =action_replaceform= | Redirect _from_ the "change form" page. | | 
    326348| =action_repRev= | *Administrators only* replace the text of the most recent revision of the topic with the text in the =text= parameter. =text= must included embedded meta-data tags. All other parameters are ignored. You have to be an administrator to use this, and not all store implementations will support it. | | 
    327 | =action_save= | *default*; save, return to view, dontnotify is =off= | | 
    328 | =dontnotify= | if defined, suppress change notification | | 
    329 | =edit= | The script to use to re-edit the topic when action is =checkpoint= | =edit= | 
     349| =action_save= | *default behaviour*; save, return to view | | 
     350| =dontnotify= | if non-0, suppress change notification | | 
     351| =edit= | The bin script to use to re-edit the topic when action is =checkpoint= | =edit= | 
    330352| =editaction= | When action is =checkpoint=, =add form= or =replace form...=, this is used as the =action= parameter to the =edit= script that is redirected to after the save is complete. | | 
    331 | =editparams= | The parameter string to use to edit the topic when action is =checkpoint= |  | 
     353| =editparams= | The parameter string to use to edit the topic when action is =checkpoint= | | 
    332354| =forcenewrevision= | if set, forces a revision even if %WIKITOOLNAME% thinks one isn't needed | | 
    333 | =formtemplate= | if defined, use the named template for the form (will remove the form is set to 'none') | | 
     355| =formtemplate= | if defined, use the named template for the form (will remove the form if set to 'none') | | 
    334356| =newtopic= | If =templatetopic= is given, and this parameter is set to 1 and the topic does not exist, will clear the initial topic text. | | 
    335357| =onlynewtopic= | If set, error if topic already exists | | 
    336358| =onlywikiname= | If set, error if topic name is not a WikiWord | | 
    337359| =originalrev= | Revision on which the edit started. | | 
    338 | =redirectto= | The save process will redirect to this topic or URL if it is successful. (Typically this would be the URL that was being viewed when edit was invoked). The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | view topic being edited | 
     360| =redirectto= | The save process will redirect to this topic or URL if it is successful. (Typically this would be the URL that was being viewed when edit was invoked). The parameter value can be a =TopicName=, a =Web.TopicName=, or a URL.%BR% *Note:* Redirect to a URL only works if it is enabled in =configure= (Miscellaneous ={AllowRedirectUrl}=). | _topic specified in URL path_ | 
    339361| =template= | The template to use to re-edit the topic when action is =checkpoint= | | 
    340362| =templatetopic= | Name of a topic to use as a template for the text and form (new topic _only_) | | 
     
    377399Refresh the WebStatistics topics in range of webs. 
    378400| *Parameter* | *Description* | *Default* | 
    379 | =logdate= | YYYYMM to generate statistics for | current month | 
    380 | =webs= | comma-separated list of webs to run stats on | all accessible webs | 
     401| =logdate= | YYYYMM to generate statistics for | _current month_ | 
     402| =webs= | comma-separated list of webs to run stats on | _all accessible webs_ | 
    381403 
    382404for example: 
     
    393415Uploads an attachment to a topic. The HTTP request is expected to be in =multipart/form-data= format. 
    394416| *Parameter* | *Description* | *Default* | 
    395 | =changeproperties= | if defined, this is a property change operation *only* - no file will be uploaded. | null | 
    396 | =createlink= | if defined, will create a link to file at end of topic | | 
     417| =changeproperties= | if non=0, this is a property change operation *only* - no file will be uploaded. | | 
     418| =createlink= | if non-0, will create a link to file at end of topic | | 
    397419| =filecomment= | Comment to associate with file in attachment table | | 
    398 | =filename= | deprecated, do not use | | 
    399420| =filepath= | local (client) path name of the file being uploaded. This is used to look up the data for the file in the HTTP query. | | 
    400 | =hidefile= | if defined, will not show file in attachment table | | 
    401 | =noredirect= | Normally it will redirect to 'view' when the upload is \ 
     421| =hidefile= | if non-0, will not show file in attachment table | | 
     422| =noredirect= | Normally the script will redirect to 'view' when the upload is \ 
    402423     complete, but also designed to be useable for REST-style calling using \ 
    403424     the 'noredirect' parameter. If this parameter is set it will return an \ 
    404425     appropriate HTTP status code and print a message to STDOUT, starting \ 
    405      with 'OK' on success and 'ERROR' on failure. | 
    406 | =redirectto= | URL to redirect to after upload. ={AllowRedirectUrl}= \ 
    407      must be enabled in =configure=. The parameter value can be a \ 
     426     with 'OK' on success and 'ERROR' on failure. | | 
     427| =redirectto= | URL to redirect to after upload. The parameter value can be a \ 
    408428     =TopicName=, a =Web.TopicName=, or a URL. Redirect to a URL only works \ 
    409429     if it is enabled in =configure=, and is ignored if =noredirect= is \ 
    410      specified.%BR% *Note:* Redirect to a URL only works if it is enabled \ 
    411      in =configure= (Miscellaneous ={AllowRedirectUrl}=). | | 
     430     specified.%BR% (Miscellaneous ={AllowRedirectUrl}=). | _topic specified in URL path_ | 
    412431 
    413432*Tips* 
     
    421440 
    422441| *Parameter* | *Description* | *Default* | 
    423 | =contenttype= | Allows you to specify a different *Content-Type:* (e.g. =contenttype=text/plain=) | | 
    424 | =raw=on= | Shows the text of the topic in a scrollable textarea | | 
    425 | =raw=debug= | As =raw=on=, but also shows the metadata (forms etc) associated with the topic. | | 
    426 | =raw=text= | Shows only the source of the topic, as plain text (Content-type: text/plain). Only shows the body text, *not* the form or other meta-data. | | 
    427 | =raw=all= | Shows only the source of the topic, as plain text (Content-type: text/plain), *with embedded meta-data*. This may be useful if you want to extract the source of a topic to a local file on disc. | | 
    428 | =rev= | Revision to view (e.g. =rev=45=) | | 
    429 | =SEARCH&lt;hex number&gt;= | Identifies a result set that is being paged through | 
     442| =contenttype= | Allows you to specify a different *Content-Type:* (e.g. =contenttype=text/plain=) | =text/html= | 
     443| =raw= | <ul>\ 
     444<li> =on= - show the text of the topic in a scrollable textarea. </li> \ 
     445<li> =debug= - as =on=, but also shows the metadata (forms etc) associated with the topic. </li> \ 
     446<li> =text= - show only the source of the topic, as plain text (Content-type: text/plain). Only shows the body text, *not* the form or other meta-data. </li> \ 
     447<li> =all= - show only the source of the topic, as plain text (Content-type: text/plain), *with embedded meta-data*. This may be useful if you want to extract the source of a topic to a local file on disc. </li></ul> | | 
     448| =rev= | Revision to view (e.g. =rev=45=) | _latest_ | 
     449| =SEARCH&lt;hex number&gt;= | Identifies a result set that is being paged through | | 
    430450| =section= | Allows to view only a part of the topic delimited by a named section (see %SYSTEMWEB%.VarSTARTSECTION). If the given section is not present, no topic content is displayed. | | 
    431451| =template= | Allows you to specify a different skin template, overriding the 'view' template the view script would normally use. The default template is =view=. For example, you could specify [[%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?template=edit][%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?template=edit]]. This is mainly useful when you have specialised templates for a Wiki Application. | | 
     
    437457 
    438458| *Parameter* | *Description* | *Default* | 
    439 | =filename= | name of attachment | | 
    440 | =rev= | Revision to view | | 
     459| =filename= | name of attachment | _required_ | 
     460| =rev= | Revision to view | _latest_ | 
    441461 
    442462Instead of using the =filename= parameter, you can append the attachment name 
    443463to the end of the URL path (after the topic) e.g. =%SCRIPTURL{viewfile}%/Webname/TopicName/Attachment.gif= 
    444464 
    445 ---++ Command Line Scripts 
     465---++ Tool Scripts 
    446466Details on command line scripts located in the =tools= directory. 
    447467 
     
    453473 
    454474---+++ =rewriteshebang.pl= 
    455 Simple script to rewrite the =#!/usr/bin/perl= shebang lines specific to your local Perl installation. It will rewrite the first line of all your cgi scripts so they use a different shebang line. Use it if your perl is in a non-standard location, or you want to use a different interpreter (such as 'speedy'). 
     475Simple script to rewrite the =#!/usr/bin/perl= [[http://en.wikipedia.org/wiki/Shebang_%28Unix%29][shebang]] lines specific to your local Perl installation. It will rewrite the first line of all your cgi scripts so they use a different shebang line. Use it if your perl is in a non-standard location, or you want to use a different interpreter (such as 'speedy'). 
    456476 
    457477---+++ =tick_foswiki.pl= 
     
    462482 
    463483*Note:* The script has to be run by a user who can write files created by the webserver user. 
     484 
     485Extensions, such as the MailerContrib, also install tool scripts. Check the documentation of the extension for details. 
    464486 
    465487--- 
  • trunk/core/lib/Foswiki/UI/Register.pm

    r8607 r8928  
    160160    # This gets set from the value in the BulkRegistrations topic 
    161161    $settings->{doOverwriteTopics} = $query->param('OverwriteHomeTopics') || 0; 
    162     $settings->{doEmailUserDetails} = $query->param('EmailUsersWithDetails') 
    163       || 0; 
    164162 
    165163    unless ( $session->{users}->isAdmin($user) ) { 
Note: See TracChangeset for help on using the changeset viewer.