| @@ 193-199 (lines=7) @@ | ||
| 190 | $filename = parseVariables($name, $organization, $user, $profile) . $ext; |
|
| 191 | $description = parseVariables($item['display_name'], $organization, $user, $profile); |
|
| 192 | ||
| 193 | if (false === createDelivery($id, $user['id'], $item['profile_id'], $filename, $description, null, $item['id'], $documentDestination, $hash, $filesize)) { |
|
| 194 | $type = 'danger'; |
|
| 195 | $message = 'cannot register'; |
|
| 196 | } |
|
| 197 | else { |
|
| 198 | $type = 'ok'; |
|
| 199 | } |
|
| 200 | } |
|
| 201 | else { |
|
| 202 | $type = 'danger'; |
|
| @@ 268-274 (lines=7) @@ | ||
| 265 | $info = pathinfo( $filename ); |
|
| 266 | $description = str_replace ('_', ' ', $info['filename']); |
|
| 267 | ||
| 268 | if (false === createDelivery($id, $user['id'], $profileId, $_FILES['document']['name'][$loop], $description, null, null, $documentDestination, $hash, $filesize)) { |
|
| 269 | $type = 'danger'; |
|
| 270 | $message = 'cannot register'; |
|
| 271 | } |
|
| 272 | else { |
|
| 273 | $type = 'ok'; |
|
| 274 | } |
|
| 275 | } |
|
| 276 | else { |
|
| 277 | $type = 'danger'; |
|