| @@ 185-190 (lines=6) @@ | ||
| 182 | if ($local->save()) { |
|
| 183 | $id = $local['id']; |
|
| 184 | $ok = true; |
|
| 185 | if (isset($_POST['managers'])) { |
|
| 186 | $ok = $ok && setFolderProfiles($id, 0, $_POST['managers']); |
|
| 187 | } |
|
| 188 | else { |
|
| 189 | $ok = $ok && setFolderProfiles($id, 0, array()); |
|
| 190 | } |
|
| 191 | if (isset($_POST['uploaders'])) { |
|
| 192 | $ok = $ok && setFolderProfiles($id, 1, $_POST['uploaders']); |
|
| 193 | } |
|
| @@ 191-196 (lines=6) @@ | ||
| 188 | else { |
|
| 189 | $ok = $ok && setFolderProfiles($id, 0, array()); |
|
| 190 | } |
|
| 191 | if (isset($_POST['uploaders'])) { |
|
| 192 | $ok = $ok && setFolderProfiles($id, 1, $_POST['uploaders']); |
|
| 193 | } |
|
| 194 | else { |
|
| 195 | $ok = $ok && setFolderProfiles($id, 1, array()); |
|
| 196 | } |
|
| 197 | if (isset($_POST['restricted'])) { |
|
| 198 | $ok = $ok && setFolderProfiles($id, 2, $_POST['restricted']); |
|
| 199 | } |
|
| @@ 197-202 (lines=6) @@ | ||
| 194 | else { |
|
| 195 | $ok = $ok && setFolderProfiles($id, 1, array()); |
|
| 196 | } |
|
| 197 | if (isset($_POST['restricted'])) { |
|
| 198 | $ok = $ok && setFolderProfiles($id, 2, $_POST['restricted']); |
|
| 199 | } |
|
| 200 | else { |
|
| 201 | $ok = $ok && setFolderProfiles($id, 2, array()); |
|
| 202 | } |
|
| 203 | if ($ok) { |
|
| 204 | $app->flash('save_ok', 'ok'); |
|
| 205 | ORM::get_db()->commit(); |
|