Changeset 38924 for main/trunk/greenstone2/runtime-src
- Timestamp:
- 2024-04-11T12:44:19+12:00 (3 weeks ago)
- Location:
- main/trunk/greenstone2/runtime-src/src/recpt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/recpt/browsetoolsclass.cpp
r28912 r38924 105 105 text_t browsetoolsclass::get_cover_image() 106 106 { 107 return "_httpprefix_/collect/[collection]/index/assoc/{Or}{[parent(Top):assocfilepath],[assocfilepath] }/cover.jpg";107 return "_httpprefix_/collect/[collection]/index/assoc/{Or}{[parent(Top):assocfilepath],[assocfilepath],[parent(Top):archivedir],[archivedir]}/cover.jpg"; 108 108 } 109 109 110 110 text_t browsetoolsclass::get_assocfile_path() 111 111 { 112 return "_httpprefix_/collect/[collection]/index/assoc/{Or}{[parent(Top):assocfilepath],[assocfilepath] }/";112 return "_httpprefix_/collect/[collection]/index/assoc/{Or}{[parent(Top):assocfilepath],[assocfilepath],[parent(Top):archivedir],[archivedir]}/"; 113 113 114 114 } -
main/trunk/greenstone2/runtime-src/src/recpt/documentaction.cpp
r28899 r38924 770 770 771 771 metadata.insert ("assocfilepath"); 772 772 metadata.insert("archivedir"); // backwards compatibility 773 773 comerror_t err; 774 774 OptionValue_tarray options; … … 884 884 } 885 885 886 if (is_top (arg_d)) 887 disp.setmacro ("thisOID", displayclass::defaultpackage, dm_safe(response.docInfo[0].metadata["assocfilepath"].values[0])); 888 else { 886 if (is_top (arg_d)) { 887 text_t thisOID = response.docInfo[0].metadata["assocfilepath"].values[0]; 888 if (thisOID.empty()) { 889 thisOID = response.docInfo[0].metadata["archivedir"].values[0]; 890 } 891 disp.setmacro ("thisOID", displayclass::defaultpackage, dm_safe(thisOID)); 892 } 893 else { 889 894 MetadataInfo_t *parentad = response.docInfo[0].metadata["assocfilepath"].parent; 890 895 text_t thisOID; … … 893 898 parentad = parentad->parent; 894 899 } 900 if (thisOID.empty()) { 901 // try archivedir 902 MetadataInfo_t *parentad = response.docInfo[0].metadata["archivedir"].parent; 903 while (parentad != NULL) { 904 thisOID = parentad->values[0]; 905 parentad = parentad->parent; 906 } 907 } 895 908 disp.setmacro ("thisOID", displayclass::defaultpackage, dm_safe(thisOID)); 896 909 }
Note:
See TracChangeset
for help on using the changeset viewer.