@@ -913,10 +913,6 @@ private function _viewIncrementExportAsCsv(array &$cursor) {
913913 if (null == ($ context_ext = Extension_DevblocksContext::getByViewClass (get_class ($ view ), true )))
914914 return ;
915915
916- $ global_labels = $ global_values = [];
917- CerberusContexts::getContext ($ context_ext ->id , null , $ global_labels , $ global_values , null , true );
918- $ global_types = $ global_values ['_types ' ];
919-
920916 // Append mode to the temp file
921917 if (!($ fp = fopen ($ cursor ['temp_file ' ], "a " )))
922918 return ;
@@ -927,6 +923,9 @@ private function _viewIncrementExportAsCsv(array &$cursor) {
927923 $ dicts = [];
928924
929925 if ('kata ' == $ cursor ['export_mode ' ]) {
926+ // Bulk lazy load custom fields across the dictionaries
927+ DevblocksDictionaryDelegate::bulkLazyLoad ($ dicts , 'customfields ' );
928+
930929 $ export_columns = $ this ->_getExportColumnsKataFromCursor ($ cursor );
931930
932931 // If the first page, add headings
@@ -953,6 +952,10 @@ private function _viewIncrementExportAsCsv(array &$cursor) {
953952 }
954953
955954 } else {
955+ $ global_labels = $ global_values = [];
956+ CerberusContexts::getContext ($ context_ext ->id , null , $ global_labels , $ global_values , null , true );
957+ $ global_types = $ global_values ['_types ' ];
958+
956959 // Bulk lazy load the tokens across all the dictionaries with a temporary cache
957960 foreach ($ cursor ['tokens ' ] as $ token ) {
958961 DevblocksDictionaryDelegate::bulkLazyLoad ($ dicts , $ token );
@@ -1021,10 +1024,6 @@ private function _viewIncrementExportAsJson(array &$cursor) {
10211024 if (null == ($ context_ext = Extension_DevblocksContext::getByViewClass (get_class ($ view ), true )))
10221025 return ;
10231026
1024- $ global_labels = $ global_values = [];
1025- CerberusContexts::getContext ($ context_ext ->id , null , $ global_labels , $ global_values , null , true );
1026- $ global_types = $ global_values ['_types ' ];
1027-
10281027 // Append mode to the temp file
10291028 if (!($ fp = fopen ($ cursor ['temp_file ' ], "a " )))
10301029 return ;
@@ -1035,6 +1034,9 @@ private function _viewIncrementExportAsJson(array &$cursor) {
10351034 $ dicts = [];
10361035
10371036 if ('kata ' == $ cursor ['export_mode ' ]) {
1037+ // Bulk lazy load custom fields across the dictionaries
1038+ DevblocksDictionaryDelegate::bulkLazyLoad ($ dicts , 'customfields ' );
1039+
10381040 $ export_columns = $ this ->_getExportColumnsKataFromCursor ($ cursor );
10391041
10401042 fputs ($ fp , "{ \"results \": [ \n" );
@@ -1056,6 +1058,10 @@ private function _viewIncrementExportAsJson(array &$cursor) {
10561058 fputs ($ fp , $ json );
10571059
10581060 } else {
1061+ $ global_labels = $ global_values = [];
1062+ CerberusContexts::getContext ($ context_ext ->id , null , $ global_labels , $ global_values , null , true );
1063+ $ global_types = $ global_values ['_types ' ];
1064+
10591065 // Bulk lazy load the tokens across all the dictionaries with a temporary cache
10601066 foreach ($ cursor ['tokens ' ] as $ token ) {
10611067 DevblocksDictionaryDelegate::bulkLazyLoad ($ dicts , $ token );
@@ -1134,10 +1140,6 @@ private function _viewIncrementExportAsJsonl(array &$cursor) {
11341140 if (null == ($ context_ext = Extension_DevblocksContext::getByViewClass (get_class ($ view ), true )))
11351141 return ;
11361142
1137- $ global_labels = $ global_values = [];
1138- CerberusContexts::getContext ($ context_ext ->id , null , $ global_labels , $ global_values , null , true );
1139- $ global_types = $ global_values ['_types ' ];
1140-
11411143 // Append mode to the temp file
11421144 if (!($ fp = fopen ($ cursor ['temp_file ' ], "a " )))
11431145 return ;
@@ -1148,6 +1150,9 @@ private function _viewIncrementExportAsJsonl(array &$cursor) {
11481150 $ dicts = [];
11491151
11501152 if ('kata ' == $ cursor ['export_mode ' ]) {
1153+ // Bulk lazy load custom fields across the dictionaries
1154+ DevblocksDictionaryDelegate::bulkLazyLoad ($ dicts , 'customfields ' );
1155+
11511156 $ export_columns = $ this ->_getExportColumnsKataFromCursor ($ cursor );
11521157
11531158 foreach ($ dicts as $ dict ) {
@@ -1163,6 +1168,10 @@ private function _viewIncrementExportAsJsonl(array &$cursor) {
11631168 }
11641169
11651170 } else {
1171+ $ global_labels = $ global_values = [];
1172+ CerberusContexts::getContext ($ context_ext ->id , null , $ global_labels , $ global_values , null , true );
1173+ $ global_types = $ global_values ['_types ' ];
1174+
11661175 // Bulk lazy load the tokens across all the dictionaries with a temporary cache
11671176 foreach ($ cursor ['tokens ' ] as $ token ) {
11681177 DevblocksDictionaryDelegate::bulkLazyLoad ($ dicts , $ token );
@@ -1220,6 +1229,9 @@ private function _viewIncrementExportAsXml(array &$cursor) {
12201229 $ dicts = [];
12211230
12221231 if ('kata ' == $ cursor ['export_mode ' ]) {
1232+ // Bulk lazy load custom fields across the dictionaries
1233+ DevblocksDictionaryDelegate::bulkLazyLoad ($ dicts , 'customfields ' );
1234+
12231235 $ export_columns = $ this ->_getExportColumnsKataFromCursor ($ cursor );
12241236
12251237 if (0 == $ cursor ['page ' ]) {
0 commit comments