@@ -340,7 +340,10 @@ function indexInfo()
340340 // Get size of index
341341 // convert to bytes
342342 $ indexsize = $ val ['store_size ' ];
343- if (strpos ($ indexsize , 'gb ' )) {
343+ if (strpos ($ indexsize , 'tb ' )) {
344+ $ indexsize = str_replace ('tb ' , '' , $ indexsize );
345+ $ indexsize = $ indexsize * 1024 * 1024 * 1024 * 1024 ;
346+ } elseif (strpos ($ indexsize , 'gb ' )) {
344347 $ indexsize = str_replace ('gb ' , '' , $ indexsize );
345348 $ indexsize = $ indexsize * 1024 * 1024 * 1024 ;
346349 } elseif (strpos ($ indexsize , 'mb ' )) {
@@ -389,6 +392,8 @@ function indexInfo()
389392 if (isset ($ _SESSION ['indexinfo ' ])) {
390393 $ all_index_info = array_merge ($ _SESSION ['indexinfo ' ]['all_index_info ' ], $ all_index_info );
391394 $ completed_indices = array_merge ($ _SESSION ['indexinfo ' ]['completed_indices ' ], $ completed_indices );
395+ // remove any duplicate indices
396+ $ completed_indices = array_unique ($ completed_indices );
392397 $ latest_completed_index = (!is_null ($ latest_completed_index )) ? $ latest_completed_index : $ _SESSION ['indexinfo ' ]['latest_completed_index ' ];
393398 $ fields = array_merge ($ _SESSION ['indexinfo ' ]['fields ' ], $ fields );
394399 // remove any duplicate fields
0 commit comments