Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos #478

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

Typos #478

Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c73d7a3
spelling
bbannon Mar 25, 2024
9c07f7b
redundant test
bbannon Mar 25, 2024
34055af
another redundant test
bbannon Mar 25, 2024
9193838
tag not closed
bbannon Mar 25, 2024
f14db89
use arrays before empty them
bbannon Mar 27, 2024
dbd1836
remove translate being called twice
bbannon Apr 6, 2024
97ab90a
Merge branch 'craigk5n:master' into typos
bbannon Apr 14, 2024
2dbc1b4
close anchor properly
bbannon Apr 18, 2024
eb1b832
a little shorter
bbannon Apr 19, 2024
1e99299
Update autocomplete_ajax.php
bbannon Apr 24, 2024
1f6308d
Update events_ajax.php
bbannon Apr 24, 2024
ad082ba
Update layers_ajax.php
bbannon Apr 24, 2024
aa0e63f
spelling
bbannon May 5, 2024
4bb8a57
'label for' has to match the ID tag
bbannon May 5, 2024
a431e4b
missing dollar sign
bbannon May 9, 2024
853c8dd
change typos ' is=" ' to ' id=" '
bbannon May 11, 2024
9c7f121
missed db in FROM clause in purge.php
bbannon May 14, 2024
b376d69
Merge branch 'craigk5n:master' into typos
bbannon May 17, 2024
d9db68a
Update user_mgmt.php
bbannon May 17, 2024
acae263
Update user_mgmt.php
bbannon May 18, 2024
66efff9
Update user_mgmt.php
bbannon May 18, 2024
1d29416
Update functions.php
bbannon May 24, 2024
a8b29cd
fix spelling and syntax
bbannon Jun 2, 2024
c6463ac
been wrong for years and no one noticed
bbannon Jun 12, 2024
a7d7643
needed quotes
bbannon Jun 16, 2024
6847c70
spelling
bbannon Jun 17, 2024
a557971
spelling
bbannon Jun 18, 2024
7ed6ef3
Merge branch 'craigk5n:master' into typos
bbannon Jun 25, 2024
5af285d
missing quote
bbannon Jun 26, 2024
8b3eb0c
According to php docs, these tests are equivalent
bbannon Jun 27, 2024
57752c8
extra quote and correct spelling
bbannon Jul 12, 2024
675238c
unneeded parenthesis
bbannon Jul 12, 2024
c730f8e
Merge branch 'craigk5n:master' into typos
bbannon Jul 29, 2024
8fe44fb
Fix priority ranks in comment
bbannon Jul 30, 2024
4bef58a
(sigh) fix last priority
bbannon Jul 30, 2024
29a83bd
Merge branch 'craigk5n:master' into typos
bbannon Jul 31, 2024
266ffd7
URL for hkit.php
bbannon Aug 30, 2024
e57023f
Merge branch 'master' into typos
bbannon Aug 31, 2024
7666f73
Merge branch 'master' into typos
bbannon Aug 31, 2024
0703caf
Merge branch 'craigk5n:master' into typos
bbannon Aug 31, 2024
6cb7228
your => you
bbannon Sep 2, 2024
cc3dbb4
Merge branch 'typos' of https://github.com/bbannon/webcalendar into t…
bbannon Sep 2, 2024
af17dd2
redundant translates
bbannon Sep 2, 2024
e3b950a
Merge branch 'craigk5n:master' into typos
bbannon Sep 3, 2024
1cfce05
Delete .php-cs-fixer.php
bbannon Oct 6, 2024
524decb
spelling
bbannon Oct 12, 2024
0b9faa2
extra space causing problems
Nov 17, 2024
54d9443
If empty ($links[$i]) then $names[$i] also empty
Nov 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions autocomplete_ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions category_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
10 changes: 4 additions & 6 deletions edit_entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -1093,8 +1093,6 @@ function time_selection($prefix, $time = '', $trigger = false)
? $selected : '') . '>' . translate('Weekly') . '</option>
<option value="monthlyByDay"'
. (strcmp($rpt_type, 'monthlyByDay') == 0 ? $selected : '')
// translate ( 'Monthly' ) translate ( 'by day' ) translate ( 'by date' )
// translate ( 'by position' )
. '>' . translate('Monthly (by day)') . '</option>
<option value="monthlyByDate"'
. (strcmp($rpt_type, 'monthlyByDate') == 0 ? $selected : '')
Expand Down Expand Up @@ -1196,10 +1194,10 @@ function time_selection($prefix, $time = '', $trigger = false)
$rpt_byday_label++
) {
$rpt_byday_mod = $rpt_byday_label % 7;
$class = (is_weekend($rpt_byday_mod) ? ' class="weekend" ' : '');
echo '
<th width="50px"' . $class . '><label>'
. translate($weekday_names[$rpt_byday_mod]) . '</label></th>';
$class = ( is_weekend ( $rpt_byday_mod ) ? 'class="weekend" ' : '' );
echo "
<th $class" . 'width="50px"><label>' .
$weekday_names[$rpt_byday_mod] . '</label></th>';
}
echo '
</tr>
Expand Down
5 changes: 2 additions & 3 deletions events_ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) )
Expand Down
4 changes: 2 additions & 2 deletions export.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<tr>
<td><label for="exformat">' . translate ( 'Export format' )
. ':</label></td>
<td>' . generate_export_select ( 'toggel_catfilter' ) . '
<td>' . generate_export_select ( 'toggle_catfilter' ) . '
</td>
</tr>';

Expand Down Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@
<div class="modal-body">
<!-- Error Alert -->
<div id="edit-group-dialog-alert" class="alert alert-danger" style="display: none">
<strong><?php etranslate("Error"); ?>!</strong>&nbsp;<span id="errorMessage">A problem has been occurred while submitting your data.</span>
<strong><?php etranslate("Error"); ?>!</strong>&nbsp;<span id="errorMessage">A problem has occurred while submitting your data.</span>
<button type="button" class="close" onclick="$('.alert').hide()">&times;</button>
</div>
<form name="editGroupForm" id="editGroupForm">
<input type="hidden" name="editGroupAdd" id="editGroupAdd" value="0">
<input type="hidden" name="editGroupId" id="editGroupId" value="0">
<div class="form-inline" is="divEditName">
<div class="form-inline" id="divEditName">
<label class="col-5" for="editName"><?php etranslate('Group name') ?>: </label>
<input required type="text" class="col-7 form-control" id="editName" name="editName" placeholder="<?php echo translate('New group name') . ' (' . translate('required') . ')'; ?>">
<div id="invalid-name-error" class="invalid-feedback text-right">
Expand Down
4 changes: 2 additions & 2 deletions icalclient.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@
if ( ( empty( $_SERVER['PHP_AUTH_USER'] )
or empty( $_SERVER['PHP_AUTH_PW'] ) )
and isset( $_REQUEST['BAD_HOSTING'] )
and preg_match( '/Basic\s+(.*)$/i', $_REQUEST['BAD_HOSTING'], $matc ) )
AND preg_match ( '/Basic\s+(.*)$/i', $_REQUEST['BAD_HOSTING'], $match ) )
list( $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW'] ) =
explode( ':', base64_decode( $matc[1] ) );
explode ( ':', base64_decode ( $match[1] ) );

unset( $_ENV['REMOTE_USER'] );

Expand Down
7 changes: 3 additions & 4 deletions includes/classes/WebCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,10 +575,10 @@ function _initValidate() {
// Invalid session cookie.
$session_not_found = true;
} else {
$cooie_check = explode('|', decode_string($encoded_login));
$cookie_check = explode('|', decode_string($encoded_login));
// First time after switching to PHP8 you may have
// incompatible cookies here.
if ( empty($cooie_check[0]) || empty($cooie_check[1]))
if ( empty($cookie_check[0]) || empty($cookie_check[1]))
$session_not_found = true;
}
if ( ! $session_not_found ) {
Expand Down Expand Up @@ -784,8 +784,7 @@ function _initConnect() {
$lastname = $login_lastname;
$fullname = $login_fullname;
$is_admin = ( $login_is_admin == 'Y' );
$is_nonuser = ( ! empty ( $GLOBALS['login_is_nonuser'] )
&& $GLOBALS['login_is_nonuser'] );
$is_nonuser = ! empty ( $GLOBALS['login_is_nonuser'] );
$user_email = $login_email;
} else {
// Invalid login.
Expand Down
9 changes: 5 additions & 4 deletions includes/classes/hKit/hkit.class.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php

/*

/*
The only place I've found to get this.
https://code.google.com/archive/p/hkit/
`
hKit Library for PHP5 - a generic library for parsing Microformats
Copyright (C) 2006 Drew McLellan

Expand Down Expand Up @@ -434,4 +435,4 @@ private function dedupeSingles($s)
}


?>
?>
2 changes: 1 addition & 1 deletion includes/css/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* while its declaration is 'color: red;'.
* Each declaration has two parts: 'property' & 'value'.
*
* In the example above, there is only one declaraion ("color: red;").
* In the example above, there is only one declaration ("color: red;").
* For that declaration, the PROPERTY is "color" and the VALUE is "red".
*
* NOTE: Each property must be followed by a colon (:),
Expand Down
8 changes: 4 additions & 4 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function build_entry_label ( $event, $popupid,
* @param string $time Input time in HHMMSS format
* @param bool $round_down Should we change 1100 to 1059?
* (This will make sure a 10AM-100AM appointment just
* shows up in the 10AM slow and not in the 11AM slot
* shows up in the 10AM slot and not in the 11AM slot
* also.)
*
* @return int The time slot index.
Expand Down Expand Up @@ -1633,7 +1633,7 @@ function display_unapproved_events ( $user ) {
if ( $row && $row[0] > 0 )
$ret .= ( $MENU_ENABLED == 'N'
? '<a class="nav" href="list_unapproved.php'
. ( $user != $login ? '?user=' . $user . '"' : '' )
. ( $user != $login ? '?user=' . $user : '' )
. '">' . str_replace ( 'XXX', $row[0],
translate ( 'You have XXX unapproved entries' ) ) . "</a><br>\n"
: // Return something that won't display in bottom menu
Expand Down Expand Up @@ -4117,7 +4117,7 @@ function load_nonuser_preferences ( $nonuser ) {
}

/**
* Returns a custom header, stylesheet or tailer.
* Returns a custom header, stylesheet or trailer.
*
* The data will be loaded from the webcal_user_template table.
* If the global variable $ALLOW_EXTERNAL_HEADER is set to 'Y',
Expand Down Expand Up @@ -4632,7 +4632,7 @@ function print_color_input_html ($varname, $title, $varval = '', $id='', $tag='d
}

return '<' . $tag . ' class="form-inline">' .
(empty($title) ? '' : ('<label class="' . $class . '" for="' . $prefix . $varname . '">' . $title . '</label>')) .
(empty($title) ? '' : ('<label class="' . $class . '" for="' . $prefix . $id . '">' . $title . '</label>')) .
'<input class="form-control" style="height: 2em; width: 4em;" name="' . $prefix . $varname . '" id="' . $prefix . $id .
'" type="color" value="' . $setting . '"' . (empty($onchange) ? '' : ' onchange="' . $onchange . '()"') .
'></' . $tag . '>';
Expand Down
2 changes: 1 addition & 1 deletion includes/js/popups.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ if( typeof document.getElementsBySelector == 'undefined' ) {
return ( e.getAttribute( attrName ) == attrValue );
};
break;
case '~': // Match one of space seperated words.
case '~': // Match one of space separated words.
checkFunction = function( e ) {
return ( e.getAttribute( attrName ).match( new RegExp( '\\b'+attrValue+'\\b' ) ) );
};
Expand Down
2 changes: 1 addition & 1 deletion includes/js/v_h_scrolls.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* This function needs to be seperate for each page that has scrollers.
/* This function needs to be separate for each page that has scrollers.
function start() {
// Code each vertical scroller as follows:
// startScroll( 'id of scroller div', 'scroll content' );
Expand Down
12 changes: 6 additions & 6 deletions includes/xcal.php
Original file line number Diff line number Diff line change
Expand Up @@ -2208,23 +2208,23 @@ function parse_ical ( $cal_file, $source = 'file' ) {
$event[$substate] = $match[1];
} elseif ( preg_match ( '/^EXDATE.*:(.+)$/i', $buff, $match ) ) {
$substate = 'exdate';
// allows multiple ocurrances of EXDATE to be processed
// allows multiple occurrences of EXDATE to be processed
if ( isset ( $event[$substate] ) )
$event[$substate] .= ',' . $match[1];
else
$event[$substate] = $match[1];

} elseif ( preg_match ( '/^RDATE.*:(.+)$/i', $buff, $match ) ) {
$substate = 'rdate';
// allows multiple ocurrances of RDATE to be processed
// allows multiple occurrences of RDATE to be processed
if ( isset ( $event[$substate] ) )
$event[$substate] .= ',' . $match[1];
else
$event[$substate] = $match[1];

} elseif ( preg_match ( '/^CATEGORIES.*:(.+)$/i', $buff, $match ) ) {
$substate = 'categories';
// allows multiple ocurrances of CATEGORIES to be processed
// allows multiple occurrences of CATEGORIES to be processed
if ( isset ( $event[$substate] ) )
$event[$substate] .= ',' . $match[1];
else
Expand Down Expand Up @@ -2429,23 +2429,23 @@ function parse_hcal ( $hcal_array ) {
$event[$substate] = $value;
} elseif ( $key == 'EXDATE' ) {
$substate = 'exdate';
// allows multiple ocurrances of EXDATE to be processed
// allows multiple occurrences of EXDATE to be processed
if ( isset ( $event[$substate] ) )
$event[$substate] .= ',' . $value;
else
$event[$substate] = $value;

} elseif ( $key == 'RDATE' ) {
$substate = 'rdate';
// allows multiple ocurrances of RDATE to be processed
// allows multiple occurrences of RDATE to be processed
if ( isset ( $event[$substate] ) )
$event[$substate] .= ',' . $value;
else
$event[$substate] = $value;

} elseif ( $key == 'CATEGORIES' ) {
$substate = 'categories';
// allows multiple ocurrances of CATEGORIES to be processed
// allows multiple occurrences of CATEGORIES to be processed
if ( isset ( $event[$substate] ) )
$event[$substate] .= ',' . $value;
else
Expand Down
2 changes: 1 addition & 1 deletion install/install_adminuser.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p>
<?php
$msg = translate("Your have XXX admin accounts.");
$msg = translate("You have XXX admin accounts.");
$msg = str_replace('XXX', $adminUserCount, $msg);
$defaultAdminExists = false;
$res = dbi_execute("SELECT COUNT(*) FROM webcal_user WHERE cal_login = 'admin'", [], false, true);
Expand Down
2 changes: 1 addition & 1 deletion install/install_auth_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function write_password_in_new_settings($file, $password, $hint)
$passwordSet = !empty($settings['install_password']);

if (!$passwordSet) {
// No password set. New instsall. Set password now.
// No password set. New install. Set password now.
$password = $_POST['password'] ?? '';
$password2 = $_POST['password2'] ?? '';
if ($password != $password2) {
Expand Down
2 changes: 1 addition & 1 deletion install/install_phpsettings_handler.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
// This handler only gets called if we prompt the user to acknowledge that
// there PHP settings do not match the recommended settings.
// their PHP settings do not match the recommended settings.
$_SESSION["phpSettingsAcked"] = "1"; // User ack'd
redirectToNextAction();
?>
2 changes: 1 addition & 1 deletion install/sql/tables-mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ CREATE TABLE webcal_entry (
cal_due_date INT DEFAULT NULL,
/* Task due time */
cal_due_time INT DEFAULT NULL,
/* event priority: 1=Low, 2=Med, 3=High */
/* event priority: 1=High, 5=Med, 9=Low */
cal_priority INT DEFAULT 5,
/* 'E' = Event, 'M' = Repeating event, 'T' = Task */
cal_type CHAR(1) DEFAULT 'E',
Expand Down
6 changes: 2 additions & 4 deletions layers_ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@

$action = getValue ( 'action' );
$public = getValue ( 'public' );

$sendPlainText = false;
$format = getValue ( 'format' );
if ( ! empty ( $format ) &&

$sendPlainText = ( ! empty ( $format ) &&
( $format == 'text' || $format == 'plain' ) );
$sendPlainText = true;

$error = '';

Expand Down
2 changes: 1 addition & 1 deletion purge.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
$M_ids = get_ids ( 'SELECT DISTINCT(we.cal_id) FROM webcal_entry we,
webcal_entry_user weu, webcal_entry_repeats wer
WHERE we.cal_type = \'M\'
AND we.cal_id = wer.cal_id AND we.cal_id = wer.cal_id '
AND we.cal_id = wer.cal_id AND weu.cal_id = wer.cal_id '
. "AND cal_end IS NOT NULL AND cal_end < '$end_date' $tail",
$ALL );
$ids = array_merge ( $E_ids, $M_ids );
Expand Down
2 changes: 1 addition & 1 deletion remotecal_mgmt.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<div class="modal-body">
<!-- Error Alert -->
<div id="edit-user-dialog-alert" class="alert alert-danger" style="display: none">
<strong><?php etranslate("Error"); ?>!</strong>&nbsp;<span id="errorMessage">A problem has been occurred while submitting your data.</span>
<strong><?php etranslate("Error"); ?>!</strong>&nbsp;<span id="errorMessage">A problem has occurred while submitting your data.</span>
<button type="button" class="close" onclick="$('.alert').hide()">&times;</button>
</div>
<form class="needs-validation" novalidate name="editUserForm" id="editUserForm">
Expand Down
2 changes: 1 addition & 1 deletion resourcecal_mgmt.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<div class="modal-body">
<!-- Error Alert -->
<div id="edit-user-dialog-alert" class="alert alert-danger" style="display: none">
<strong><?php etranslate("Error"); ?>!</strong>&nbsp;<span id="errorMessage">A problem has been occurred while submitting your data.</span>
<strong><?php etranslate("Error"); ?>!</strong>&nbsp;<span id="errorMessage">A problem has occurred while submitting your data.</span>
<button type="button" class="close" onclick="$('.alert').hide()">&times;</button>
</div>
<form class="needs-validation" novalidate name="editUserForm" id="editUserForm">
Expand Down
2 changes: 1 addition & 1 deletion rss_unapproved.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
if ( access_is_enabled() ) {
if ( ! access_user_calendar ( 'approve', $user ) ) {
// not allowed
$user = login;
$user = $login;
}
} else if ( ! $is_admin && $user != $login && ! $is_assistant &&
! access_is_enabled() ) {
Expand Down
2 changes: 1 addition & 1 deletion translations/English-US.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1771,7 +1771,7 @@ recipients_failed: SMTP Error: The following recipients failed:
########################################
# Page: install/install_adminuser.php
#
Your have XXX admin accounts.: Your have XXX admin accounts.
You have XXX admin accounts.: You have XXX admin accounts.
Create Default Admin User: Create Default Admin User

########################################
Expand Down
17 changes: 6 additions & 11 deletions upcoming.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,12 @@ function print_upcoming_event ( $e, $date ) {

$popupid = 'pop' . $e->getId() . '-' . $date;

$private = $confidential = false;
// Access: P=Public, R=Private, C=Confidential
if ( $e->getAccess() == 'R' ) {
// not a public event, so we will just display "Private"
$private = true;
}
else if ( $e->getAccess() == 'C' ) {
// not a public event, so we will just display "Confidential"
$confidential = true;
}

// not a public event, just "Private"
$private = ( $e->getAccess() == 'R' );
// not a public event, just "Confidential"
$confidential = ( $e->getAccess() == 'C' );

if ( ! empty ( $SERVER_URL ) && ! $private && ! $confidential) {
echo "<div class=\"vevent\">\n";
if ( $display_link ) {
Expand All @@ -192,7 +187,7 @@ function print_upcoming_event ( $e, $date ) {
$catNum = abs(intval($e->getCategory()));
if ($catNum > 0 && !empty($categories[$catNum]['cat_icon_mime'])) {
$catIcon = "getIcon.php?cat_id=" . $catNum;
$link .= '<img src="' . $catIcon . '" alt="category icon"></a>';
$link .= '<img src="' . $catIcon . '" alt="category icon">';
}
}
echo $link;
Expand Down
Loading