RT Ticket #146: var tag docs bugs #16

Open
phinjensen opened this Issue Mar 25, 2013 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

phinjensen commented Mar 25, 2013

Created: Tue Dec 18 12:57:37 2007
Owner: Stefan Hornburg
Requestors: Kevin Walsh


The [var] tag example reads as follows:


Note that the following two lines are identical in effect:

[image src="[var IMAGE_DIR]/items/[cgi item_id]" border=0
extra="id='item_img'"]

[image src="/items/[cgi item_id]" border=0 extra="id='item_img'"]

The example is incorrect for the following reasons:

  1. If the [image src] starts with a "/" then its value will be used
    verbatim (i.e. no directory will be prepended).
  2. The [image] tag doesn't use IMAGE_DIR anyway. If the src didn't
    start with a "/" then the [image] tag would use the value of ImageDir,
    ImageDirSecure or UI_IMAGE_DIR, as appropriate. The value used might
    turn out to be the same as the IMAGE_DIR variable, but that would be up
    to the administrator to decide upon.

Second issue: The description reads as follows:


Direct access to variables (using the syntax) is faster

Using what syntax? Perhaps that could be expanded upon.

Third issue:

The [var] tag is not a container, so the "interpolate" parameter's
value is irrelevant. That parameter can therefore be dropped from
the list.

Fourth issue:

The version range listed in the AVAILABILITY section is incorrect.

Contributor

phinjensen commented Mar 25, 2013

Date: Sun Dec 23 15:09:03 2007
Author: Stefan Hornburg


On Tue Dec 18 06:57:37 2007, kevin wrote:

The [var] tag example reads as follows:


Note that the following two lines are identical in effect:

[image src="[var IMAGE_DIR]/items/[cgi item_id]" border=0
extra="id='item_img'"]

[image src="/items/[cgi item_id]" border=0 extra="id='item_img'"]

The example is incorrect for the following reasons:

  1. If the [image src] starts with a "/" then its value will be used
    verbatim (i.e. no directory will be prepended).
  2. The [image] tag doesn't use IMAGE_DIR anyway. If the src didn't
    start with a "/" then the [image] tag would use the value of ImageDir,
    ImageDirSecure or UI_IMAGE_DIR, as appropriate. The value used might
    turn out to be the same as the IMAGE_DIR variable, but that would be up
    to the administrator to decide upon.

Second issue: The description reads as follows:


Direct access to variables (using the syntax) is faster

Using what syntax? Perhaps that could be expanded upon.

Right, both issues are only present in the "online" version.
This seems to interpolate variables in the wrong place.

Regards
Racke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment