@@ 112-119 (lines=8) @@ | ||
109 | $part_id = R::store($part); |
|
110 | ||
111 | //add the badge to the project |
|
112 | foreach ($data['badges'] as $badge_id) { |
|
113 | //TODO insert those badge as first hidden post |
|
114 | $pb = R::dispense("partbadge"); |
|
115 | $pb->badge = $badge_id; |
|
116 | $pb->part = $part_id; |
|
117 | $pb->inserttime = date('Y-m-d H:i:s'); |
|
118 | $tmp = R::store($pb); |
|
119 | } |
|
120 | ||
121 | //add the workspace created to the user as owner |
|
122 | $usw = R::dispense("userworkspace"); |
|
@@ 253-259 (lines=7) @@ | ||
250 | $resource_id = R::store($resource); |
|
251 | } |
|
252 | ||
253 | foreach($data['badges'] as $badge_id){ //TODO va fixato nelle api |
|
254 | $pb = R::dispense("partbadge"); |
|
255 | $pb->badge = $badge_id; |
|
256 | $pb->part = $part_id; |
|
257 | $pb->inserttime = date('Y-m-d H:i:s'); |
|
258 | $tmp = R::store($pb); |
|
259 | } |
|
260 | ||
261 | $res = ["id"=>$part_id]; |
|
262 | $headers = []; |