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

From version 1.1 Icon
edited by Administrator
on 2009/09/17 10:33
Change comment: Imported from XAR
To version Icon 5.1 Icon
edited by superadmin
on 2026/12/02 00:12
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Admin
1 +XWiki.superadmin
Content
... ... @@ -1,4 +1,4 @@
1 -{{include document="Blog.BlogParameters"/}}
1 +{{include document="Blog.BlogParameters" author="target" /}}
2 2  
3 3  {{velocity output="false"}}
4 4  ##
... ... @@ -75,7 +75,14 @@
75 75   #set($blogDoc = $xwiki.getDocument("${space}.Blog"))
76 76   #if(!$blogDoc.getObject($blogClassname))
77 77   ## Third, try searching for a blog document in the current space
78 - #set($blogDocs = $xwiki.searchDocuments(", BaseObject obj where doc.space = ? and obj.name = doc.fullName and obj.className = '$blogClassname' order by doc.name", 1, 0, [${space}]))
78 +#set ($legacyRawf3cf9e4833_1 = $services.query.hql(", BaseObject obj where doc.space = ? and obj.name = doc.fullName and obj.className = '$blogClassname' order by doc.name").setLimit(1).setOffset(0).bindValues([${space}]).execute())
79 +#set ($legacyVisiblef3cf9e4833_1 = [])
80 +#foreach ($legacyEntryf3cf9e4833_1 in $legacyRawf3cf9e4833_1)
81 + #if ($xwiki.hasAccessLevel('view', $xcontext.user, $legacyEntryf3cf9e4833_1))
82 + #set ($legacyVisibilityDiscard = $legacyVisiblef3cf9e4833_1.add($legacyEntryf3cf9e4833_1))
83 + #end
84 +#end
85 + #set($blogDocs = $legacyVisiblef3cf9e4833_1)
79 79   #if($blogDocs.size() > 0)
80 80   #set($blogDoc = $xwiki.getDocument($blogDocs.get(0)))
81 81   #else
... ... @@ -159,8 +159,15 @@
159 159   #set($defaultItemsPerPage = $util.parseInt($defaultItemsPerPage))
160 160   ## This macro is defined in the default macros.vm library. It also sets $itemsPerPage and $startAt.
161 161   #preparePagedViewParams($totalEntries $defaultItemsPerPage)
162 - #set($entries = $xwiki.searchDocuments("${query} order by publishDate.value desc", $itemsPerPage, $startAt))
169 +#set ($legacyRawf3cf9e4833_2 = $services.query.hql("${query} order by publishDate.value desc").setLimit($itemsPerPage).setOffset($startAt).execute())
170 +#set ($legacyVisiblef3cf9e4833_2 = [])
171 +#foreach ($legacyEntryf3cf9e4833_2 in $legacyRawf3cf9e4833_2)
172 + #if ($xwiki.hasAccessLevel('view', $xcontext.user, $legacyEntryf3cf9e4833_2))
173 + #set ($legacyVisibilityDiscard = $legacyVisiblef3cf9e4833_2.add($legacyEntryf3cf9e4833_2))
174 + #end
163 163  #end
176 + #set($entries = $legacyVisiblef3cf9e4833_2)
177 +#end
164 164  ##
165 165  ##
166 166  ##
... ... @@ -181,8 +181,15 @@
181 181   #set($maxDay = $dateFormatter.print($weekDate.toMutableDateTime().weekOfWeekyear().roundCeiling()))
182 182   #set($query = "${query} and publishDate.value >= '$minDay' and publishDate.value < '$maxDay'")
183 183   #set($totalEntries = $xwiki.countDocuments(${query}))
184 - #set($entries = $xwiki.searchDocuments("${query} order by publishDate.value desc"))
198 +#set ($legacyRawf3cf9e4833_3 = $services.query.hql("${query} order by publishDate.value desc").execute())
199 +#set ($legacyVisiblef3cf9e4833_3 = [])
200 +#foreach ($legacyEntryf3cf9e4833_3 in $legacyRawf3cf9e4833_3)
201 + #if ($xwiki.hasAccessLevel('view', $xcontext.user, $legacyEntryf3cf9e4833_3))
202 + #set ($legacyVisibilityDiscard = $legacyVisiblef3cf9e4833_3.add($legacyEntryf3cf9e4833_3))
203 + #end
185 185  #end
205 + #set($entries = $legacyVisiblef3cf9e4833_3)
206 +#end
186 186  ##
187 187  ##
188 188  ##
... ... @@ -203,8 +203,15 @@
203 203   #set($maxDay = $dateFormatter.print($monthDate.toMutableDateTime().monthOfYear().roundCeiling()))
204 204   #set($query = "${query} and publishDate.value >= '$minDay' and publishDate.value < '$maxDay'")
205 205   #set($totalEntries = $xwiki.countDocuments(${query}))
206 - #set($entries = $xwiki.searchDocuments("${query} order by publishDate.value desc"))
227 +#set ($legacyRawf3cf9e4833_4 = $services.query.hql("${query} order by publishDate.value desc").execute())
228 +#set ($legacyVisiblef3cf9e4833_4 = [])
229 +#foreach ($legacyEntryf3cf9e4833_4 in $legacyRawf3cf9e4833_4)
230 + #if ($xwiki.hasAccessLevel('view', $xcontext.user, $legacyEntryf3cf9e4833_4))
231 + #set ($legacyVisibilityDiscard = $legacyVisiblef3cf9e4833_4.add($legacyEntryf3cf9e4833_4))
232 + #end
207 207  #end
234 + #set($entries = $legacyVisiblef3cf9e4833_4)
235 +#end
208 208  ##
209 209  ##
210 210  ##
... ... @@ -218,8 +218,15 @@
218 218   *###
219 219  #macro(getAllBlogEntries $blogDoc $query $entries)
220 220   #set($totalEntries = $xwiki.countDocuments(${query}))
221 - #set($entries = $xwiki.searchDocuments("${query} order by publishDate.value desc"))
249 +#set ($legacyRawf3cf9e4833_5 = $services.query.hql("${query} order by publishDate.value desc").execute())
250 +#set ($legacyVisiblef3cf9e4833_5 = [])
251 +#foreach ($legacyEntryf3cf9e4833_5 in $legacyRawf3cf9e4833_5)
252 + #if ($xwiki.hasAccessLevel('view', $xcontext.user, $legacyEntryf3cf9e4833_5))
253 + #set ($legacyVisibilityDiscard = $legacyVisiblef3cf9e4833_5.add($legacyEntryf3cf9e4833_5))
254 + #end
222 222  #end
256 + #set($entries = $legacyVisiblef3cf9e4833_5)
257 +#end
223 223  ##
224 224  ##
225 225  ##
... ... @@ -234,8 +234,15 @@
234 234  #macro(getUnpublishedBlogEntries $blogDoc $query $entries)
235 235   #set($query = "${query} and isPublished.value = 0")
236 236   #set($totalEntries = $xwiki.countDocuments(${query}))
237 - #set($entries = $xwiki.searchDocuments("${query} order by publishDate.value desc"))
272 +#set ($legacyRawf3cf9e4833_6 = $services.query.hql("${query} order by publishDate.value desc").execute())
273 +#set ($legacyVisiblef3cf9e4833_6 = [])
274 +#foreach ($legacyEntryf3cf9e4833_6 in $legacyRawf3cf9e4833_6)
275 + #if ($xwiki.hasAccessLevel('view', $xcontext.user, $legacyEntryf3cf9e4833_6))
276 + #set ($legacyVisibilityDiscard = $legacyVisiblef3cf9e4833_6.add($legacyEntryf3cf9e4833_6))
277 + #end
238 238  #end
279 + #set($entries = $legacyVisiblef3cf9e4833_6)
280 +#end
239 239  ##
240 240  ##
241 241  ##
... ... @@ -250,8 +250,15 @@
250 250   #set($defaultItemsPerPage = 20)
251 251   ## This macro is defined in the default macros.vm library. It also sets $itemsPerPage and $startAt.
252 252   #preparePagedViewParams($totalEntries $defaultItemsPerPage)
253 - #set($entries = $xwiki.searchDocuments("${query} order by publishDate.value desc", $itemsPerPage, $startAt))
295 +#set ($legacyRawf3cf9e4833_7 = $services.query.hql("${query} order by publishDate.value desc").setLimit($itemsPerPage).setOffset($startAt).execute())
296 +#set ($legacyVisiblef3cf9e4833_7 = [])
297 +#foreach ($legacyEntryf3cf9e4833_7 in $legacyRawf3cf9e4833_7)
298 + #if ($xwiki.hasAccessLevel('view', $xcontext.user, $legacyEntryf3cf9e4833_7))
299 + #set ($legacyVisibilityDiscard = $legacyVisiblef3cf9e4833_7.add($legacyEntryf3cf9e4833_7))
300 + #end
254 254  #end
302 + #set($entries = $legacyVisiblef3cf9e4833_7)
303 +#end
255 255  ##
256 256  ##
257 257  ##
... ... @@ -572,6 +572,7 @@
572 572   * @param onlyExtract If <tt>true</tt>, try to display only a summary of the entry, instead of the full content.
573 573   *###
574 574  #macro(displayEntryContent $entryDoc $entryObj $onlyExtract)
624 + #set($entryContent = '')
575 575   <div class="#if($onlyExtract)entry-summary#{else}entry-content#end">
576 576   #getEntryContent($entryDoc $entryObj $onlyExtract $entryContent)
577 577   {{html wiki="false"}}$entryDoc.getRenderedContent($entryContent, $entryDoc.getSyntax().toIdString()){{/html}}
... ... @@ -798,3 +798,5 @@
798 798   #end
799 799  #end
800 800  {{/velocity}}
851 +
852 +\\