diff --git a/adminhome.php b/adminhome.php index 17fef78d0..41d9407dc 100644 --- a/adminhome.php +++ b/adminhome.php @@ -156,12 +156,10 @@ '; for ( $i = 0, $cnt = count( $names ); $i < $cnt; $i++ ) { - $empLink = empty( $links[$i] ); - echo ( $i % COLUMNS == 0 ? ' + echo ( $i % COLUMNS === 0 ? ' ' : '' ) . ' - ' - . ( $i % COLUMNS == COLUMNS - 1 ? ' + ' . + ( $i % COLUMNS === COLUMNS - 1 ? ' ' : '' ); } diff --git a/autocomplete_ajax.php b/autocomplete_ajax.php index f05088188..b71da1c49 100644 --- a/autocomplete_ajax.php +++ b/autocomplete_ajax.php @@ -49,13 +49,10 @@ if (empty($query)) $query = getValue('query'); -$sendPlainText = false; $format = getValue('format'); -if ( - !empty($format) && - ($format == 'text' || $format == 'plain') -); -$sendPlainText = true; +$sendPlainText = (! empty ( $format ) && + ( $format === 'text' || $format === 'plain' ) ); + if ($sendPlainText) { Header('Content-Type: text/plain'); } else { diff --git a/category_handler.php b/category_handler.php index 9ca8bc728..6a7c16e53 100644 --- a/category_handler.php +++ b/category_handler.php @@ -68,10 +68,10 @@ function updateIconBlob($catId, $iconData, $iconMimeType) { $error = db_error(); } - if (!dbi_execute(" - DELETE FROM `webcal_entry_categories` - WHERE `cat_id` = ? AND ( `cat_owner` = ?" - . ($is_admin ? " OR `cat_owner` = '' )" : " )"), + if (!dbi_execute( + 'DELETE FROM webcal_entry_categories + WHERE cat_id = ? AND ( cat_owner = ?' + . ($is_admin ? ' OR cat_owner = "" )' : ' )'), [$id, $login] )) { $error = db_error(); diff --git a/edit_entry.php b/edit_entry.php index 8677ac6b5..2552c2746 100644 --- a/edit_entry.php +++ b/edit_entry.php @@ -1093,8 +1093,6 @@ function time_selection($prefix, $time = '', $trigger = false) ? $selected : '') . '>' . translate('Weekly') . ''; } echo ' diff --git a/events_ajax.php b/events_ajax.php index 45752b25b..7104b272a 100644 --- a/events_ajax.php +++ b/events_ajax.php @@ -63,11 +63,10 @@ $user = $login; $get_unapproved = true; -$sendPlainText = false; $format = getValue ( 'format' ); -if ( ! empty ( $format ) && + +$sendPlainText = ( ! empty ( $format ) && ( $format == 'text' || $format == 'plain' ) ); -$sendPlainText = true; $startdate = getIntValue ( 'startdate' ); if ( empty ( $startdate ) ) diff --git a/export.php b/export.php index 62be94c89..3f6afe04d 100644 --- a/export.php +++ b/export.php @@ -31,7 +31,7 @@ - '; @@ -126,7 +126,7 @@ function toggle_datefields( name, ele ) { updateDateFields(); } - function toggel_catfilter() { + function toggle_catfilter() { if ( $('#exformat option:selected').index() == 0 ) { // ICalendar $('#catfilter').show(); diff --git a/groups.php b/groups.php index f02bdf6d0..850074682 100644 --- a/groups.php +++ b/groups.php @@ -76,13 +76,13 @@ -
' . ( $empLink ? '' : '' ) - . $names[$i] . ( $empLink ? '' : '' ) . ''. $names[$i] . '
' . generate_export_select ( 'toggel_catfilter' ) . ' + ' . generate_export_select ( 'toggle_catfilter' ) . '

@@ -85,43 +85,43 @@