From 952c7892f3ac7bfadf8419062e44ff1af66ecc57 Mon Sep 17 00:00:00 2001 From: Bot Date: Mon, 25 Dec 2017 23:12:52 +0100 Subject: Formatting & Docstrings --- includes/pages/admin_import.php | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'includes/pages/admin_import.php') 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', [ '' . _('File Upload') . glyph('ok-circle') . '' - . 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']; -- cgit v1.2.3-70-g09d2