Changes for page Per Status
From version 86.8
edited by Andrea Omicini
on 22/06/2023 12:42
on 22/06/2023 12:42
Change comment:
There is no comment for this version
To version 86.6
edited by Andrea Omicini
on 22/06/2023 12:15
on 22/06/2023 12:15
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -107,17 +107,16 @@ 107 107 #set( $itemNo = 0 ) 108 108 ## cycle over sorts 109 109 #foreach( $status in $statusList ) 110 - #set( $ query= ", BaseObject as obj,#if( $oneUser )LargeStringProperty as propAuthor, LargeStringProperty as propEditor,#endStringProperty as propStatus #if( !$hasEdit ), StringProperty as propAccess#end111 - where obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${object Pool}.${objectTemplate}'#if( $oneUser)and propAuthor.id.id = obj.id and propEditor.id.id = obj.id and propAuthor.name = 'author' and propEditor.name = 'editor' and ( propAuthor.value like '$userString' or ( propAuthor.value = '' and propEditor.value like '$userString' ) )#endand propStatus.id.id = obj.id and propStatus.name = 'status' and propStatus.value = '$status'#if( !$hasEdit ) and propAccess.id.id = obj.id and propAccess.name = 'access' and propAccess.value <> 'hidden'112 - #set( $ itemFound= $xwiki.searchDocuments($query))113 - ##setcounters114 - #set( $ itemStatusNo = $itemFound.size() )115 - #if( $ itemStatusNo > 0 )116 - #set( $ itemMap[$status] = $itemFound )117 - #set( $ itemNo = $itemNo + $itemStatusNo )110 + #set( $from = ", BaseObject as obj, LargeStringProperty as prop0, LargeStringProperty as prop1, StringProperty as prop2, StringProperty as prop3" ) 111 + #set( $where = "obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectSpace}.${objectTemplate}' and prop0.id.id = obj.id and prop1.id.id = obj.id and prop2.id.id = obj.id and prop3.id.id = obj.id and prop0.name = 'author' and prop1.name = 'editor' and ( prop0.value like '$userString' or ( prop0.value = '' and prop1.value like '$userString' ) ) and prop2.name = 'status' and prop2.value = '$status' and prop3.name = 'access'#if( !$hasEdit ) and prop3.value <> 'hidden'#end" ) 112 + #set( $sql = $from + " where " + $where ) 113 + #set( $pubFound = $xwiki.searchDocuments($sql) ) 114 + #set( $pubStatusNo = $pubFound.size() ) 115 + #if( $pubStatusNo > 0 ) 116 + #set( $pubMap[$status] = $pubFound ) 117 + #set( $pubNo = $pubNo + $pubStatusNo ) 118 118 #end 119 119 #end 120 -## 121 121 ## output results 122 122 ## page subtitle 123 123 {{id name="top"/}}