Changeset 38431 for main/trunk/greenstone3/src
- Timestamp:
- 2023-11-25T19:06:30+13:00 (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Construct.java
r38338 r38431 907 907 908 908 constructor.setQueryString(querystring.toString()); 909 //logger.info("@@@@ perl querystring: " + querystring.toString()); 909 910 } 910 911 … … 1176 1177 } 1177 1178 } 1179 } else { 1180 // can also have set-metadatat-array without metatable field, like 1181 // json=[{"docid":"HASHc5bce2d6d3e5b04e470ec9","metaname":"Title","metavalue":"Tralalala","metamode":"accumulate"},{"docid":"HASHbe483fa4df4e096335d1c8","metaname":"Title","metavalue":"Lala was here","metapos":0, "metamode":"override"}] 1182 // though we use the metatable way for setting user comments meta. 1183 // The alternative way is described as example usage in perllib/cgiactions/modmetadataaction.pm 1184 // and also the way it's already coded up there, so we need to allow it here. 1185 docids[index] = docInfo.getString("docid"); 1186 String metaname = docInfo.getString("metaname"); 1187 if(!isAllowedToModifyMeta(metaname, filterFields)) { 1188 return null; 1189 } 1178 1190 } 1179 1191 } … … 1187 1199 // meaning that the setmeta operation was a valid user comment operation. 1188 1200 // In that case, we have a docid for which we need to add a user comment 1189 // set-metadata-array can take more docids, but doesn't happen for a user comment. And one comment 1190 // is added at a time, but 3 meta fields are set for each comment: username, usercomment and timestamp 1191 // hence the use of set-meta-array. 1201 // set-metadata-array can take more docids, but that doesn't happen when creating a user 1202 // comment (though it now happens when editing existing user comments). And one comment is 1203 // added at a time, but 3 meta fields are set for each comment: username, usercomment and 1204 // timestamp, hence the use of set-meta-array. 1192 1205 return docids; 1193 1206
Note:
See TracChangeset
for help on using the changeset viewer.