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

Removed trailing whitespace #1139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions calls/call_document_merge.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ function run()
foreach ($data as $line) {
foreach ($line as $k => $v) {
echo '[person.'.$k.'] = '.$v."\n";
}
}
echo "\n";
}
foreach ($List_of_lists as $i => $a) {
echo "\n";
foreach ($a as $line) {
foreach ($line as $k => $v) {
echo '['.$i.'.'.$k.'] = '.$v."\n";
}
}
echo "\n";
}
}
Expand All @@ -167,7 +167,7 @@ function run()
foreach ($data as $line) {
foreach ($line as $k => $v) {
echo '[family.'.$k.'] = '.$v."\n";
}
}
echo "\n";
}
}
Expand Down Expand Up @@ -301,8 +301,8 @@ protected function getMergeData()
}
switch ($data_type) {
case 'attendance_tabular':
foreach ($headerrow as $Hash) {
$lastrow[$Hash] = '';
foreach ($headerrow as $Hash) {
$lastrow[$Hash] = '';
}
$dat = 1;
foreach ($dates as $date) {
Expand Down
6 changes: 3 additions & 3 deletions calls/call_document_merge_rosters.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@ function run()
$people[] = array('date' => $date, 'name' => $value);
}
break;
}
}
}
require_once 'include/tbs.class.php';
include_once 'include/tbs_plugin_opentbs.php';
if (ini_get('date.timezone')=='') {
date_default_timezone_set('UTC');
}
$TBS = new clsTinyButStrong;
$TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
$TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN);
$TBS->SetOption('noerr', TRUE);
$TBS->LoadTemplate($source_file, OPENTBS_ALREADY_UTF8);
$TBS->ResetVarRef(false);
$TBS->ResetVarRef(false);
$TBS->VarRef['system_name'] = ifdef('SYSTEM_NAME', '');
$TBS->VarRef['timezone'] = ifdef('TIMEZONE', '');
$TBS->VarRef['username'] = $_SESSION['user']['username'];
Expand Down
8 changes: 4 additions & 4 deletions calls/call_dtmf.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ function run()
//amplitude of wave file in the range 0-64
$amplitude = isset($amplitude) ? intval($amplitude) : 64;

//$upper_case and $lower_case specifies how letters in upper and
//$upper_case and $lower_case specifies how letters in upper and
//lower case are treated. Either should have one of the following
//values: 'abcd', 'spell' or false.
//
//'abcd' means that letters specify the signals A, B, C, D (some phones
//has special keys for these signals positioned to the right of the keys
//'abcd' means that letters specify the signals A, B, C, D (some phones
//has special keys for these signals positioned to the right of the keys
//9, 6, 3, # respectively)
//
//'spell' means that letters spell numbers like in 1-800-CALL-NOW.
Expand Down Expand Up @@ -78,7 +78,7 @@ function run()
$n = preg_replace('/[^0-9A-D#*,]/', '', $n);
}

//remove frequently used formatting characters
//remove frequently used formatting characters
//that are not part of the actual number
$n = strtr($n, '+-()',
' ');
Expand Down
2 changes: 1 addition & 1 deletion calls/call_find_person_json.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function run()
$dummy->populate($i, $details);
$info = $dummy->getFormattedValue('status').', '.$dummy->getFormattedValue('congregationid');
if (isset($absences[$i])) {
$info = '!! ABSENT !!';
$info = '!! ABSENT !!';
$i = 0;
}
$arr[] = '
Expand Down
16 changes: 8 additions & 8 deletions calls/call_service_comp_slides.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ function run()
$numlines = count($lines);

//clone nodes for each line of text
for ($z = 1; $z < ($numlines); $z++) {
for ($z = 1; $z < ($numlines); $z++) {
$line = $textelements->item($y)->parentNode->cloneNode(true);
$newline = $textelements->item($y)->parentNode->parentNode->appendChild($line);
$newline = $textelements->item($y)->parentNode->parentNode->appendChild($line);
}
//find text elements within cloned nodes above
$textlines = $xpath->query(".//*[text()[contains(., 'contents')]]",$textelements->item($y)->parentNode->parentNode);
//populate text elements
//populate text elements
for ($z = 0; $z < ($numlines); $z++) {
$textlines->item($z)->nodeValue = xml_safe_string($lines[$z]);
}
}

} elseif (strcmp($textelements->item($y)->nodeValue, 'credit') == 0) { //credits textbox

Expand All @@ -110,19 +110,19 @@ function run()
$numlines = count($lines);

//clone nodes for each line of text
for ($z = 0; $z < ($numlines-1); $z++) {
for ($z = 0; $z < ($numlines-1); $z++) {
$line = $textelements->item($y)->parentNode->cloneNode(true);
$newline = $textelements->item($y)->parentNode->parentNode->appendChild($line);
$newline = $textelements->item($y)->parentNode->parentNode->appendChild($line);
}
//find text elements within cloned nodes above
$textlines = $xpath->query(".//*[text()[contains(., 'credit')]]",$textelements->item($y)->parentNode->parentNode);

//populate text elements
//populate text elements
for ($z = 0; $z < ($numlines); $z++) {
$textlines->item($z)->nodeValue = xml_safe_string($lines[$z]);
}
}
}
}
}

$dom->saveXML();
Expand Down
2 changes: 1 addition & 1 deletion db_objects/congregation.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function printFieldInterface($name, $prefix='')
Persons can be added to this congregation
</label>
<label class="checkbox">
<?php
<?php
$params['attrs']['data-target'] = '#field-attendance_recording_days';
print_widget('holds_attendance', $params, empty($this->id) || $this->getValue('attendance_recording_days') > 0); ?>
Attendance can be recorded for this congregation
Expand Down
2 changes: 1 addition & 1 deletion db_objects/congregation_service_component.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function getForeignKeys()
{
return Array(
'congregationid' => "`congregation` (`id`) ON DELETE CASCADE",
'componentid' => "`service_component` (`id`) ON DELETE CASCADE",
'componentid' => "`service_component` (`id`) ON DELETE CASCADE",
);
}

Expand Down
2 changes: 1 addition & 1 deletion db_objects/family_note.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function getInstancesQueryComps($params, $logic, $order)
if ($GLOBALS['user_system']->getCurrentRestrictions()) {
// eliminate any notes linked to families with no visible members
$res['from'] .= ' JOIN person fmember ON fmember.familyid = subject.id ';
}
}
$res['select'][] = 'subject.family_name as family_name';
return $res;
}
Expand Down
2 changes: 1 addition & 1 deletion db_objects/person.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public function getViewSQL()
protected function _getInsertTableName()
{
return '_person';
}
}

/**
*
Expand Down
4 changes: 2 additions & 2 deletions db_objects/person_group.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function getForeignKeys()
return Array(
'_person_group.categoryid' => "`person_group_category` (`id`) ON DELETE SET NULL",
);
}
}


/**
Expand Down Expand Up @@ -482,7 +482,7 @@ static function printChooser($fieldname, $value, $exclude_groups=Array(), $allow
if ($groupsCache === NULL) $groupsCache = $GLOBALS['system']->getDBObjectData('person_group', Array('is_archived' => 0), 'OR', 'name');
$groups = $groupsCache;
} else {
$groups = $GLOBALS['system']->getDBObjectData('person_group', Array('is_archived' => 0, 'id' => $value), 'OR', 'name');
$groups = $GLOBALS['system']->getDBObjectData('person_group', Array('is_archived' => 0, 'id' => $value), 'OR', 'name');
}

if (empty($groups)) {
Expand Down
2 changes: 1 addition & 1 deletion db_objects/person_query.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,7 @@ function printResults($format='html')

if ($format == 'array') {
return $data;
}
}
}

function _printResultGroups($res, $params, $format)
Expand Down
2 changes: 1 addition & 1 deletion db_objects/person_status.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static function getByLabel($label)
$set[$detail['label']] = $id;
}
}
return array_get($set, $label);
return array_get($set, $label);
}


Expand Down
2 changes: 1 addition & 1 deletion db_objects/service.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ function printFieldValue($fieldname, $value=NULL, $printableMode=FALSE)
}
$res[] = $line;
}
echo implode('<br />', $res);
echo implode('<br />', $res);

} else {
parent::printFieldvalue($fieldname);
Expand Down
6 changes: 3 additions & 3 deletions db_objects/staff_member.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ function hasRestrictions()
if (!empty($rs)) return TRUE;
}
return FALSE;
}
}

function create()
{
Expand All @@ -438,9 +438,9 @@ function createFromChild($person)
if (!($GLOBALS['user_system']->reverifyCurrentUser(array_get($_POST, 'my_current_password')))) {
add_message("Password for current user was incorrect. Account details not saved", 'error');
return FALSE;
}
}
return parent::createFromChild($person);
}
}


function _createFinal()
Expand Down
4 changes: 2 additions & 2 deletions include/db_object.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,8 @@ public function setValue($name, $value)
}
$value = clean_phone_number($value);
}
if (!empty($this->fields[$name]['maxlength'])
&& !is_null($value)
if (!empty($this->fields[$name]['maxlength'])
&& !is_null($value)
&& (strlen($value) > $this->fields[$name]['maxlength'])
) {
$value = substr($value, 0, $this->fields[$name]['maxlength']);
Expand Down
2 changes: 1 addition & 1 deletion include/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

spl_autoload_register(function ($class_name) {
// If this autoloader fails, we want it to quietly continue on to other autoloaders
// (eg the Composer one). But the @(shutup) operator does not supress include-once
// (eg the Composer one). But the @(shutup) operator does not supress include-once
// errors in PHP8+. And file_exists does not take include_path into account.
// So this ugly approach to supressing 'file not found' errors is necessary.
$old_er = error_reporting();
Expand Down
2 changes: 1 addition & 1 deletion include/size_detector_demo.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php
@session_start();
include 'size_detector.class.php';
SizeDetector::processRequest();
Expand Down
2 changes: 1 addition & 1 deletion include/system_controller.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function _handleError($errno, $errstr, $errfile, $errline)
{
if (error_reporting() == 0) return; // the "@" shutup-operator was used
$send_email = true;
$showTechDetails = ifdef('SHOW_ERROR_DETAILS', (JETHRO_VERSION == 'DEV'));
$showTechDetails = ifdef('SHOW_ERROR_DETAILS', (JETHRO_VERSION == 'DEV'));
$exit = false;
switch ($errno) {
case E_ERROR:
Expand Down
Loading