partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit ef628f7e4a2ed0c904a53493dc29268f571fd565
parent be6660d0a1b599883308f41757457c4d2bbd1ea0
Author: Felicitus <felicitus@felicitus.org>
Date:   Tue, 24 Apr 2012 06:27:15 +0200

Transfer attachment information to the list view, preparation for issue #131

Diffstat:
Msrc/backend/de/RaumZeitLabor/PartKeepr/Part/PartManager.php | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/backend/de/RaumZeitLabor/PartKeepr/Part/PartManager.php b/src/backend/de/RaumZeitLabor/PartKeepr/Part/PartManager.php @@ -124,6 +124,12 @@ class PartManager extends AbstractManager { $result[$key]["projects"] = implode(", ", $projectNames); } + + foreach ($result as $key => $item) { + $part = Part::loadById($item["id"]); + $result[$key]["attachments"] = $part->serializeChildren($part->getAttachments()); + } + return $result; }