Last modified by Hal Eden on 2010/08/22 20:09

From version Icon 7.1
edited by Hal Eden
on 2010/08/22 20:09
Change comment: There is no comment for this version
To version Icon 6.1 Icon
edited by superadmin
on 2026/12/02 00:14
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.haleden
1 +XWiki.superadmin
Content
... ... @@ -102,12 +102,7 @@
102 102   * @param title The resulting title.
103 103   *###
104 104  #macro(getBlogTitle $blogDoc $title)
105 - ## The blog title is the rendered document title. It is displayed as data (never evaluated as
106 - ## Velocity), so an unprivileged user storing script in Blog.BlogClass.title cannot run it. See
107 - ## Blog.BlogSheet, which renders the title literally and falls back to the blog.code.title
108 - ## translation when the stored title is empty.
109 - #set ($title = $NULL)
110 - #setVariable ("$title" $!blogDoc.displayTitle)
105 + #getBlogProperty($blogDoc 'title' $!blogDoc.displayTitle $title)
111 111  #end
112 112  ##
113 113  ##
... ... @@ -120,9 +120,7 @@
120 120   * @param description The resulting description.
121 121   *###
122 122  #macro(getBlogDescription $blogDoc $description)
123 - #getBlogProperty($blogDoc 'description' '' $result)
124 - #set ($description = $NULL)
125 - #setVariable ("$description" $result)
118 + #getBlogProperty($blogDoc 'description' '' $description)
126 126  #end
127 127  ##
128 128  ##
... ... @@ -348,9 +348,7 @@
348 348   * @param displayType The resulting string. If the blog object does not define anything, it is considered paginated.
349 349   *###
350 350  #macro(getBlogDisplayType $blogDoc $displayType)
351 - #getBlogProperty($blogDoc 'displayType' 'paginated' $result)
352 - #set ($displayType = $NULL)
353 - #setVariable ("$displayType" $result)
344 + #getBlogProperty($blogDoc 'displayType' 'paginated' $displayType)
354 354  #end
355 355  ##
356 356  ##
... ... @@ -845,12 +845,10 @@
845 845   * @param propertyValue The resulting value.
846 846   *###
847 847  #macro(getBlogProperty $blogDoc $propertyName $defaultValue $propertyValue)
848 - #set($result = "$!{blogDoc.getObject(${blogClassname}).getProperty($propertyName).value}")
849 - #if($result == '')
850 - #set($result = $defaultValue)
839 + #set($propertyValue = "$!{blogDoc.getObject(${blogClassname}).getProperty($propertyName).value}")
840 + #if($propertyValue == '')
841 + #set($propertyValue = $defaultValue)
851 851   #end
852 - #set ($propertyValue = $NULL)
853 - #setVariable ("$propertyValue" $result)
854 854  #end
855 855  
856 856  ## Compatibility helpers from the installed Blog 9.15.15 package.