| @@ 188-194 (lines=7) @@ | ||
| 185 | $filename = parseVariables($name, $organization, $user, $profile) . $ext; |
|
| 186 | $description = parseVariables($item['display_name'], $organization, $user, $profile); |
|
| 187 | ||
| 188 | if (false === createDelivery($id, $user['id'], $item['profile_id'], $filename, $description, null, $item['id'], $documentDestination, $hash, $filesize)) { |
|
| 189 | $type = 'danger'; |
|
| 190 | $message = 'cannot register'; |
|
| 191 | } |
|
| 192 | else { |
|
| 193 | $type = 'ok'; |
|
| 194 | } |
|
| 195 | } |
|
| 196 | else { |
|
| 197 | $type = 'danger'; |
|
| @@ 263-269 (lines=7) @@ | ||
| 260 | $info = pathinfo( $filename ); |
|
| 261 | $description = str_replace ('_', ' ', $info['filename']); |
|
| 262 | ||
| 263 | if (false === createDelivery($id, $user['id'], $profileId, $_FILES['document']['name'][$loop], $description, null, null, $documentDestination, $hash, $filesize)) { |
|
| 264 | $type = 'danger'; |
|
| 265 | $message = 'cannot register'; |
|
| 266 | } |
|
| 267 | else { |
|
| 268 | $type = 'ok'; |
|
| 269 | } |
|
| 270 | } |
|
| 271 | else { |
|
| 272 | $type = 'danger'; |
|