]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
baculum: Fix content property in sources endpoint
authorMarcin Haba <marcin.haba@bacula.pl>
Mon, 29 Jan 2024 08:33:04 +0000 (09:33 +0100)
committerMarcin Haba <marcin.haba@bacula.pl>
Wed, 7 Feb 2024 16:00:06 +0000 (17:00 +0100)
gui/baculum/protected/API/Modules/SourceManager.php

index 848ac2ce5182896a8348c93e1e62027cc7188277..8b86230856ea7a2d67287335e2f5ef4c065e8512 100644 (file)
@@ -189,6 +189,11 @@ class SourceManager extends APIModule {
                                        }
                                        $fs_count[$content]++;
                                }
+                               $cb = function($el) {
+                                       return $el['content'];
+                               };
+                               $cnts = array_map($cb, $fs_content[$fileset]);
+                               $sources[$i]['content'] = implode(',', $cnts);
                        }
                        $sources_ft[] = $sources[$i];
                }
@@ -244,8 +249,6 @@ class SourceManager extends APIModule {
                                                // limit reached
                                                break;
                                        }
-                                       $sources[$i]['content'] = $content[$j]['content'];
-
                                        $res[$content[$j]['content']]['sources'][] = $sources[$i];
                                }
                        }