Skip to content

Commit

Permalink
General whitespace cleanup
Browse files Browse the repository at this point in the history
- Changed tabs to spaces
- Deleted trailing spaces
- Automatically fix code formatting in changed files
- Delete some more comments
  • Loading branch information
respencer committed Jun 14, 2024
1 parent 67f76f3 commit 9c93cb4
Show file tree
Hide file tree
Showing 113 changed files with 4,035 additions and 4,921 deletions.
16 changes: 2 additions & 14 deletions src/AddDonors.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<?php

/*******************************************************************************
*
* filename : AddDonors.php
* website : https://churchcrm.io
* copyright : Copyright 2009 Michael Wilt
*
* This script adds people who have donated but not registered as buyers to the
* buyer list so they can get statements too.
*
******************************************************************************/

//Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand Down Expand Up @@ -41,7 +29,7 @@

// Get all the people listed as donors for this fundraiser
$sSQL = "SELECT a.per_id as donorID FROM donateditem_di
LEFT JOIN person_per a ON di_donor_ID=a.per_ID
LEFT JOIN person_per a ON di_donor_ID=a.per_ID
WHERE di_FR_ID = '" . $iFundRaiserID . "' ORDER BY a.per_id";
$rsDonors = RunQuery($sSQL);

Expand All @@ -63,7 +51,7 @@

if ($donorID > 0 && mysqli_num_rows($rsBuyer) == 0) {
$sSQL = "INSERT INTO paddlenum_pn (pn_Num, pn_fr_ID, pn_per_ID)
VALUES ('$extraPaddleNum', '$iFundRaiserID', '$donorID')";
VALUES ('$extraPaddleNum', '$iFundRaiserID', '$donorID')";
RunQuery($sSQL);
$extraPaddleNum = $extraPaddleNum + 1;
}
Expand Down
14 changes: 0 additions & 14 deletions src/BackupDatabase.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<?php

/*******************************************************************************
*
* filename : BackupDatabase.php
* last change : 2016-01-04
* description : Creates a backup file of the database.
*
* https://churchcrm.io/
* Copyright 2003 Chris Gebhardt
*
******************************************************************************/

// Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand All @@ -23,8 +11,6 @@
// Otherwise, re-direct them to the main menu.
AuthenticationManager::redirectHomeIfNotAdmin();


// Set the page title and include HTML header
$sPageTitle = gettext('Backup Database');
require 'Include/Header.php';

Expand Down
10 changes: 0 additions & 10 deletions src/BatchWinnerEntry.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<?php

/*******************************************************************************
*
* filename : BatchWinnerEntry.php
* last change : 2011-04-01
* website : https://churchcrm.io
* copyright : Copyright 2011 Michael Wilt
*
******************************************************************************/

//Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand Down
14 changes: 2 additions & 12 deletions src/CSVCreateFile.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<?php

/*******************************************************************************
*
* filename : CSVCreateFile.php
* last change : 2003-06-11
* website : https://churchcrm.io
* copyright : Copyright 2001-2003 Deane Barker, Chris Gebhardt, Michael Wilt
*
******************************************************************************/

// Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand Down Expand Up @@ -217,8 +207,8 @@

if ($sFormat === 'rollup') {
$sSQL = "(SELECT *, 0 AS memberCount, per_LastName AS SortMe FROM $sPerTable $sJoinFamTable WHERE per_fam_ID = 0 $sWhereExt)
UNION (SELECT *, COUNT(*) AS memberCount, fam_Name AS SortMe FROM $sPerTable $sJoinFamTable WHERE per_fam_ID > 0 $sWhereExt GROUP BY per_fam_ID HAVING memberCount = 1)
UNION (SELECT *, COUNT(*) AS memberCount, fam_Name AS SortMe FROM $sPerTable $sJoinFamTable WHERE per_fam_ID > 0 $sWhereExt GROUP BY per_fam_ID HAVING memberCount > 1) ORDER BY SortMe";
UNION (SELECT *, COUNT(*) AS memberCount, fam_Name AS SortMe FROM $sPerTable $sJoinFamTable WHERE per_fam_ID > 0 $sWhereExt GROUP BY per_fam_ID HAVING memberCount = 1)
UNION (SELECT *, COUNT(*) AS memberCount, fam_Name AS SortMe FROM $sPerTable $sJoinFamTable WHERE per_fam_ID > 0 $sWhereExt GROUP BY per_fam_ID HAVING memberCount > 1) ORDER BY SortMe";
} else {
$sSQL = "SELECT * FROM $sPerTable $sJoinFamTable WHERE 1 = 1 $sWhereExt $sGroupBy ORDER BY per_LastName";
}
Expand Down
15 changes: 2 additions & 13 deletions src/CSVExport.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
<?php

/*******************************************************************************
*
* filename : CSVExport.php
* description : options for creating csv file
*
* https://churchcrm.io/
* Copyright 2001-2002 Phillip Hullquist, Deane Barker
*
******************************************************************************/

// Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand All @@ -22,11 +11,11 @@
RedirectUtils::securityRedirect("CSVExport");
}

//Get Classifications for the drop-down
// Get Classifications for the drop-down
$sSQL = 'SELECT * FROM list_lst WHERE lst_ID = 1 ORDER BY lst_OptionSequence';
$rsClassifications = RunQuery($sSQL);

//Get Family Roles for the drop-down
// Get Family Roles for the drop-down
$sSQL = 'SELECT * FROM list_lst WHERE lst_ID = 2 ORDER BY lst_OptionSequence';
$rsFamilyRoles = RunQuery($sSQL);

Expand Down
13 changes: 1 addition & 12 deletions src/CSVImport.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
<?php

/*******************************************************************************
*
* filename : CSVImport.php
* last change : 2003-10-02
* description : Tool for importing CSV person data into InfoCentral
*
* https://churchcrm.io/
* Copyright 2003 Chris Gebhardt
*
******************************************************************************/

namespace ChurchCRM;

// Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand All @@ -32,6 +20,7 @@
AuthenticationManager::redirectHomeIfNotAdmin();

$logger = LoggerUtils::getAppLogger();

/**
* A monogamous society is assumed, however it can be patriarchal or matriarchal
**/
Expand Down
14 changes: 0 additions & 14 deletions src/CartToEvent.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
<?php

/*******************************************************************************
*
* filename : CartToEvent.php
* last change : 2005-09-09
* description : Add cart records to an event
*
* https://churchcrm.io/
* Copyright 2001-2003 Phillip Hullquist, Deane Barker, Chris Gebhardt
* Copyright 2005 Todd Pillars
* Copyright 2012 Michael Wilt
*
******************************************************************************/

// Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand Down
12 changes: 0 additions & 12 deletions src/CartToFamily.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<?php

/*******************************************************************************
*
* filename : CartToFamily.php
* last change : 2003-10-09
* description : Add cart records to a family
*
* https://churchcrm.io/
* Copyright 2003 Chris Gebhardt
*
******************************************************************************/

// Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand Down
19 changes: 2 additions & 17 deletions src/CartToGroup.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<?php

/*******************************************************************************
*
* filename : CartToGroup.php
* last change : 2003-06-23
* description : Add cart records to a group
*
* https://churchcrm.io/
* Copyright 2001-2003 Phillip Hullquist, Deane Barker, Chris Gebhardt, Logel Philippe
*
******************************************************************************/

// Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand Down Expand Up @@ -46,16 +34,13 @@
RedirectUtils::redirect('GroupView.php?GroupID=' . $iGroupID . '&Action=EmptyCart');
}

$ormGroups = GroupQuery::Create()
->orderByName()
->find();
$ormGroups = GroupQuery::Create()->orderByName()->find();

// Set the page title and include HTML header
$sPageTitle = gettext('Add Cart to Group');
require 'Include/Header.php';

if (count($_SESSION['aPeopleCart']) > 0) {
?>
?>

<script src="skin/js/GroupRoles.js"></script>

Expand Down
15 changes: 0 additions & 15 deletions src/Checkin.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
<?php

/*******************************************************************************
*
* filename : Checkin.php
* last change : 2007-xx-x
* description : Quickly add attendees to an event
*
* https://churchcrm.io/
* Copyright 2001-2003 Phillip Hullquist, Deane Barker, Chris Gebhardt
* Copyright 2005 Todd Pillars
* Copyright 2012 Michael Wilt
*
******************************************************************************/

$sPageTitle = gettext('Event Checkin');

// Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';
require 'Include/Header.php';
Expand All @@ -35,7 +21,6 @@
$iChildID = 0 ;
$iAdultID = 0;


if (array_key_exists('EventID', $_POST)) {
$EventID = InputUtils::legacyFilterInput($_POST['EventID'], 'int');
} // from ListEvents button=Attendees
Expand Down
4 changes: 2 additions & 2 deletions src/ChurchCRM/Service/DashboardService.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function getPersonCount(): array
{
$personCount = PersonQuery::Create('per')
->useFamilyQuery('fam', 'left join')
->filterByDateDeactivated(null)
->filterByDateDeactivated(null)
->endUse()
->count();
$data = ['personCount' => $personCount];
Expand Down Expand Up @@ -88,7 +88,7 @@ public function getGroupStats(): array
INNER JOIN group_grp ON grp_ID = p2g2r_grp_ID
LEFT JOIN family_fam ON fam_ID = per_fam_ID
where fam_DateDeactivated is null and
p2g2r_rle_ID = 2 and grp_Type = 4) as SundaySchoolKidsCount
p2g2r_rle_ID = 2 and grp_Type = 4) as SundaySchoolKidsCount
from dual ;
';
$rsQuickStat = RunQuery($sSQL);
Expand Down
11 changes: 3 additions & 8 deletions src/ChurchCRM/Service/PersonService.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ class PersonService
public function search(string $searchTerm, $includeFamilyRole = true): array
{
$searchLikeString = '%' . $searchTerm . '%';
$people = PersonQuery::create()->
filterByFirstName($searchLikeString, Criteria::LIKE)->
_or()->filterByMiddleName($searchLikeString, Criteria::LIKE)->
_or()->filterByLastName($searchLikeString, Criteria::LIKE)->
_or()->filterByEmail($searchLikeString, Criteria::LIKE)->
limit(15)->find();
$people = PersonQuery::create()->filterByFirstName($searchLikeString, Criteria::LIKE)->_or()->filterByMiddleName($searchLikeString, Criteria::LIKE)->_or()->filterByLastName($searchLikeString, Criteria::LIKE)->_or()->filterByEmail($searchLikeString, Criteria::LIKE)->limit(15)->find();
$return = [];
foreach ($people as $person) {
$values['id'] = $person->getId();
Expand Down Expand Up @@ -58,8 +53,8 @@ public function search(string $searchTerm, $includeFamilyRole = true): array
public function getPeopleEmailsAndGroups(): array
{
$sSQL = "SELECT per_FirstName, per_LastName, per_Email, per_ID, group_grp.grp_Name, lst_OptionName
from person_per
left JOIN person2group2role_p2g2r on
from person_per
left JOIN person2group2role_p2g2r on
person2group2role_p2g2r.p2g2r_per_ID = person_per.per_id
left JOIN group_grp ON
Expand Down
10 changes: 0 additions & 10 deletions src/DepositSlipEditor.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
<?php

/*******************************************************************************
*
* filename : DepositSlipEditor.php
* last change : 2014-12-14
* website : https://churchcrm.io
* copyright : Copyright 2001, 2002, 2003-2014 Deane Barker, Chris Gebhardt, Michael Wilt
*
******************************************************************************/

//Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand Down
14 changes: 0 additions & 14 deletions src/DirectoryReports.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
<?php

/*******************************************************************************
*
* filename : DirectoryReports.php
* last change : 2003-09-03
* description : form to invoke directory report
*
* https://churchcrm.io/
* Copyright 2003 Chris Gebhardt
* Copyright 2004-2012 Michael Wilt
*
******************************************************************************/

// Include the function library
require 'Include/Config.php';
require 'Include/Functions.php';

Expand All @@ -23,7 +10,6 @@
// Check for Create Directory user permission.
AuthenticationManager::redirectHomeIfFalse(AuthenticationManager::getCurrentUser()->isCreateDirectoryEnabled());

// Set the page title and include HTML header
$sPageTitle = gettext('Directory reports');
require 'Include/Header.php';

Expand Down
9 changes: 0 additions & 9 deletions src/DonatedItemDelete.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
<?php

/*******************************************************************************
*
* filename : Reports/PaddleNumDelete.php
* last change : 2011-04-03
* description : Deletes a specific donated item
* copyright : Copyright 2009 Michael Wilt
******************************************************************************/

require 'Include/Config.php';
require 'Include/Functions.php';

Expand Down
Loading

0 comments on commit 9c93cb4

Please sign in to comment.