| | @@ -164,116 +164,130 @@ |
| 164 | 164 | --------------------- |
| 165 | 165 | |
| 166 | 166 | There are many new commands added to TH1 and used to access the special |
| 167 | 167 | features of Fossil. The following is a summary of the extended commands: |
| 168 | 168 | |
| 169 | | - * anoncap |
| 170 | | - * anycap |
| 171 | | - * artifact |
| 172 | | - * cgiHeaderLine |
| 173 | | - * checkout |
| 174 | | - * combobox |
| 175 | | - * copybtn |
| 176 | | - * date |
| 177 | | - * decorate |
| 178 | | - * defHeader |
| 179 | | - * dir |
| 180 | | - * enable\_output |
| 181 | | - * encode64 |
| 182 | | - * getParameter |
| 183 | | - * glob\_match |
| 184 | | - * globalState |
| 185 | | - * hascap |
| 186 | | - * hasfeature |
| 187 | | - * html |
| 188 | | - * htmlize |
| 189 | | - * http |
| 190 | | - * httpize |
| 191 | | - * insertCsrf |
| 192 | | - * linecount |
| 193 | | - * markdown |
| 194 | | - * nonce |
| 195 | | - * puts |
| 196 | | - * query |
| 197 | | - * randhex |
| 198 | | - * redirect |
| 199 | | - * regexp |
| 200 | | - * reinitialize |
| 201 | | - * render |
| 202 | | - * repository |
| 203 | | - * searchable |
| 204 | | - * setParameter |
| 205 | | - * setting |
| 206 | | - * stime |
| 207 | | - * styleHeader |
| 208 | | - * styleFooter |
| 209 | | - * styleScript |
| 210 | | - * tclEval |
| 211 | | - * tclExpr |
| 212 | | - * tclInvoke |
| 213 | | - * tclIsSafe |
| 214 | | - * tclMakeSafe |
| 215 | | - * tclReady |
| 216 | | - * trace |
| 217 | | - * unversioned content |
| 218 | | - * unversioned list |
| 219 | | - * utime |
| 220 | | - * verifyCsrf |
| 221 | | - * verifyLogin |
| 222 | | - * wiki |
| 169 | + * [anoncap](#anoncap) |
| 170 | + * [anycap](#anycap) |
| 171 | + * [artifact](#artifact) |
| 172 | + * [captureTh1](#captureTh1) |
| 173 | + * [cgiHeaderLine](#cgiHeaderLine) |
| 174 | + * [checkout](#checkout) |
| 175 | + * [combobox](#combobox) |
| 176 | + * [copybtn](#copybtn) |
| 177 | + * [date](#date) |
| 178 | + * [decorate](#decorate) |
| 179 | + * [defHeader](#defHeader) |
| 180 | + * [dir](#dir) |
| 181 | + * [enable\_htmlify](#enable_htmlify) |
| 182 | + * [enable\_output](#enable_output) |
| 183 | + * [encode64](#encode64) |
| 184 | + * [getParameter](#getParameter) |
| 185 | + * [glob\_match](#glob_match) |
| 186 | + * [globalState](#globalState) |
| 187 | + * [hascap](#hascap) |
| 188 | + * [hasfeature](#hasfeature) |
| 189 | + * [html](#html) |
| 190 | + * [htmlize](#htmlize) |
| 191 | + * [http](#http) |
| 192 | + * [httpize](#httpize) |
| 193 | + * [insertCsrf](#insertCsrf) |
| 194 | + * [linecount](#linecount) |
| 195 | + * [markdown](#markdown) |
| 196 | + * [nonce](#nonce) |
| 197 | + * [puts](#puts) |
| 198 | + * [query](#query) |
| 199 | + * [randhex](#randhex) |
| 200 | + * [redirect](#redirect) |
| 201 | + * [regexp](#regexp) |
| 202 | + * [reinitialize](#reinitialize) |
| 203 | + * [render](#render) |
| 204 | + * [repository](#repository) |
| 205 | + * [searchable](#searchable) |
| 206 | + * [setParameter](#setParameter) |
| 207 | + * [setting](#setting) |
| 208 | + * [stime](#stime) |
| 209 | + * [styleHeader](#styleHeader) |
| 210 | + * [styleFooter](#styleFooter) |
| 211 | + * [styleScript](#styleScript) |
| 212 | + * [tclEval](#tclEval) |
| 213 | + * [tclExpr](#tclExpr) |
| 214 | + * [tclInvoke](#tclInvoke) |
| 215 | + * [tclIsSafe](#tclIsSafe) |
| 216 | + * [tclMakeSafe](#tclMakeSafe) |
| 217 | + * [tclReady](#tclReady) |
| 218 | + * [trace](#trace) |
| 219 | + * [unversioned content](#unversioned_content) |
| 220 | + * [unversioned list](#unversioned_list) |
| 221 | + * [utime](#utime) |
| 222 | + * [verifyCsrf](#verifyCsrf) |
| 223 | + * [verifyLogin](#verifyLogin) |
| 224 | + * [wiki](#wiki) |
| 223 | 225 | |
| 224 | 226 | Each of the commands above is documented by a block comment above their |
| 225 | 227 | implementation in the th\_main.c or th\_tcl.c source files. |
| 226 | 228 | |
| 227 | 229 | All commands starting with "tcl", with the exception of "tclReady", |
| 228 | 230 | require the Tcl integration subsystem be included at compile-time. |
| 229 | 231 | Additionally, the "tcl" repository setting must be enabled at runtime |
| 230 | 232 | in order to successfully make use of these commands. |
| 231 | 233 | |
| 232 | | -<a name="anoncap"></a>TH1 anoncap Command |
| 234 | +<a id="anoncap"></a>TH1 anoncap Command |
| 233 | 235 | ----------------------------------------- |
| 234 | 236 | |
| 235 | 237 | * anoncap STRING... |
| 236 | 238 | |
| 237 | 239 | Returns true if the anonymous user has all of the capabilities listed |
| 238 | 240 | in STRING. |
| 239 | 241 | |
| 240 | | -<a name="anycap"></a>TH1 anycap Command |
| 242 | +<a id="anycap"></a>TH1 anycap Command |
| 241 | 243 | --------------------------------------- |
| 242 | 244 | |
| 243 | 245 | * anycap STRING |
| 244 | 246 | |
| 245 | 247 | Returns true if the current user user has any one of the capabilities |
| 246 | 248 | listed in STRING. |
| 247 | 249 | |
| 248 | | -<a name="artifact"></a>TH1 artifact Command |
| 250 | +<a id="artifact"></a>TH1 artifact Command |
| 249 | 251 | ------------------------------------------- |
| 250 | 252 | |
| 251 | 253 | * artifact ID ?FILENAME? |
| 252 | 254 | |
| 253 | 255 | Attempts to locate the specified artifact and return its contents. An |
| 254 | 256 | error is generated if the repository is not open or the artifact cannot |
| 255 | 257 | be found. |
| 256 | 258 | |
| 257 | | -<a name="cgiHeaderLine"></a>TH1 cgiHeaderLine Command |
| 259 | +<a id="captureTh1"></a>TH1 captureTh1 Command |
| 260 | +----------------------------------------------------- |
| 261 | + |
| 262 | + * captureTh1 STRING |
| 263 | + |
| 264 | +Executes its single argument as TH1 code and captures any |
| 265 | +TH1-generated output as a string, which becomes the result of the |
| 266 | +function call. e.g. any `puts` calls made from that block will not |
| 267 | +generate any output, and instead their output will become part of the |
| 268 | +result string. |
| 269 | + |
| 270 | + |
| 271 | +<a id="cgiHeaderLine"></a>TH1 cgiHeaderLine Command |
| 258 | 272 | ----------------------------------------------------- |
| 259 | 273 | |
| 260 | 274 | * cgiHeaderLine line |
| 261 | 275 | |
| 262 | 276 | Adds the specified line to the CGI header. |
| 263 | 277 | |
| 264 | | -<a name="checkout"></a>TH1 checkout Command |
| 278 | +<a id="checkout"></a>TH1 checkout Command |
| 265 | 279 | ------------------------------------------- |
| 266 | 280 | |
| 267 | 281 | * checkout ?BOOLEAN? |
| 268 | 282 | |
| 269 | 283 | Return the fully qualified directory name of the current checkout or an |
| 270 | 284 | empty string if it is not available. Optionally, it will attempt to find |
| 271 | 285 | the current checkout, opening the configuration ("user") database and the |
| 272 | 286 | repository as necessary, if the boolean argument is non-zero. |
| 273 | 287 | |
| 274 | | -<a name="combobox"></a>TH1 combobox Command |
| 288 | +<a id="combobox"></a>TH1 combobox Command |
| 275 | 289 | ------------------------------------------- |
| 276 | 290 | |
| 277 | 291 | * combobox NAME TEXT-LIST NUMLINES |
| 278 | 292 | |
| 279 | 293 | Generates and emits an HTML combobox. NAME is both the name of the |
| | @@ -280,11 +294,11 @@ |
| 280 | 294 | CGI parameter and the name of a variable that contains the currently |
| 281 | 295 | selected value. TEXT-LIST is a list of possible values for the |
| 282 | 296 | combobox. NUMLINES is 1 for a true combobox. If NUMLINES is greater |
| 283 | 297 | than one then the display is a listbox with the number of lines given. |
| 284 | 298 | |
| 285 | | -<a name="copybtn"></a>TH1 copybtn Command |
| 299 | +<a id="copybtn"></a>TH1 copybtn Command |
| 286 | 300 | ----------------------------------------- |
| 287 | 301 | |
| 288 | 302 | * copybtn TARGETID FLIPPED TEXT ?COPYLENGTH? |
| 289 | 303 | |
| 290 | 304 | Output TEXT with a click-to-copy button next to it. Loads the copybtn.js |
| | @@ -302,34 +316,34 @@ |
| 302 | 316 | * >= 3: Truncate TEXT after COPYLENGTH (single-byte) characters. |
| 303 | 317 | * 1: Use the "hash-digits" setting as the limit. |
| 304 | 318 | * 2: Use the length appropriate for URLs as the limit (defined at |
| 305 | 319 | compile-time by `FOSSIL_HASH_DIGITS_URL`, defaults to 16). |
| 306 | 320 | |
| 307 | | -<a name="date"></a>TH1 date Command |
| 321 | +<a id="date"></a>TH1 date Command |
| 308 | 322 | ----------------------------------- |
| 309 | 323 | |
| 310 | 324 | * date ?-local? |
| 311 | 325 | |
| 312 | 326 | Return a strings which is the current time and date. If the -local |
| 313 | 327 | option is used, the date appears using localtime instead of UTC. |
| 314 | 328 | |
| 315 | | -<a name="decorate"></a>TH1 decorate Command |
| 329 | +<a id="decorate"></a>TH1 decorate Command |
| 316 | 330 | ------------------------------------------- |
| 317 | 331 | |
| 318 | 332 | * decorate STRING |
| 319 | 333 | |
| 320 | 334 | Renders STRING as wiki content; however, only links are handled. No |
| 321 | 335 | other markup is processed. |
| 322 | 336 | |
| 323 | | -<a name="defHeader"></a>TH1 defHeader Command |
| 337 | +<a id="defHeader"></a>TH1 defHeader Command |
| 324 | 338 | --------------------------------------------- |
| 325 | 339 | |
| 326 | 340 | * defHeader |
| 327 | 341 | |
| 328 | 342 | Returns the default page header. |
| 329 | 343 | |
| 330 | | -<a name="dir"></a>TH1 dir Command |
| 344 | +<a id="dir"></a>TH1 dir Command |
| 331 | 345 | --------------------------------- |
| 332 | 346 | |
| 333 | 347 | * dir CHECKIN ?GLOB? ?DETAILS? |
| 334 | 348 | |
| 335 | 349 | Returns a list containing all files in CHECKIN. If GLOB is given only |
| | @@ -337,42 +351,60 @@ |
| 337 | 351 | If DETAILS is non-zero, the result will be a list-of-lists, with each |
| 338 | 352 | element containing at least three elements: the file name, the file |
| 339 | 353 | size (in bytes), and the file last modification time (relative to the |
| 340 | 354 | time zone configured for the repository). |
| 341 | 355 | |
| 342 | | -<a name="enable_output"></a>TH1 enable\_output Command |
| 356 | +<a id="enable_htmlify"></a>TH1 enable\_htmlify Command |
| 357 | +------------------------------------------------------ |
| 358 | + |
| 359 | + * enable\_htmlify |
| 360 | + * enable\_htmlify ?TRACE-LABEL? BOOLEAN |
| 361 | + |
| 362 | +By default, certain output from `puts` and similar commands is escaped |
| 363 | +for HTML. The first call form returns the current state of that |
| 364 | +feature: `1` for on and `0` for off. The second call form enables |
| 365 | +(non-0) or disables (0) that feature and returns the *pre-call* state |
| 366 | +of that feature (so that a second call can pass that value to restore |
| 367 | +it to its previous state). The optional `TRACE-LABEL` argument causes |
| 368 | +the TH1 tracing output (if enabled) to add a marker when the second |
| 369 | +form of this command is invoked, and includes that label and the |
| 370 | +boolean argument's value in the trace. If tracing is disabled, that |
| 371 | +argument has no effect. |
| 372 | + |
| 373 | + |
| 374 | +<a id="enable_output"></a>TH1 enable\_output Command |
| 343 | 375 | ------------------------------------------------------ |
| 344 | 376 | |
| 345 | 377 | * enable\_output BOOLEAN |
| 346 | 378 | |
| 347 | 379 | Enable or disable sending output when the combobox, copybtn, puts, or wiki |
| 348 | 380 | commands are used. |
| 349 | 381 | |
| 350 | | -<a name="encode64"></a>TH1 encode64 Command |
| 382 | +<a id="encode64"></a>TH1 encode64 Command |
| 351 | 383 | ------------------------------------------- |
| 352 | 384 | |
| 353 | 385 | * encode64 STRING |
| 354 | 386 | |
| 355 | 387 | Encode the specified string using Base64 and return the result. |
| 356 | 388 | |
| 357 | | -<a name="getParameter"></a>TH1 getParameter Command |
| 389 | +<a id="getParameter"></a>TH1 getParameter Command |
| 358 | 390 | --------------------------------------------------- |
| 359 | 391 | |
| 360 | 392 | * getParameter NAME ?DEFAULT? |
| 361 | 393 | |
| 362 | 394 | Returns the value of the specified query parameter or the specified |
| 363 | 395 | default value when there is no matching query parameter. |
| 364 | 396 | |
| 365 | | -<a name="glob_match"></a>TH1 glob\_match Command |
| 397 | +<a id="glob_match"></a>TH1 glob\_match Command |
| 366 | 398 | ------------------------------------------------ |
| 367 | 399 | |
| 368 | 400 | * glob\_match ?-one? ?--? patternList string |
| 369 | 401 | |
| 370 | 402 | Checks the string against the specified glob pattern -OR- list of glob |
| 371 | 403 | patterns and returns non-zero if there is a match. |
| 372 | 404 | |
| 373 | | -<a name="globalState"></a>TH1 globalState Command |
| 405 | +<a id="globalState"></a>TH1 globalState Command |
| 374 | 406 | ------------------------------------------------- |
| 375 | 407 | |
| 376 | 408 | * globalState NAME ?DEFAULT? |
| 377 | 409 | |
| 378 | 410 | Returns a string containing the value of the specified global state |
| | @@ -390,19 +422,19 @@ |
| 390 | 422 | |
| 391 | 423 | Attempts to query for unsupported global state variables will result |
| 392 | 424 | in a script error. Additional global state variables may be exposed |
| 393 | 425 | in the future. |
| 394 | 426 | |
| 395 | | -<a name="hascap"></a>TH1 hascap Command |
| 427 | +<a id="hascap"></a>TH1 hascap Command |
| 396 | 428 | --------------------------------------- |
| 397 | 429 | |
| 398 | 430 | * hascap STRING... |
| 399 | 431 | |
| 400 | 432 | Returns true if the current user has all of the capabilities listed |
| 401 | 433 | in STRING. |
| 402 | 434 | |
| 403 | | -<a name="hasfeature"></a>TH1 hasfeature Command |
| 435 | +<a id="hasfeature"></a>TH1 hasfeature Command |
| 404 | 436 | ----------------------------------------------- |
| 405 | 437 | |
| 406 | 438 | * hasfeature STRING |
| 407 | 439 | |
| 408 | 440 | Returns true if the binary has the given compile-time feature enabled. |
| | @@ -425,26 +457,26 @@ |
| 425 | 457 | 1. **see** -- _Uses the SQLite Encryption Extension._ |
| 426 | 458 | |
| 427 | 459 | Specifying an unknown feature will return a value of false, it will not |
| 428 | 460 | raise a script error. |
| 429 | 461 | |
| 430 | | -<a name="html"></a>TH1 html Command |
| 462 | +<a id="html"></a>TH1 html Command |
| 431 | 463 | ----------------------------------- |
| 432 | 464 | |
| 433 | 465 | * html STRING |
| 434 | 466 | |
| 435 | 467 | Outputs the STRING escaped for HTML. |
| 436 | 468 | |
| 437 | | -<a name="htmlize"></a>TH1 htmlize Command |
| 469 | +<a id="htmlize"></a>TH1 htmlize Command |
| 438 | 470 | ----------------------------------------- |
| 439 | 471 | |
| 440 | 472 | * htmlize STRING |
| 441 | 473 | |
| 442 | 474 | Escape all characters of STRING which have special meaning in HTML. |
| 443 | 475 | Returns the escaped string. |
| 444 | 476 | |
| 445 | | -<a name="http"></a>TH1 http Command |
| 477 | +<a id="http"></a>TH1 http Command |
| 446 | 478 | ----------------------------------- |
| 447 | 479 | |
| 448 | 480 | * http ?-asynchronous? ?--? url ?payload? |
| 449 | 481 | |
| 450 | 482 | Performs an HTTP or HTTPS request for the specified URL. If a |
| | @@ -453,58 +485,59 @@ |
| 453 | 485 | be used. Upon success, if the -asynchronous option is used, an |
| 454 | 486 | empty string is returned as the result; otherwise, the response |
| 455 | 487 | from the server is returned as the result. Synchronous requests |
| 456 | 488 | are not currently implemented. |
| 457 | 489 | |
| 458 | | -<a name="httpize"></a>TH1 httpize Command |
| 490 | +<a id="httpize"></a>TH1 httpize Command |
| 459 | 491 | ----------------------------------------- |
| 460 | 492 | |
| 461 | 493 | * httpize STRING |
| 462 | 494 | |
| 463 | 495 | Escape all characters of STRING which have special meaning in URI |
| 464 | 496 | components. Returns the escaped string. |
| 465 | 497 | |
| 466 | | -<a name="insertCsrf"></a>TH1 insertCsrf Command |
| 498 | +<a id="insertCsrf"></a>TH1 insertCsrf Command |
| 467 | 499 | ----------------------------------------------- |
| 468 | 500 | |
| 469 | 501 | * insertCsrf |
| 470 | 502 | |
| 471 | 503 | While rendering a form, call this command to add the Anti-CSRF token |
| 472 | 504 | as a hidden element of the form. |
| 473 | 505 | |
| 474 | | -<a name="linecount"></a>TH1 linecount Command |
| 506 | +<a id="linecount"></a>TH1 linecount Command |
| 475 | 507 | --------------------------------------------- |
| 476 | 508 | |
| 477 | 509 | * linecount STRING MAX MIN |
| 478 | 510 | |
| 479 | 511 | Returns one more than the number of \n characters in STRING. But |
| 480 | 512 | never returns less than MIN or more than MAX. |
| 481 | 513 | |
| 482 | | -<a name="markdown"></a>TH1 markdown Command |
| 514 | +<a id="markdown"></a>TH1 markdown Command |
| 483 | 515 | ------------------------------------------- |
| 484 | 516 | |
| 485 | 517 | * markdown STRING |
| 486 | 518 | |
| 487 | 519 | Renders the input string as markdown. The result is a two-element list. |
| 488 | 520 | The first element contains the body, rendered as HTML. The second element |
| 489 | 521 | is the text-only title string. |
| 490 | 522 | |
| 491 | | -<a name="nonce"></a>TH1 nonce Command |
| 523 | +<a id="nonce"></a>TH1 nonce Command |
| 492 | 524 | ------------------------------------- |
| 493 | 525 | |
| 494 | 526 | * nonce |
| 495 | 527 | |
| 496 | 528 | Returns the value of the cryptographic nonce for the request being processed. |
| 497 | 529 | |
| 498 | | -<a name="puts"></a>TH1 puts Command |
| 530 | +<a id="puts"></a>TH1 puts Command |
| 499 | 531 | ----------------------------------- |
| 500 | 532 | |
| 501 | 533 | * puts STRING |
| 502 | 534 | |
| 503 | | -Outputs the STRING unchanged. |
| 535 | +Outputs the STRING unchanged, where "unchanged" might, depending on |
| 536 | +the context, mean "with some characters escaped for HTML." |
| 504 | 537 | |
| 505 | | -<a name="query"></a>TH1 query Command |
| 538 | +<a id="query"></a>TH1 query Command |
| 506 | 539 | ------------------------------------- |
| 507 | 540 | |
| 508 | 541 | * query ?-nocomplain? SQL CODE |
| 509 | 542 | |
| 510 | 543 | Runs the SQL query given by the SQL argument. For each row in the result |
| | @@ -512,19 +545,19 @@ |
| 512 | 545 | |
| 513 | 546 | In SQL, parameters such as $var are filled in using the value of variable |
| 514 | 547 | "var". Result values are stored in variables with the column name prior |
| 515 | 548 | to each invocation of CODE. |
| 516 | 549 | |
| 517 | | -<a name="randhex"></a>TH1 randhex Command |
| 550 | +<a id="randhex"></a>TH1 randhex Command |
| 518 | 551 | ----------------------------------------- |
| 519 | 552 | |
| 520 | 553 | * randhex N |
| 521 | 554 | |
| 522 | 555 | Returns a string of N*2 random hexadecimal digits with N<50. If N is |
| 523 | 556 | omitted, use a value of 10. |
| 524 | 557 | |
| 525 | | -<a name="redirect"></a>TH1 redirect Command |
| 558 | +<a id="redirect"></a>TH1 redirect Command |
| 526 | 559 | ------------------------------------------- |
| 527 | 560 | |
| 528 | 561 | * redirect URL ?withMethod? |
| 529 | 562 | |
| 530 | 563 | Issues an HTTP redirect to the specified URL and then exits the process. |
| | @@ -532,43 +565,43 @@ |
| 532 | 565 | argument is present and non-zero, an HTTP status code of 307 is used, which |
| 533 | 566 | should force the user agent to preserve the original method for the request |
| 534 | 567 | (e.g. GET, POST) instead of (possibly) forcing the user agent to change the |
| 535 | 568 | method to GET. |
| 536 | 569 | |
| 537 | | -<a name="regexp"></a>TH1 regexp Command |
| 570 | +<a id="regexp"></a>TH1 regexp Command |
| 538 | 571 | --------------------------------------- |
| 539 | 572 | |
| 540 | 573 | * regexp ?-nocase? ?--? exp string |
| 541 | 574 | |
| 542 | 575 | Checks the string against the specified regular expression and returns |
| 543 | 576 | non-zero if it matches. If the regular expression is invalid or cannot |
| 544 | 577 | be compiled, an error will be generated. |
| 545 | 578 | |
| 546 | | -<a name="reinitialize"></a>TH1 reinitialize Command |
| 579 | +<a id="reinitialize"></a>TH1 reinitialize Command |
| 547 | 580 | --------------------------------------------------- |
| 548 | 581 | |
| 549 | 582 | * reinitialize ?FLAGS? |
| 550 | 583 | |
| 551 | 584 | Reinitializes the TH1 interpreter using the specified flags. |
| 552 | 585 | |
| 553 | | -<a name="render"></a>TH1 render Command |
| 586 | +<a id="render"></a>TH1 render Command |
| 554 | 587 | --------------------------------------- |
| 555 | 588 | |
| 556 | 589 | * render STRING |
| 557 | 590 | |
| 558 | 591 | Renders the TH1 template and writes the results. |
| 559 | 592 | |
| 560 | | -<a name="repository"></a>TH1 repository Command |
| 593 | +<a id="repository"></a>TH1 repository Command |
| 561 | 594 | ----------------------------------------------- |
| 562 | 595 | |
| 563 | 596 | * repository ?BOOLEAN? |
| 564 | 597 | |
| 565 | 598 | Returns the fully qualified file name of the open repository or an empty |
| 566 | 599 | string if one is not currently open. Optionally, it will attempt to open |
| 567 | 600 | the repository if the boolean argument is non-zero. |
| 568 | 601 | |
| 569 | | -<a name="searchable"></a>TH1 searchable Command |
| 602 | +<a id="searchable"></a>TH1 searchable Command |
| 570 | 603 | ----------------------------------------------- |
| 571 | 604 | |
| 572 | 605 | * searchable STRING... |
| 573 | 606 | |
| 574 | 607 | Return true if searching in any of the document classes identified |
| | @@ -593,54 +626,54 @@ |
| 593 | 626 | if {[searchable cdtw]} {...} |
| 594 | 627 | |
| 595 | 628 | This command is useful for enabling or disabling a "Search" entry on the |
| 596 | 629 | menu bar. |
| 597 | 630 | |
| 598 | | -<a name="setParameter"></a>TH1 setParameter Command |
| 631 | +<a id="setParameter"></a>TH1 setParameter Command |
| 599 | 632 | --------------------------------------------------- |
| 600 | 633 | |
| 601 | 634 | * setParameter NAME VALUE |
| 602 | 635 | |
| 603 | 636 | Sets the value of the specified query parameter. |
| 604 | 637 | |
| 605 | | -<a name="setting"></a>TH1 setting Command |
| 638 | +<a id="setting"></a>TH1 setting Command |
| 606 | 639 | ----------------------------------------- |
| 607 | 640 | |
| 608 | 641 | * setting name |
| 609 | 642 | |
| 610 | 643 | Gets and returns the value of the specified setting. |
| 611 | 644 | |
| 612 | | -<a name="stime"></a>TH1 stime Command |
| 645 | +<a id="stime"></a>TH1 stime Command |
| 613 | 646 | ------------------------------------- |
| 614 | 647 | |
| 615 | 648 | * stime |
| 616 | 649 | |
| 617 | 650 | Returns the number of microseconds of CPU time consumed by the current |
| 618 | 651 | process in system space. |
| 619 | 652 | |
| 620 | | -<a name="styleHeader"></a>TH1 styleHeader Command |
| 653 | +<a id="styleHeader"></a>TH1 styleHeader Command |
| 621 | 654 | ------------------------------------------------- |
| 622 | 655 | |
| 623 | 656 | * styleHeader TITLE |
| 624 | 657 | |
| 625 | 658 | Render the configured style header for the selected skin. |
| 626 | 659 | |
| 627 | | -<a name="styleFooter"></a>TH1 styleFooter Command |
| 660 | +<a id="styleFooter"></a>TH1 styleFooter Command |
| 628 | 661 | ------------------------------------------------- |
| 629 | 662 | |
| 630 | 663 | * styleFooter |
| 631 | 664 | |
| 632 | 665 | Render the configured style footer for the selected skin. |
| 633 | 666 | |
| 634 | | -<a name="styleScript"></a>TH1 styleScript Command |
| 667 | +<a id="styleScript"></a>TH1 styleScript Command |
| 635 | 668 | ------------------------------------------------- |
| 636 | 669 | |
| 637 | 670 | * styleScript |
| 638 | 671 | |
| 639 | 672 | Render the configured JavaScript for the selected skin. |
| 640 | 673 | |
| 641 | | -<a name="tclEval"></a>TH1 tclEval Command |
| 674 | +<a id="tclEval"></a>TH1 tclEval Command |
| 642 | 675 | ----------------------------------------- |
| 643 | 676 | |
| 644 | 677 | **This command requires the Tcl integration feature.** |
| 645 | 678 | |
| 646 | 679 | * tclEval arg ?arg ...? |
| | @@ -647,11 +680,11 @@ |
| 647 | 680 | |
| 648 | 681 | Evaluates the Tcl script and returns its result verbatim. If a Tcl script |
| 649 | 682 | error is generated, it will be transformed into a TH1 script error. The |
| 650 | 683 | Tcl interpreter will be created automatically if it has not been already. |
| 651 | 684 | |
| 652 | | -<a name="tclExpr"></a>TH1 tclExpr Command |
| 685 | +<a id="tclExpr"></a>TH1 tclExpr Command |
| 653 | 686 | ----------------------------------------- |
| 654 | 687 | |
| 655 | 688 | **This command requires the Tcl integration feature.** |
| 656 | 689 | |
| 657 | 690 | * tclExpr arg ?arg ...? |
| | @@ -659,11 +692,11 @@ |
| 659 | 692 | Evaluates the Tcl expression and returns its result verbatim. If a Tcl |
| 660 | 693 | script error is generated, it will be transformed into a TH1 script |
| 661 | 694 | error. The Tcl interpreter will be created automatically if it has not |
| 662 | 695 | been already. |
| 663 | 696 | |
| 664 | | -<a name="tclInvoke"></a>TH1 tclInvoke Command |
| 697 | +<a id="tclInvoke"></a>TH1 tclInvoke Command |
| 665 | 698 | --------------------------------------------- |
| 666 | 699 | |
| 667 | 700 | **This command requires the Tcl integration feature.** |
| 668 | 701 | |
| 669 | 702 | * tclInvoke command ?arg ...? |
| | @@ -670,21 +703,21 @@ |
| 670 | 703 | |
| 671 | 704 | Invokes the Tcl command using the supplied arguments. No additional |
| 672 | 705 | substitutions are performed on the arguments. The Tcl interpreter |
| 673 | 706 | will be created automatically if it has not been already. |
| 674 | 707 | |
| 675 | | -<a name="tclIsSafe"></a>TH1 tclIsSafe Command |
| 708 | +<a id="tclIsSafe"></a>TH1 tclIsSafe Command |
| 676 | 709 | --------------------------------------------- |
| 677 | 710 | |
| 678 | 711 | **This command requires the Tcl integration feature.** |
| 679 | 712 | |
| 680 | 713 | * tclIsSafe |
| 681 | 714 | |
| 682 | 715 | Returns non-zero if the Tcl interpreter is "safe". The Tcl interpreter |
| 683 | 716 | will be created automatically if it has not been already. |
| 684 | 717 | |
| 685 | | -<a name="tclMakeSafe"></a>TH1 tclMakeSafe Command |
| 718 | +<a id="tclMakeSafe"></a>TH1 tclMakeSafe Command |
| 686 | 719 | ------------------------------------------------- |
| 687 | 720 | |
| 688 | 721 | **This command requires the Tcl integration feature.** |
| 689 | 722 | |
| 690 | 723 | * tclMakeSafe |
| | @@ -692,51 +725,51 @@ |
| 692 | 725 | Forces the Tcl interpreter into "safe" mode by removing all "unsafe" |
| 693 | 726 | commands and variables. This operation cannot be undone. The Tcl |
| 694 | 727 | interpreter will remain "safe" until the process terminates. The Tcl |
| 695 | 728 | interpreter will be created automatically if it has not been already. |
| 696 | 729 | |
| 697 | | -<a name="tclReady"></a>TH1 tclReady Command |
| 730 | +<a id="tclReady"></a>TH1 tclReady Command |
| 698 | 731 | ------------------------------------------- |
| 699 | 732 | |
| 700 | 733 | * tclReady |
| 701 | 734 | |
| 702 | 735 | Returns true if the binary has the Tcl integration feature enabled and it |
| 703 | 736 | is currently available for use by TH1 scripts. |
| 704 | 737 | |
| 705 | | -<a name="trace"></a>TH1 trace Command |
| 738 | +<a id="trace"></a>TH1 trace Command |
| 706 | 739 | ------------------------------------- |
| 707 | 740 | |
| 708 | 741 | * trace STRING |
| 709 | 742 | |
| 710 | 743 | Generates a TH1 trace message if TH1 tracing is enabled. |
| 711 | 744 | |
| 712 | | -<a name="unversioned_content"></a>TH1 unversioned content Command |
| 745 | +<a id="unversioned_content"></a>TH1 unversioned content Command |
| 713 | 746 | ----------------------------------------------------------------- |
| 714 | 747 | |
| 715 | 748 | * unversioned content FILENAME |
| 716 | 749 | |
| 717 | 750 | Attempts to locate the specified unversioned file and return its contents. |
| 718 | 751 | An error is generated if the repository is not open or the unversioned file |
| 719 | 752 | cannot be found. |
| 720 | 753 | |
| 721 | | -<a name="unversioned_list"></a>TH1 unversioned list Command |
| 754 | +<a id="unversioned_list"></a>TH1 unversioned list Command |
| 722 | 755 | ----------------------------------------------------------- |
| 723 | 756 | |
| 724 | 757 | * unversioned list |
| 725 | 758 | |
| 726 | 759 | Returns a list of the names of all unversioned files held in the local |
| 727 | 760 | repository. An error is generated if the repository is not open. |
| 728 | 761 | |
| 729 | | -<a name="utime"></a>TH1 utime Command |
| 762 | +<a id="utime"></a>TH1 utime Command |
| 730 | 763 | ------------------------------------- |
| 731 | 764 | |
| 732 | 765 | * utime |
| 733 | 766 | |
| 734 | 767 | Returns the number of microseconds of CPU time consumed by the current |
| 735 | 768 | process in user space. |
| 736 | 769 | |
| 737 | | -<a name="verifyCsrf"></a>TH1 verifyCsrf Command |
| 770 | +<a id="verifyCsrf"></a>TH1 verifyCsrf Command |
| 738 | 771 | ----------------------------------------------- |
| 739 | 772 | |
| 740 | 773 | * verifyCsrf |
| 741 | 774 | |
| 742 | 775 | Before using the results of a form, first call this command to verify |
| | @@ -743,19 +776,19 @@ |
| 743 | 776 | that this Anti-CSRF token is present and is valid. If the Anti-CSRF token |
| 744 | 777 | is missing or is incorrect, that indicates a cross-site scripting attack. |
| 745 | 778 | If the event of an attack is detected, an error message is generated and |
| 746 | 779 | all further processing is aborted. |
| 747 | 780 | |
| 748 | | -<a name="verifyLogin"></a>TH1 verifyLogin Command |
| 781 | +<a id="verifyLogin"></a>TH1 verifyLogin Command |
| 749 | 782 | ------------------------------------------------- |
| 750 | 783 | |
| 751 | 784 | * verifyLogin |
| 752 | 785 | |
| 753 | 786 | Returns non-zero if the specified user name and password represent a |
| 754 | 787 | valid login for the repository. |
| 755 | 788 | |
| 756 | | -<a name="wiki"></a>TH1 wiki Command |
| 789 | +<a id="wiki"></a>TH1 wiki Command |
| 757 | 790 | ----------------------------------- |
| 758 | 791 | |
| 759 | 792 | * wiki STRING |
| 760 | 793 | |
| 761 | 794 | Renders STRING as wiki content. |
| | @@ -769,24 +802,24 @@ |
| 769 | 802 | Tcl commands: |
| 770 | 803 | |
| 771 | 804 | * th1Eval |
| 772 | 805 | * th1Expr |
| 773 | 806 | |
| 774 | | -<a name="th1Eval"></a>Tcl th1Eval Command |
| 807 | +<a id="th1Eval"></a>Tcl th1Eval Command |
| 775 | 808 | ----------------------------------------- |
| 776 | 809 | |
| 777 | 810 | **This command requires the Tcl integration feature.** |
| 778 | 811 | |
| 779 | 812 | * th1Eval arg |
| 780 | 813 | |
| 781 | 814 | Evaluates the TH1 script and returns its result verbatim. If a TH1 script |
| 782 | 815 | error is generated, it will be transformed into a Tcl script error. |
| 783 | 816 | |
| 784 | | -<a name="th1Expr"></a>Tcl th1Expr Command |
| 817 | +<a id="th1Expr"></a>Tcl th1Expr Command |
| 785 | 818 | ----------------------------------------- |
| 786 | 819 | |
| 787 | 820 | **This command requires the Tcl integration feature.** |
| 788 | 821 | |
| 789 | 822 | * th1Expr arg |
| 790 | 823 | |
| 791 | 824 | Evaluates the TH1 expression and returns its result verbatim. If a TH1 |
| 792 | 825 | script error is generated, it will be transformed into a Tcl script error. |
| 793 | 826 | |