diff options
Diffstat (limited to 'includes/pages/admin_import.php')
-rw-r--r-- | includes/pages/admin_import.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/includes/pages/admin_import.php b/includes/pages/admin_import.php index 4b0f35de..3688259b 100644 --- a/includes/pages/admin_import.php +++ b/includes/pages/admin_import.php @@ -34,7 +34,7 @@ function admin_import() $test_handle = @fopen($import_dir . '/tmp', 'w'); fclose($test_handle); @unlink($import_dir . '/tmp'); - } catch(Exception $e) { + } catch (Exception $e) { error(_('Webserver has no write-permission on import directory.')); } @@ -63,8 +63,9 @@ function admin_import() error(_('Please select a shift type.')); } - if ($request->has('add_minutes_start') && is_numeric(trim($request->input('add_minutes_start')))) { - $add_minutes_start = trim($request->input('add_minutes_start')); + $minutes_start = trim($request->input('add_minutes_start')); + if ($request->has('add_minutes_start') && is_numeric($minutes_start)) { + $add_minutes_start = $minutes_start; } else { $valid = false; error(_('Please enter an amount of minutes to add to a talk\'s begin.')); @@ -106,7 +107,11 @@ function admin_import() ); } else { $html .= div('well well-sm text-center', [ - _('File Upload') . mute(glyph('arrow-right')) . mute(_('Validation')) . mute(glyph('arrow-right')) . mute(_('Import')) + _('File Upload') + . mute(glyph('arrow-right')) + . mute(_('Validation')) + . mute(glyph('arrow-right')) + . mute(_('Import')) ]) . div('row', [ div('col-md-offset-3 col-md-6', [ form([ @@ -164,7 +169,10 @@ function admin_import() 'well well-sm text-center', [ '<span class="text-success">' . _('File Upload') . glyph('ok-circle') . '</span>' - . mute(glyph('arrow-right')) . _('Validation') . mute(glyph('arrow-right')) . mute(_('Import')) + . mute(glyph('arrow-right')) + . _('Validation') + . mute(glyph('arrow-right')) + . mute(_('Import')) ] ) . form( @@ -315,7 +323,7 @@ function prepare_rooms($file) // Contains all rooms from db and frab $rooms_import = []; foreach ($rooms as $room) { - if($room['from_frab']) { + if ($room['from_frab']) { $rooms_db[] = $room['Name']; } $rooms_db_all[] = $room['Name']; |