Изменения документа Blog Archive
на 2012/03/01 14:12
Комментарий
-
Свойства страницы (3 изменено, 0 добавлено, 0 удалено)
Подробности
- Свойства страницы
-
- Автор документа
-
... ... @@ -1,1 +1,1 @@ 1 -xwiki:XWiki. ThomasMortagne1 +xwiki:XWiki.Admin - Скрытые
-
... ... @@ -1,1 +1,1 @@ 1 - false1 +true - Содержимое
-
... ... @@ -20,13 +20,13 @@ 20 20 #set($discard = $xwiki.getDocument($firstEntry)) 21 21 #getEntryObject($discard $entryObj) 22 22 #getEntryDate($discard $entryObj $firstYear) 23 - #set($firstYear = $ util.parseInt($xwiki.formatDate($firstYear, 'yyyy')))23 + #set($firstYear = $mathtool.toInteger($xwiki.formatDate($firstYear, 'yyyy'))) 24 24 #end 25 25 #foreach($lastEntry in $xwiki.searchDocuments("${query} order by year(publishDate.value) desc", 1, 0, $queryParams)) 26 26 #set($discard = $xwiki.getDocument($lastEntry)) 27 27 #getEntryObject($discard $entryObj) 28 28 #getEntryDate($discard $entryObj $lastYear) 29 - #set($lastYear = $ util.parseInt($xwiki.formatDate($lastYear, 'yyyy')))29 + #set($lastYear = $mathtool.toInteger($xwiki.formatDate($lastYear, 'yyyy'))) 30 30 #end 31 31 #if("$!{firstYear}" != '') ## At least one entry exists 32 32 #foreach($year in [$firstYear..$lastYear]) ... ... @@ -84,8 +84,8 @@ 84 84 #macro(displayBlogMonthArchive $blogDoc $year $month) 85 85 #set($dateFormatter = $xwiki.jodatime.getDateTimeFormatterForPattern('MMMM yyyy')) 86 86 #set($tempDate = $xwiki.jodatime.mutableDateTime) 87 - $tempDate.setYear($ util.parseInt($year))##88 - $tempDate.setMonthOfYear($ util.parseInt($month))##87 + $tempDate.setYear($mathtool.toInteger($year))## 88 + $tempDate.setMonthOfYear($mathtool.toInteger($month))## 89 89 = $msg.get('xe.blog.archive.postsfor') $dateFormatter.print($tempDate) = 90 90 #getBlogEntriesBaseQuery($query) 91 91 #set($query = "${query} and (doc.space = ? or doc.parent = ?)") ... ... @@ -109,13 +109,13 @@ 109 109 #set($space = 'Blog') 110 110 #end 111 111 #getBlogDocument($space $blogDoc) 112 -#set ($month = "$!{ util.parseInt($request.month)}")113 -#set ($year = "$!{ util.parseInt($request.year)}")114 -#if ($year == ' 0')112 +#set ($month = "$!{mathtool.toInteger($request.month)}") 113 +#set ($year = "$!{mathtool.toInteger($request.year)}") 114 +#if ($year == '') 115 115 ## Show a brief history of the blog, a tree with first level = years, second level = months, and the number of entries from that year/month in every node. 116 116 #displayBlogFullArchive($blogDoc) 117 117 #else 118 - #if ($month == ' 0')118 + #if ($month == '') 119 119 ## Show an index of all posts in this year (titles only), with month names as subtitles 120 120 #displayBlogYearArchive($blogDoc $year) 121 121 #else