From 0fd39724ec01f9f77115641c88ab7da1a4b09227 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Fri, 3 Nov 2017 12:12:31 +0000 Subject: CodeStyle - spacing/alignment --- action.php | 34 +- admin_pgv_to_wt.php | 12 +- admin_site_upgrade.php | 14 +- admin_trees_check.php | 14 +- admin_trees_download.php | 2 +- app/Bootstrap4.php | 6 +- app/CommonMark/XrefParser.php | 2 +- app/Config.php | 50 +-- app/Controller/AdminController.php | 21 +- app/Controller/AdvancedSearchController.php | 20 +- app/Controller/ChartController.php | 2 +- app/Controller/FamilyBookController.php | 4 +- app/Controller/IndividualController.php | 4 +- app/Controller/LifespanController.php | 6 +- app/Controller/SearchController.php | 20 +- app/Database.php | 2 +- app/Datatables.php | 44 +-- app/Date/CalendarDate.php | 14 +- app/Date/FrenchDate.php | 20 +- app/Filter.php | 2 +- app/FontAwesome.php | 86 ++--- app/Functions/Functions.php | 10 +- app/Functions/FunctionsCharts.php | 6 +- app/Functions/FunctionsEdit.php | 4 +- app/Functions/FunctionsExport.php | 2 +- app/Functions/FunctionsPrint.php | 8 +- app/Functions/FunctionsPrintLists.php | 14 +- app/I18N.php | 36 +-- app/Media.php | 16 +- app/Module.php | 2 +- app/Module/BatchUpdateModule.php | 5 +- app/Module/ChartsBlockModule.php | 18 +- .../ClippingsCart/ClippingsCartController.php | 2 +- app/Module/FrequentlyAskedQuestionsModule.php | 4 +- app/Module/GoogleMapsModule.php | 38 +-- app/Module/HtmlBlockModule.php | 10 +- app/Module/RecentChangesModule.php | 16 +- app/Module/StoriesModule.php | 4 +- app/Module/ThemeSelectModule.php | 2 +- app/Module/YahrzeitModule.php | 2 +- app/Report/ReportParserGenerate.php | 10 +- app/Select2.php | 4 +- app/Soundex.php | 348 ++++++++++----------- app/Stats.php | 24 +- app/SurnameTradition.php | 53 ++-- .../LithuanianSurnameTradition.php | 10 +- app/SurnameTradition/PolishSurnameTradition.php | 2 +- app/Theme/AbstractTheme.php | 21 +- app/Theme/FabTheme.php | 2 +- app/Theme/MinimalTheme.php | 8 +- app/Tree.php | 3 +- calendar.php | 2 +- edit_changes.php | 4 +- edit_interface.php | 24 +- editnews.php | 8 +- help_text.php | 76 +++-- includes/session.php | 2 +- individual.php | 2 +- login.php | 2 +- mediafirewall.php | 2 +- medialist.php | 32 +- message.php | 2 +- relationship.php | 22 +- reportengine.php | 6 +- resources/views/emails/verify-notify-html.php | 4 +- resources/views/emails/verify-notify-text.php | 2 +- setup.php | 4 +- statisticsplot.php | 6 +- tests/app/Census/CensusOfCzechRepublicTest.php | 2 +- tests/app/Census/CensusOfDenmarkTest.php | 2 +- tests/app/Census/CensusOfDeutschlandTest.php | 2 +- tests/app/Census/CensusOfEnglandTest.php | 2 +- tests/app/Census/CensusOfFranceTest.php | 2 +- tests/app/Census/CensusOfScotlandTest.php | 2 +- tests/app/Census/CensusOfUnitedStatesTest.php | 2 +- tests/app/Census/CensusOfWalesTest.php | 2 +- 76 files changed, 622 insertions(+), 657 deletions(-) diff --git a/action.php b/action.php index 2cb21a9457..7cae032426 100644 --- a/action.php +++ b/action.php @@ -95,12 +95,12 @@ case 'create-media-object': // Create a media object, and return parameters needed by Select2 header('Content-type: application/json'); - $filename = 'eek.jpg'; - $auto = Filter::post('auto'); - $folder = Filter::post('folder'); - $note = Filter::post('note'); - $type = Filter::post('type'); - $title = Filter::post('title'); + $filename = 'eek.jpg'; + $auto = Filter::post('auto'); + $folder = Filter::post('folder'); + $note = Filter::post('note'); + $type = Filter::post('type'); + $title = Filter::post('title'); // No file uploaded? if (empty($_FILES['file']) || !is_uploaded_file($_FILES['file']['tmp_name'])) { @@ -109,7 +109,7 @@ case 'create-media-object': } // The filename - $file = $_FILES['file']['name']; + $file = $_FILES['file']['name']; $format = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); $format = strtr($format, ['jpg' => 'jpeg']); @@ -200,21 +200,21 @@ case 'create-repository': // Create a repository, and return parameters needed by Select2 header('Content-type: application/json'); $repository_name = Filter::post('repository_name'); - $gedcom = "0 @new@ REPO\n1 NAME " . $repository_name; - $repository = $WT_TREE->createRecord($gedcom); + $gedcom = "0 @new@ REPO\n1 NAME " . $repository_name; + $repository = $WT_TREE->createRecord($gedcom); echo json_encode(['id' => $repository->getXref(), 'text' => View::make('selects/repository', ['repository' => $repository])]); break; case 'create-source': // Create a source, and return parameters needed by Select2 header('Content-type: application/json'); - $TITL = Filter::post('TITL'); - $ABBR = Filter::post('ABBR'); - $AUTH = Filter::post('AUTH'); - $PUBL = Filter::post('PUBL'); - $TEXT = Filter::post('TEXT'); - $REPO = Filter::post('REPO', WT_REGEX_XREF); - $CALN = Filter::post('CALN'); + $TITL = Filter::post('TITL'); + $ABBR = Filter::post('ABBR'); + $AUTH = Filter::post('AUTH'); + $PUBL = Filter::post('PUBL'); + $TEXT = Filter::post('TEXT'); + $REPO = Filter::post('REPO', WT_REGEX_XREF); + $CALN = Filter::post('CALN'); $gedcom = '0 @new@ SOUR'; if ($TITL !== '') { $gedcom .= "\n1 TITL " . $TITL; @@ -244,7 +244,7 @@ case 'create-source': case 'create-submitter': // Create a submitter, and return parameters needed by Select2 header('Content-type: application/json'); - $gedcom = '0 @new@ SUBM'; + $gedcom = '0 @new@ SUBM'; $submitter_name = Filter::post('submitter_name', null, ''); if ($submitter_name !== '') { $gedcom .= "\n1 NAME " . $submitter_name; diff --git a/admin_pgv_to_wt.php b/admin_pgv_to_wt.php index 8824bffa53..37876cef50 100644 --- a/admin_pgv_to_wt.php +++ b/admin_pgv_to_wt.php @@ -539,12 +539,12 @@ if ($PGV_SCHEMA_VERSION >= 12) { )->execute(); echo '

pgv_users => wt_user_gedcom_setting…

'; - $user_gedcom_settings = - Database::prepare( - "SELECT user_id, u_gedcomid, u_rootid, u_canedit" . - " FROM `{$DBNAME}`.`{$TBLPREFIX}users`" . - " JOIN `##user` ON (user_name=CONVERT(u_username USING utf8) COLLATE utf8_unicode_ci)" - )->fetchAll(); + $user_gedcom_settings = Database::prepare( + "SELECT user_id, u_gedcomid, u_rootid, u_canedit" . + " FROM `{$DBNAME}`.`{$TBLPREFIX}users`" . + " JOIN `##user` ON (user_name=CONVERT(u_username USING utf8) COLLATE utf8_unicode_ci)" + )->fetchAll(); + foreach ($user_gedcom_settings as $setting) { try { $array = unserialize($setting->u_gedcomid); diff --git a/admin_site_upgrade.php b/admin_site_upgrade.php index 5391dba552..83fc026e8d 100644 --- a/admin_site_upgrade.php +++ b/admin_site_upgrade.php @@ -38,17 +38,17 @@ if (preg_match('/^[0-9.]+\|[0-9.]+\|/', $latest_version_txt)) { $latest_version_html = '' . $latest_version . ''; // Show a friendly message while the site is being upgraded -$lock_file = __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'offline.txt'; -$lock_file_text = I18N::translate('This website is being upgraded. Try again in a few minutes.') . PHP_EOL . FunctionsDate::formatTimestamp(WT_TIMESTAMP) . /* I18N: Timezone - http://en.wikipedia.org/wiki/UTC */ I18N::translate('UTC'); +$lock_file = __DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'offline.txt'; +$lock_file_text = I18N::translate('This website is being upgraded. Try again in a few minutes.') . PHP_EOL . FunctionsDate::formatTimestamp(WT_TIMESTAMP) . /* I18N: Timezone - http://en.wikipedia.org/wiki/UTC */ I18N::translate('UTC'); // Success/failure indicators -$icon_success = ''; -$icon_failure = ''; +$icon_success = ''; +$icon_failure = ''; // Need confirmation for various actions -$continue = Filter::post('continue', '1') && Filter::checkCsrf(); -$modules_action = Filter::post('modules', 'ignore|disable'); -$themes_action = Filter::post('themes', 'ignore|disable'); +$continue = Filter::post('continue', '1') && Filter::checkCsrf(); +$modules_action = Filter::post('modules', 'ignore|disable'); +$themes_action = Filter::post('themes', 'ignore|disable'); $controller = new PageController; $controller diff --git a/admin_trees_check.php b/admin_trees_check.php index 39b8007450..62950276ac 100644 --- a/admin_trees_check.php +++ b/admin_trees_check.php @@ -79,13 +79,13 @@ foreach (array_keys($records) as $key) { // LOOK FOR BROKEN LINKS $XREF_LINKS = [ - 'NOTE' => 'NOTE', - 'SOUR' => 'SOUR', - 'REPO' => 'REPO', - 'OBJE' => 'OBJE', - 'SUBM' => 'SUBM', - 'FAMC' => 'FAM', - 'FAMS' => 'FAM', + 'NOTE' => 'NOTE', + 'SOUR' => 'SOUR', + 'REPO' => 'REPO', + 'OBJE' => 'OBJE', + 'SUBM' => 'SUBM', + 'FAMC' => 'FAM', + 'FAMS' => 'FAM', //'ADOP'=>'FAM', // Need to handle this case specially. We may have both ADOP and FAMC links to the same FAM, but only store one. 'HUSB' => 'INDI', 'WIFE' => 'INDI', diff --git a/admin_trees_download.php b/admin_trees_download.php index 030ddf77f2..446aff9b90 100644 --- a/admin_trees_download.php +++ b/admin_trees_download.php @@ -71,7 +71,7 @@ if ($action === 'download') { rewind($tmp_stream); // Create a new/empty .ZIP file - $temp_zip_file = tempnam(sys_get_temp_dir(), 'webtrees-zip-'); + $temp_zip_file = tempnam(sys_get_temp_dir(), 'webtrees-zip-'); $zip_filesystem = new Filesystem(new ZipArchiveAdapter($temp_zip_file)); $zip_filesystem->writeStream($download_filename, $tmp_stream); diff --git a/app/Bootstrap4.php b/app/Bootstrap4.php index d6fda507dc..aab0da80cc 100644 --- a/app/Bootstrap4.php +++ b/app/Bootstrap4.php @@ -73,9 +73,9 @@ class Bootstrap4 extends Html { } $input_attributes = self::attributes([ - 'class' => 'form-check-input', - 'type' => 'checkbox', - 'value' => '1', + 'class' => 'form-check-input', + 'type' => 'checkbox', + 'value' => '1', ] + $attributes); return diff --git a/app/CommonMark/XrefParser.php b/app/CommonMark/XrefParser.php index 85f10bfe6e..9c11621f44 100644 --- a/app/CommonMark/XrefParser.php +++ b/app/CommonMark/XrefParser.php @@ -77,7 +77,7 @@ class XrefParser extends AbstractInlineParser { return false; } - $url = $record->getRawUrl(); + $url = $record->getRawUrl(); $label = $handle; $title = strip_tags($record->getFullName()); $context->getContainer()->appendChild(new Link($url, $label, $title)); diff --git a/app/Config.php b/app/Config.php index 8a3adc5c2b..ead1d6412c 100644 --- a/app/Config.php +++ b/app/Config.php @@ -104,92 +104,92 @@ class Config { */ public static function levelTwoTags() { return [ - '_HEB' => [ + '_HEB' => [ 'NAME', 'TITL', ], - 'ROMN' => [ + 'ROMN' => [ 'NAME', 'TITL', ], - 'TYPE' => [ + 'TYPE' => [ 'EVEN', 'FACT', 'GRAD', 'IDNO', 'MARR', 'ORDN', 'SSN', ], - 'AGNC' => [ + 'AGNC' => [ 'EDUC', 'GRAD', 'OCCU', 'ORDN', 'RETI', ], - 'CALN' => [ + 'CALN' => [ 'REPO', ], - 'CEME' => [// CEME is NOT a valid 5.5.1 tag + 'CEME' => [// CEME is NOT a valid 5.5.1 tag //'BURI', ], - 'RELA' => [ + 'RELA' => [ 'ASSO', '_ASSO', ], - 'DATE' => [ + 'DATE' => [ 'ADOP', 'ANUL', 'BAPL', 'BAPM', 'BARM', 'BASM', 'BIRT', 'BLES', 'BURI', 'CENS', 'CENS', 'CHR', 'CHRA', 'CONF', 'CONL', 'CREM', 'DEAT', 'DIV', 'DIVF', 'DSCR', 'EDUC', 'EMIG', 'ENDL', 'ENGA', 'EVEN', 'FCOM', 'GRAD', 'IMMI', 'MARB', 'MARC', 'MARL', 'MARR', 'MARS', 'NATU', 'OCCU', 'ORDN', 'PROB', 'PROP', 'RELI', 'RESI', 'RETI', 'SLGC', 'SLGS', 'WILL', '_TODO', ], - 'AGE' => [ + 'AGE' => [ 'CENS', 'DEAT', ], - 'TEMP' => [ + 'TEMP' => [ 'BAPL', 'CONL', 'ENDL', 'SLGC', 'SLGS', ], - 'PLAC' => [ + 'PLAC' => [ 'ADOP', 'ANUL', 'BAPL', 'BAPM', 'BARM', 'BASM', 'BIRT', 'BLES', 'BURI', 'CENS', 'CHR', 'CHRA', 'CONF', 'CONL', 'CREM', 'DEAT', 'DIV', 'DIVF', 'EDUC', 'EMIG', 'ENDL', 'ENGA', 'EVEN', 'FCOM', 'GRAD', 'IMMI', 'MARB', 'MARC', 'MARL', 'MARR', 'MARS', 'NATU', 'OCCU', 'ORDN', 'PROB', 'PROP', 'RELI', 'RESI', 'RETI', 'SLGC', 'SLGS', 'SSN', 'WILL', ], - 'STAT' => [ + 'STAT' => [ 'BAPL', 'CONL', 'ENDL', 'SLGC', 'SLGS', ], - 'ADDR' => [ + 'ADDR' => [ 'BAPM', 'BIRT', 'BURI', 'CENS', 'CHR', 'CHRA', 'CONF', 'CREM', 'DEAT', 'EDUC', 'EVEN', 'GRAD', 'MARR', 'OCCU', 'ORDN', 'PROP', 'RESI', ], - 'CAUS' => [ + 'CAUS' => [ 'DEAT', ], - 'PHON' => [ + 'PHON' => [ 'OCCU', 'RESI', ], - 'FAX' => [ + 'FAX' => [ 'OCCU', 'RESI', ], - 'WWW' => [ + 'WWW' => [ 'OCCU', 'RESI', ], - 'EMAIL' => [ + 'EMAIL' => [ 'OCCU', 'RESI', ], - 'HUSB' => [ + 'HUSB' => [ 'MARR', ], - 'WIFE' => [ + 'WIFE' => [ 'MARR', ], - 'FAMC' => [ + 'FAMC' => [ 'ADOP', 'SLGC', ], - 'FILE' => [ + 'FILE' => [ 'OBJE', ], - '_PRIM' => [ + '_PRIM' => [ 'OBJE', ], - 'EVEN' => [ + 'EVEN' => [ 'DATA', ], '_WT_USER' => [ '_TODO', ], // See https://bugs.launchpad.net/webtrees/+bug/1082666 - 'RELI' => [ + 'RELI' => [ 'CHR', 'CHRA', 'BAPM', 'MARR', 'BURI', ], ]; diff --git a/app/Controller/AdminController.php b/app/Controller/AdminController.php index 3d7afba9c5..8bad64520b 100644 --- a/app/Controller/AdminController.php +++ b/app/Controller/AdminController.php @@ -509,15 +509,15 @@ class AdminController extends PageController { $all_trees = array_filter(Tree::getAll(), function (Tree $tree) { return Auth::isManager($tree); }); echo View::make('admin/control-panel-manager', [ - 'title' => $this->getPageTitle(), - 'all_trees' => $all_trees, - 'changes' => $this->totalChanges(), - 'individuals' => $this->totalIndividuals(), - 'families' => $this->totalFamilies(), - 'sources' => $this->totalSources(), - 'media' => $this->totalMediaObjects(), - 'repositories' => $this->totalRepositories(), - 'notes' => $this->totalNotes(), + 'title' => $this->getPageTitle(), + 'all_trees' => $all_trees, + 'changes' => $this->totalChanges(), + 'individuals' => $this->totalIndividuals(), + 'families' => $this->totalFamilies(), + 'sources' => $this->totalSources(), + 'media' => $this->totalMediaObjects(), + 'repositories' => $this->totalRepositories(), + 'notes' => $this->totalNotes(), ]); } @@ -600,8 +600,7 @@ class AdminController extends PageController { $warings = []; if ($php_major_version === 70 && $today >= '201-12-03' || $php_major_version === 71 && $today >= '2019-12-01') { - $warings[] = - I18N::translate('Your web server is using PHP version %s, which is no longer receiving security updates. You should upgrade to a later version as soon as possible.', PHP_VERSION) . + $warings[] = I18N::translate('Your web server is using PHP version %s, which is no longer receiving security updates. You should upgrade to a later version as soon as possible.', PHP_VERSION) . ' ' . $php_support_url . ''; } elseif ($php_major_version === 70 && $today >= '2017-12-03' || $php_major_version === 71 && $today >= '2018-12-01') { $warings[] = I18N::translate('Your web server is using PHP version %s, which is no longer maintained. You should upgrade to a later version.', PHP_VERSION) . ' ' . $php_support_url . ''; diff --git a/app/Controller/AdvancedSearchController.php b/app/Controller/AdvancedSearchController.php index 63e36301ab..a0c01167b0 100644 --- a/app/Controller/AdvancedSearchController.php +++ b/app/Controller/AdvancedSearchController.php @@ -28,10 +28,10 @@ use Fisharebest\Webtrees\Soundex; */ class AdvancedSearchController extends SearchController { /** @var string[] Fields to search */ - public $fields = []; + public $fields = []; /** @var string[] Field values to search */ - public $values = []; + public $values = []; /** @var int[] Range of days either side of target date */ public $plusminus = []; @@ -270,14 +270,14 @@ class AdvancedSearchController extends SearchController { $bind = []; // Join the following tables - $father_name = false; - $mother_name = false; - $spouse_family = false; - $indi_name = false; - $indi_date = false; - $fam_date = false; - $indi_plac = false; - $fam_plac = false; + $father_name = false; + $mother_name = false; + $spouse_family = false; + $indi_name = false; + $indi_date = false; + $fam_date = false; + $indi_plac = false; + $fam_plac = false; foreach ($this->fields as $n => $field) { if ($this->values[$n]) { if (substr($field, 0, 14) == 'FAMC:HUSB:NAME') { diff --git a/app/Controller/ChartController.php b/app/Controller/ChartController.php index f4bd6e2f12..08b6ee6010 100644 --- a/app/Controller/ChartController.php +++ b/app/Controller/ChartController.php @@ -52,7 +52,7 @@ class ChartController extends PageController { $this->error_message = I18N::translate('This individual does not exist or you do not have permission to view it.'); } - $this->box = new stdClass(); + $this->box = new stdClass(); $this->box->width = Theme::theme()->parameter('chart-box-x'); $this->box->height = Theme::theme()->parameter('chart-box-y'); } diff --git a/app/Controller/FamilyBookController.php b/app/Controller/FamilyBookController.php index 1038cb253c..45112c63f1 100644 --- a/app/Controller/FamilyBookController.php +++ b/app/Controller/FamilyBookController.php @@ -117,7 +117,7 @@ class FamilyBookController extends ChartController { $h = ($kids - 1) * 4 + $h; } echo '', - ''; + ''; } elseif ($i === count($children) - 1) { // Adjust for the first column on left $h = round(((($this->getBoxDimensions()->height) * $kids) + 8) / 2); @@ -126,7 +126,7 @@ class FamilyBookController extends ChartController { $h = ($kids - 1) * 4 + $h; } echo '', - ''; + ''; } else { echo '', ''; diff --git a/app/Controller/IndividualController.php b/app/Controller/IndividualController.php index 82ae6322fb..2a5157b993 100755 --- a/app/Controller/IndividualController.php +++ b/app/Controller/IndividualController.php @@ -36,7 +36,7 @@ use Fisharebest\Webtrees\Module\ModuleTabInterface; */ class IndividualController extends GedcomRecordController { /** @var int Count of names */ - public $name_count = 0; + public $name_count = 0; /** @var int Count of names. */ public $total_names = 0; @@ -142,7 +142,7 @@ class IndividualController extends GedcomRecordController { if ($n === 0) { $content_class = 'collapse show'; - $aria = 'true'; + $aria = 'true'; } if ($fact->isPendingDeletion()) { $container_class .= ' old'; diff --git a/app/Controller/LifespanController.php b/app/Controller/LifespanController.php index b34d390d46..821aa405b1 100644 --- a/app/Controller/LifespanController.php +++ b/app/Controller/LifespanController.php @@ -50,16 +50,16 @@ class LifespanController extends PageController { const SESSION_DATA = 'lifespan_data'; /** @var string|null Chart parameter */ - public $place = null; + public $place = null; /** @var int|null Chart parameter */ public $beginYear = null; /** @var int|null Chart parameter */ - public $endYear = null; + public $endYear = null; /** @var string Chart parameter */ - public $subtitle = ' '; + public $subtitle = ' '; /** @var Individual[] A list of individuals to display. */ private $people = []; diff --git a/app/Controller/SearchController.php b/app/Controller/SearchController.php index a7f2d11c5c..0883fe4c2d 100644 --- a/app/Controller/SearchController.php +++ b/app/Controller/SearchController.php @@ -132,16 +132,16 @@ class SearchController extends PageController { $this->action = 'general'; } - $this->srindi = Filter::get('srindi', 'checked', ''); - $this->srfams = Filter::get('srfams', 'checked', ''); - $this->srsour = Filter::get('srsour', 'checked', ''); - $this->srnote = Filter::get('srnote', 'checked', ''); - $this->soundex = Filter::get('soundex', 'DaitchM|Russell', 'DaitchM'); - $this->showasso = Filter::get('showasso'); - $this->firstname = Filter::get('firstname'); - $this->lastname = Filter::get('lastname'); - $this->place = Filter::get('place'); - $this->year = Filter::get('year'); + $this->srindi = Filter::get('srindi', 'checked', ''); + $this->srfams = Filter::get('srfams', 'checked', ''); + $this->srsour = Filter::get('srsour', 'checked', ''); + $this->srnote = Filter::get('srnote', 'checked', ''); + $this->soundex = Filter::get('soundex', 'DaitchM|Russell', 'DaitchM'); + $this->showasso = Filter::get('showasso'); + $this->firstname = Filter::get('firstname'); + $this->lastname = Filter::get('lastname'); + $this->place = Filter::get('place'); + $this->year = Filter::get('year'); // If no record types specified, search individuals if (!$this->srfams && !$this->srsour && !$this->srnote) { diff --git a/app/Database.php b/app/Database.php index a925a0acef..226b42ad25 100644 --- a/app/Database.php +++ b/app/Database.php @@ -161,7 +161,7 @@ class Database { } } $milliseconds = sprintf('%.3f', $microseconds * 1000); - self::$log[] = '' . $stack . '' . $query . '' . $rows . '' . $milliseconds . ''; + self::$log[] = '' . $stack . '' . $query . '' . $rows . '' . $milliseconds . ''; } /** diff --git a/app/Datatables.php b/app/Datatables.php index 33278cbb53..47b7882690 100755 --- a/app/Datatables.php +++ b/app/Datatables.php @@ -63,7 +63,7 @@ class Datatables { ]; return [ - 'data-language' => json_encode($language), + 'data-language' => json_encode($language), 'data-length-menu' => json_encode([array_keys($length_menu), array_values($length_menu)]) ]; } @@ -75,12 +75,12 @@ class Datatables { */ public static function eventTableAttributes() { return Html::attributes([ - 'class' => 'table table-bordered table-sm table-responsive datatables table-event', + 'class' => 'table table-bordered table-sm table-responsive datatables table-event', //'data-columns' => '[{ type: "text" }, { type: "num" }, { type: "num" }, { type: "text" }]', - 'data-columns' => '[null, null, null, null]', - 'data-info' => 'false', - 'data-paging' => 'false', - 'data-searching' => 'false', + 'data-columns' => '[null, null, null, null]', + 'data-info' => 'false', + 'data-paging' => 'false', + 'data-searching' => 'false', 'data-state-save' => 'true', ] + self::languageAttributes()); } @@ -92,12 +92,12 @@ class Datatables { */ public static function givenNameTableAttributes() { return Html::attributes([ - 'class' => 'table table-bordered table-sm datatables table-given-name', + 'class' => 'table table-bordered table-sm datatables table-given-name', //'data-columns' => '[{ type: "text" }, { type: "num" }]', - 'data-columns' => '[null, null]', - 'data-info' => 'false', - 'data-paging' => 'false', - 'data-searching' => 'false', + 'data-columns' => '[null, null]', + 'data-info' => 'false', + 'data-paging' => 'false', + 'data-searching' => 'false', 'data-state-save' => 'true', ]); } @@ -109,9 +109,9 @@ class Datatables { */ public static function noteTableAttributes() { return Html::attributes([ - 'class' => 'table table-bordered table-sm table-responsive datatables table-note', + 'class' => 'table table-bordered table-sm table-responsive datatables table-note', //'data-columns' => '[{ type: "text" }, { type: "text" }, { type: "num" }, { type: "num" }, { type: "num" }, { type: "text" }, { sorting: false }]', - 'data-columns' => '[null, null, null, null, null, null]', + 'data-columns' => '[null, null, null, null, null, null]', 'data-state-save' => 'true', ] + self::defaultAttributes() + self::languageAttributes()); } @@ -123,9 +123,9 @@ class Datatables { */ public static function repositoryTableAttributes() { return Html::attributes([ - 'class' => 'table table-bordered table-sm table-responsive datatables table-repository', + 'class' => 'table table-bordered table-sm table-responsive datatables table-repository', //'data-columns' => '[{ type: "text" }, { type: "num" }, { type: "text" }, { sorting: false }]', - 'data-columns' => '[null, null, null]', + 'data-columns' => '[null, null, null]', 'data-state-save' => 'true', ] + self::languageAttributes()); } @@ -137,9 +137,9 @@ class Datatables { */ public static function sourceTableAttributes() { return Html::attributes([ - 'class' => 'table table-bordered table-sm table-responsive datatables table-source', + 'class' => 'table table-bordered table-sm table-responsive datatables table-source', //'data-columns' => '[{ type: "text" }, { type: "text" }, { type: "num" }, { type: "num" }, { type: "num" }, { type: "num" }, { type: "text" }, { sorting: false }]', - 'data-columns' => '[null, null, null, null, null, null, null]', + 'data-columns' => '[null, null, null, null, null, null, null]', 'data-state-save' => 'true', ] + self::languageAttributes()); } @@ -151,12 +151,12 @@ class Datatables { */ public static function surnameTableAttributes() { return Html::attributes([ - 'class' => 'table table-bordered table-sm table-responsive datatables table-surname', + 'class' => 'table table-bordered table-sm table-responsive datatables table-surname', //'data-columns' => '[{ type: "text" }, { type: "num" }]', - 'data-columns' => '[null, null]', - 'data-info' => 'false', - 'data-paging' => 'false', - 'data-searching' => 'false', + 'data-columns' => '[null, null]', + 'data-info' => 'false', + 'data-paging' => 'false', + 'data-searching' => 'false', 'data-state-save' => 'true', ]); } diff --git a/app/Date/CalendarDate.php b/app/Date/CalendarDate.php index b57fe932bf..3b71b673cb 100644 --- a/app/Date/CalendarDate.php +++ b/app/Date/CalendarDate.php @@ -373,13 +373,13 @@ class CalendarDate { if ($translated_day_names === null) { $translated_day_names = [ - 0 => /* I18N: abbreviation for Monday */ I18N::translate('Mon'), - 1 => /* I18N: abbreviation for Tuesday */ I18N::translate('Tue'), - 2 => /* I18N: abbreviation for Wednesday */ I18N::translate('Wed'), - 3 => /* I18N: abbreviation for Thursday */ I18N::translate('Thu'), - 4 => /* I18N: abbreviation for Friday */ I18N::translate('Fri'), - 5 => /* I18N: abbreviation for Saturday */ I18N::translate('Sat'), - 6 => /* I18N: abbreviation for Sunday */ I18N::translate('Sun'), + 0 => /* I18N: abbreviation for Monday */ I18N::translate('Mon'), + 1 => /* I18N: abbreviation for Tuesday */ I18N::translate('Tue'), + 2 => /* I18N: abbreviation for Wednesday */ I18N::translate('Wed'), + 3 => /* I18N: abbreviation for Thursday */ I18N::translate('Thu'), + 4 => /* I18N: abbreviation for Friday */ I18N::translate('Fri'), + 5 => /* I18N: abbreviation for Saturday */ I18N::translate('Sat'), + 6 => /* I18N: abbreviation for Sunday */ I18N::translate('Sun'), ]; } diff --git a/app/Date/FrenchDate.php b/app/Date/FrenchDate.php index 76e7010f92..457d4cf4e3 100644 --- a/app/Date/FrenchDate.php +++ b/app/Date/FrenchDate.php @@ -194,16 +194,16 @@ class FrenchDate extends CalendarDate { if ($translated_day_names === null) { $translated_day_names = [ - 0 => /* I18N: The first day in the French republican calendar */ I18N::translate('Primidi'), - 1 => /* I18N: The second day in the French republican calendar */ I18N::translate('Duodi'), - 2 => /* I18N: The third day in the French republican calendar */ I18N::translate('Tridi'), - 3 => /* I18N: The fourth day in the French republican calendar */ I18N::translate('Quartidi'), - 4 => /* I18N: The fifth day in the French republican calendar */ I18N::translate('Quintidi'), - 5 => /* I18N: The sixth day in the French republican calendar */ I18N::translate('Sextidi'), - 6 => /* I18N: The seventh day in the French republican calendar */ I18N::translate('Septidi'), - 7 => /* I18N: The eighth day in the French republican calendar */ I18N::translate('Octidi'), - 8 => /* I18N: The ninth day in the French republican calendar */ I18N::translate('Nonidi'), - 9 => /* I18N: The tenth day in the French republican calendar */ I18N::translate('Decidi'), + 0 => /* I18N: The first day in the French republican calendar */ I18N::translate('Primidi'), + 1 => /* I18N: The second day in the French republican calendar */ I18N::translate('Duodi'), + 2 => /* I18N: The third day in the French republican calendar */ I18N::translate('Tridi'), + 3 => /* I18N: The fourth day in the French republican calendar */ I18N::translate('Quartidi'), + 4 => /* I18N: The fifth day in the French republican calendar */ I18N::translate('Quintidi'), + 5 => /* I18N: The sixth day in the French republican calendar */ I18N::translate('Sextidi'), + 6 => /* I18N: The seventh day in the French republican calendar */ I18N::translate('Septidi'), + 7 => /* I18N: The eighth day in the French republican calendar */ I18N::translate('Octidi'), + 8 => /* I18N: The ninth day in the French republican calendar */ I18N::translate('Nonidi'), + 9 => /* I18N: The tenth day in the French republican calendar */ I18N::translate('Decidi'), ]; } diff --git a/app/Filter.php b/app/Filter.php index 52b1188e34..a6f621f666 100644 --- a/app/Filter.php +++ b/app/Filter.php @@ -72,7 +72,7 @@ class Filter { // Create a minimal commonmark processor - just add support for autolinks. $environment = new Environment; $environment->mergeConfig([ - 'renderer' => [ + 'renderer' => [ 'block_separator' => "\n", 'inner_separator' => "\n", 'soft_break' => "\n", diff --git a/app/FontAwesome.php b/app/FontAwesome.php index 54463ae097..34d6df9fde 100644 --- a/app/FontAwesome.php +++ b/app/FontAwesome.php @@ -25,56 +25,56 @@ class FontAwesome extends Html { /** Which font-awesome icon to use for which action/entity */ const ICONS = [ // Application icons - 'add' => 'fa fa-plus wt-icon-add', - 'calendar' => 'fa fa-calendar wt-icon-calendar', - 'cancel' => 'fa fa-close wt-icon-cancel', - 'coordinates' => 'fa fa-map-marker wt-icon-coordinates', - 'copy' => 'fa fa-copy wt-icon-copy', - 'delete' => 'fa fa-trash-o wt-icon-delete', - 'download' => 'fa fa-download wt-icon-download', - 'drag-handle' => 'fa fa-bars wt-icon-drag-handle', - 'edit' => 'fa fa-pencil wt-icon-edit', - 'help' => 'fa fa-info-circle wt-icon-help', - 'email' => 'fa fa-envelope-o wt-icon-email', - 'keyboard' => 'fa fa-keyboard-o wt-icon-keyboard', - 'pin' => 'fa fa-thumb-tack wt-icon-pin', - 'preferences' => 'fa fa-wrench wt-icon-preferences', - 'search' => 'fa fa-search wt-icon-search', - 'save' => 'fa fa-check wt-icon-save', - 'sort' => 'fa fa-sort wt-icon-sort', - 'warning' => 'fa fa-warning wt-icon-warning', + 'add' => 'fa fa-plus wt-icon-add', + 'calendar' => 'fa fa-calendar wt-icon-calendar', + 'cancel' => 'fa fa-close wt-icon-cancel', + 'coordinates' => 'fa fa-map-marker wt-icon-coordinates', + 'copy' => 'fa fa-copy wt-icon-copy', + 'delete' => 'fa fa-trash-o wt-icon-delete', + 'download' => 'fa fa-download wt-icon-download', + 'drag-handle' => 'fa fa-bars wt-icon-drag-handle', + 'edit' => 'fa fa-pencil wt-icon-edit', + 'help' => 'fa fa-info-circle wt-icon-help', + 'email' => 'fa fa-envelope-o wt-icon-email', + 'keyboard' => 'fa fa-keyboard-o wt-icon-keyboard', + 'pin' => 'fa fa-thumb-tack wt-icon-pin', + 'preferences' => 'fa fa-wrench wt-icon-preferences', + 'search' => 'fa fa-search wt-icon-search', + 'save' => 'fa fa-check wt-icon-save', + 'sort' => 'fa fa-sort wt-icon-sort', + 'warning' => 'fa fa-warning wt-icon-warning', // Arrows (start/end variants require fontawesome-rtl library) - 'arrow-down' => 'fa fa-arrow-down wt-icon-arrow-down', - 'arrow-end' => 'fa fa-arrow-end wt-icon-arrow-end', - 'arrow-start' => 'fa fa-arrow-start wt-icon-arrow-start', - 'arrow-up' => 'fa fa-arrow-up wt-icon-arrow-up', + 'arrow-down' => 'fa fa-arrow-down wt-icon-arrow-down', + 'arrow-end' => 'fa fa-arrow-end wt-icon-arrow-end', + 'arrow-start' => 'fa fa-arrow-start wt-icon-arrow-start', + 'arrow-up' => 'fa fa-arrow-up wt-icon-arrow-up', // Modules - 'block' => 'fa fa-th-list wt-icon-block', - 'block-user' => 'fa fa-user wt-icon-block-user', - 'block-tree' => 'fa fa-tree wt-icon-block-tree', - 'chart' => 'fa fa-share-alt wt-icon-chart', - 'menu' => 'fa fa-list-ul wt-icon-menu', - 'report' => 'fa fa-file wt-icon-report', - 'sidebar' => 'fa fa-pause wt-icon-sidebar', - 'tab' => 'fa fa-folder wt-icon-tab', - 'theme' => 'fa fa-paint-brush wt-icon-theme', + 'block' => 'fa fa-th-list wt-icon-block', + 'block-user' => 'fa fa-user wt-icon-block-user', + 'block-tree' => 'fa fa-tree wt-icon-block-tree', + 'chart' => 'fa fa-share-alt wt-icon-chart', + 'menu' => 'fa fa-list-ul wt-icon-menu', + 'report' => 'fa fa-file wt-icon-report', + 'sidebar' => 'fa fa-pause wt-icon-sidebar', + 'tab' => 'fa fa-folder wt-icon-tab', + 'theme' => 'fa fa-paint-brush wt-icon-theme', // GEDCOM records - 'family' => 'fa fa-users wt-icon-family', - 'individual' => 'fa fa-user wt-icon-individual', - 'note' => 'fa fa-sticky-note-o wt-icon-note', - 'media' => 'fa fa-file-image-o wt-icon-media', - 'repository' => 'fa fa-institution wt-icon-repository', - 'source' => 'fa fa-file-text-o wt-icon-source', - 'submitter' => 'fa fa-user-o wt-icon-submitter', - 'upload' => 'fa fa-upload wt-icon-upload', + 'family' => 'fa fa-users wt-icon-family', + 'individual' => 'fa fa-user wt-icon-individual', + 'note' => 'fa fa-sticky-note-o wt-icon-note', + 'media' => 'fa fa-file-image-o wt-icon-media', + 'repository' => 'fa fa-institution wt-icon-repository', + 'source' => 'fa fa-file-text-o wt-icon-source', + 'submitter' => 'fa fa-user-o wt-icon-submitter', + 'upload' => 'fa fa-upload wt-icon-upload', // External sites and applications 'bing-maps' => 'fa fa-icon-map-o wt-icon-bing-maps', 'google-maps' => 'fa fa-icon-map-o wt-icon-google-maps', 'openstreetmap' => 'fa fa-icon-map-o wt-icon-openstreetmap', // Slideshow - 'media-play' => 'fa fa-play wt-icon-media-play', - 'media-stop' => 'fa fa-stop wt-icon-media-stop', - 'media-next' => 'fa fa-step-forward wt-icon-media-next', + 'media-play' => 'fa fa-play wt-icon-media-play', + 'media-stop' => 'fa fa-stop wt-icon-media-stop', + 'media-next' => 'fa fa-step-forward wt-icon-media-next', ]; /** @@ -123,7 +123,7 @@ class FontAwesome extends Html { * @return string */ public static function linkIcon($icon, $title, $attributes = []) { - $title = strip_tags($title); + $title = strip_tags($title); $attributes['aria-label'] = $title; return '' . self::decorativeIcon($icon, ['title' => $title]) . ''; diff --git a/app/Functions/Functions.php b/app/Functions/Functions.php index 1270a27f9d..a98f8efe9a 100644 --- a/app/Functions/Functions.php +++ b/app/Functions/Functions.php @@ -297,7 +297,7 @@ class Functions { $sibling_codes = ['M' => 'bro', 'F' => 'sis', 'U' => 'sib']; // Only examine each individual once - $visited= [ + $visited = [ $individual1->getXref() => true, ]; @@ -320,7 +320,7 @@ class Functions { $visited[$family->getXref()] = true; foreach ($family->getSpouses(Auth::PRIV_HIDE) as $spouse) { if (!isset($visited[$spouse->getXref()])) { - $new_path = $path; + $new_path = $path; $new_path['path'][] = $family; $new_path['path'][] = $spouse; $new_path['relations'][] = $parent_codes[$spouse->getSex()]; @@ -334,7 +334,7 @@ class Functions { } foreach ($family->getChildren(Auth::PRIV_HIDE) as $child) { if (!isset($visited[$child->getXref()])) { - $new_path = $path; + $new_path = $path; $new_path['path'][] = $family; $new_path['path'][] = $child; $new_path['relations'][] = $sibling_codes[$child->getSex()]; @@ -353,7 +353,7 @@ class Functions { $visited[$family->getXref()] = true; foreach ($family->getSpouses(Auth::PRIV_HIDE) as $spouse) { if (!isset($visited[$spouse->getXref()])) { - $new_path = $path; + $new_path = $path; $new_path['path'][] = $family; $new_path['path'][] = $spouse; $new_path['relations'][] = $spouse_codes[$spouse->getSex()]; @@ -367,7 +367,7 @@ class Functions { } foreach ($family->getChildren(Auth::PRIV_HIDE) as $child) { if (!isset($visited[$child->getXref()])) { - $new_path = $path; + $new_path = $path; $new_path['path'][] = $family; $new_path['path'][] = $child; $new_path['relations'][] = $child_codes[$child->getSex()]; diff --git a/app/Functions/FunctionsCharts.php b/app/Functions/FunctionsCharts.php index beda2645f5..1e6ad0c0df 100644 --- a/app/Functions/FunctionsCharts.php +++ b/app/Functions/FunctionsCharts.php @@ -112,7 +112,7 @@ class FunctionsCharts { $hfam = $husb->getPrimaryChildFamily(); if ($hfam) { // remove the|| test for $sosa - echo ''; + echo ''; echo ''; // husband’s father if ($hfam && $hfam->getHusband()) { @@ -202,7 +202,7 @@ class FunctionsCharts { // wife’s parents $hfam = $wife->getPrimaryChildFamily(); if ($hfam) { - echo ''; + echo ''; echo ''; // wife’s father if ($hfam && $hfam->getHusband()) { @@ -460,7 +460,7 @@ class FunctionsCharts { if ($kids) { echo ''; if ($kids > 1) { - echo ''; + echo ''; } $ctkids = count($fchildren); $i = 1; diff --git a/app/Functions/FunctionsEdit.php b/app/Functions/FunctionsEdit.php index ffdb9fbe3f..fb111c1d99 100644 --- a/app/Functions/FunctionsEdit.php +++ b/app/Functions/FunctionsEdit.php @@ -679,7 +679,7 @@ class FunctionsEdit { /** @var CensusAssistantModule $census_assistant */ $census_assistant = Module::getModuleByName('GEDFact_assistant'); - $record = Individual::getInstance($xref, $WT_TREE); + $record = Individual::getInstance($xref, $WT_TREE); if ($census_assistant !== null && $record instanceof Individual) { $html .= $census_assistant->createCensusAssistant($record); } @@ -712,7 +712,7 @@ class FunctionsEdit { $html .= self::inputAddonHelp('DATE'); $html .= ''; $html .= ''; - $html .= '

' . (new Date($value))->display() . '

'; + $html .= '

' . (new Date($value))->display() . '

'; } elseif ($fact === 'FAMC') { $html .= '
' . diff --git a/app/Functions/FunctionsExport.php b/app/Functions/FunctionsExport.php index 481211fe37..30188f7c6e 100644 --- a/app/Functions/FunctionsExport.php +++ b/app/Functions/FunctionsExport.php @@ -109,7 +109,7 @@ class FunctionsExport { // Preserve some values from the original header $record = GedcomRecord::getInstance('HEAD', $tree); - $fact = $record->getFirstFact('LANG'); + $fact = $record->getFirstFact('LANG'); if ($fact instanceof Fact) { $LANG = $fact->getValue(); } diff --git a/app/Functions/FunctionsPrint.php b/app/Functions/FunctionsPrint.php index 541813b962..1825d37f53 100644 --- a/app/Functions/FunctionsPrint.php +++ b/app/Functions/FunctionsPrint.php @@ -74,7 +74,7 @@ class FunctionsPrint { if (preg_match('/^0 @(' . WT_REGEX_XREF . ')@ NOTE/', $nrec, $match)) { $note = Note::getInstance($match[1], $WT_TREE); $label = 'SHARED_NOTE'; - $html = Filter::formatText($note->getNote(), $WT_TREE); + $html = Filter::formatText($note->getNote(), $WT_TREE); } else { $note = null; $label = 'NOTE'; @@ -177,7 +177,7 @@ class FunctionsPrint { */ public static function helpLink($help_topic) { $title = ''; - $text = ''; + $text = ''; require 'help_text.php'; return @@ -559,9 +559,9 @@ class FunctionsPrint { $quickfacts = preg_split('/[, ;:]+/', $WT_TREE->getPreference('REPO_FACTS_QUICK'), -1, PREG_SPLIT_NO_EMPTY); break; case 'OBJE': - $addfacts = ['NOTE']; + $addfacts = ['NOTE']; $uniquefacts = ['_PRIM']; - $quickfacts = []; + $quickfacts = []; break; default: return; diff --git a/app/Functions/FunctionsPrintLists.php b/app/Functions/FunctionsPrintLists.php index b296ba1257..782811085b 100644 --- a/app/Functions/FunctionsPrintLists.php +++ b/app/Functions/FunctionsPrintLists.php @@ -320,8 +320,8 @@ class FunctionsPrintLists { $title = 'title="' . strip_tags(GedcomTag::getLabel($name['type'], $individual)) . '"'; } if ($num == $individual->getPrimaryName()) { - $class = ' class="name2"'; - $sex_image = $individual->getSexImage(); + $class = ' class="name2"'; + $sex_image = $individual->getSexImage(); } else { $class = ''; $sex_image = ''; @@ -740,8 +740,8 @@ class FunctionsPrintLists { $title = 'title="' . strip_tags(GedcomTag::getLabel($name['type'], $husb)) . '"'; } if ($num == $husb->getPrimaryName()) { - $class = ' class="name2"'; - $sex_image = $husb->getSexImage(); + $class = ' class="name2"'; + $sex_image = $husb->getSexImage(); } else { $class = ''; $sex_image = ''; @@ -783,8 +783,8 @@ class FunctionsPrintLists { $title = 'title="' . strip_tags(GedcomTag::getLabel($name['type'], $wife)) . '"'; } if ($num == $wife->getPrimaryName()) { - $class = ' class="name2"'; - $sex_image = $wife->getSexImage(); + $class = ' class="name2"'; + $sex_image = $wife->getSexImage(); } else { $class = ''; $sex_image = ''; @@ -1045,7 +1045,7 @@ class FunctionsPrintLists { "SELECT CONCAT(l_to, '@', l_file), COUNT(*) FROM `##sources` JOIN `##link` ON l_from = s_id AND l_file = s_file AND l_type = 'NOTE' GROUP BY l_to, l_file" )->fetchAssoc(); - $html = ''; + $html = ''; $html .= '
'; $html .= ''; $html .= ''; diff --git a/app/I18N.php b/app/I18N.php index 285f93d12a..f73dcd7bd5 100644 --- a/app/I18N.php +++ b/app/I18N.php @@ -75,24 +75,24 @@ class I18N { // Characters that are displayed in mirror form in RTL text. const MIRROR_CHARACTERS = [ - '(' => ')', - ')' => '(', - '[' => ']', - ']' => '[', - '{' => '}', - '}' => '{', - '<' => '>', - '>' => '<', - '‹' => '›', - '›' => '‹', - '«' => '»', - '»' => '«', - '﴾' => '﴿', - '﴿' => '﴾', - '“' => '”', - '”' => '“', - '‘' => '’', - '’' => '‘', + '(' => ')', + ')' => '(', + '[' => ']', + ']' => '[', + '{' => '}', + '}' => '{', + '<' => '>', + '>' => '<', + '‹ ' => '›', + '› ' => '‹', + '«' => '»', + '»' => '«', + '﴾ ' => '﴿', + '﴿ ' => '﴾', + '“ ' => '”', + '” ' => '“', + '‘ ' => '’', + '’ ' => '‘', ]; // Default list of locales to show in the menu. diff --git a/app/Media.php b/app/Media.php index 7de970f77a..48b176b1e9 100644 --- a/app/Media.php +++ b/app/Media.php @@ -218,10 +218,10 @@ class Media extends GedcomRecord { $imgsize = getimagesize($this->getServerFilename()); if (is_array($imgsize) && !empty($imgsize['0'])) { // this is an image - $imageTypes = ['', 'GIF', 'JPG', 'PNG', 'SWF', 'PSD', 'BMP', 'TIFF', 'TIFF', 'JPC', 'JP2', 'JPX', 'JB2', 'SWC', 'IFF', 'WBMP', 'XBM']; - $imgsize['ext'] = $imageTypes[0 + $imgsize[2]]; + $imageTypes = ['', 'GIF', 'JPG', 'PNG', 'SWF', 'PSD', 'BMP', 'TIFF', 'TIFF', 'JPC', 'JP2', 'JPX', 'JB2', 'SWC', 'IFF', 'WBMP', 'XBM']; + $imgsize['ext'] = $imageTypes[0 + $imgsize[2]]; // this is for display purposes, always show non-adjusted info - $imgsize['WxH'] = /* I18N: image dimensions, width × height */ + $imgsize['WxH'] = /* I18N: image dimensions, width × height */ I18N::translate('%1$s × %2$s pixels', I18N::number($imgsize['0']), I18N::number($imgsize['1'])); } } catch (\ErrorException $ex) { @@ -232,11 +232,11 @@ class Media extends GedcomRecord { if (!is_array($imgsize) || empty($imgsize['0'])) { // this is not an image, OR the file doesn’t exist OR it is a url - $imgsize[0] = 0; - $imgsize[1] = 0; - $imgsize['ext'] = ''; - $imgsize['mime'] = ''; - $imgsize['WxH'] = ''; + $imgsize[0] = 0; + $imgsize[1] = 0; + $imgsize['ext'] = ''; + $imgsize['mime'] = ''; + $imgsize['WxH'] = ''; } if (empty($imgsize['mime'])) { diff --git a/app/Module.php b/app/Module.php index f42536b587..e208a92b07 100644 --- a/app/Module.php +++ b/app/Module.php @@ -236,7 +236,7 @@ class Module { " FROM `##module`" . " ORDER BY CASE :component WHEN 'menu' THEN menu_order WHEN 'sidebar' THEN sidebar_order WHEN 'tab' THEN tab_order ELSE 0 END, module_name" )->execute([ - 'component' => $component, + 'component' => $component, ])->fetchOneColumn(); $array = []; diff --git a/app/Module/BatchUpdateModule.php b/app/Module/BatchUpdateModule.php index cb7ea3a1de..df551c793d 100644 --- a/app/Module/BatchUpdateModule.php +++ b/app/Module/BatchUpdateModule.php @@ -188,7 +188,7 @@ class BatchUpdateModule extends AbstractModule implements ModuleConfigInterface echo $this->getJavascript(); echo Bootstrap4::breadcrumbs([ - 'admin.php' => I18N::translate('Control panel'), + 'admin.php' => I18N::translate('Control panel'), 'admin_modules.php' => I18N::translate('Module administration'), ], $controller->getPageTitle()); ?> @@ -337,8 +337,7 @@ class BatchUpdateModule extends AbstractModule implements ModuleConfigInterface break; } } - $this->all_xrefs = - Database::prepare(implode(' UNION ', $sql) . ' ORDER BY 1 ASC') + $this->all_xrefs = Database::prepare(implode(' UNION ', $sql) . ' ORDER BY 1 ASC') ->execute($vars) ->fetchAssoc(); } diff --git a/app/Module/ChartsBlockModule.php b/app/Module/ChartsBlockModule.php index 5e4937d61d..7101112a34 100755 --- a/app/Module/ChartsBlockModule.php +++ b/app/Module/ChartsBlockModule.php @@ -56,8 +56,8 @@ class ChartsBlockModule extends AbstractModule implements ModuleBlockInterface { $PEDIGREE_ROOT_ID = $WT_TREE->getPreference('PEDIGREE_ROOT_ID'); $gedcomid = $WT_TREE->getUserPreference(Auth::user(), 'gedcomid'); - $type = $this->getBlockSetting($block_id, 'type', 'pedigree'); - $pid = $this->getBlockSetting($block_id, 'pid', Auth::check() ? ($gedcomid ? $gedcomid : $PEDIGREE_ROOT_ID) : $PEDIGREE_ROOT_ID); + $type = $this->getBlockSetting($block_id, 'type', 'pedigree'); + $pid = $this->getBlockSetting($block_id, 'pid', Auth::check() ? ($gedcomid ? $gedcomid : $PEDIGREE_ROOT_ID) : $PEDIGREE_ROOT_ID); foreach (['type', 'pid'] as $name) { if (array_key_exists($name, $cfg)) { @@ -78,7 +78,7 @@ class ChartsBlockModule extends AbstractModule implements ModuleBlockInterface { $content = ''; switch ($type) { case 'pedigree': - $title = I18N::translate('Pedigree of %s', $person->getFullName()); + $title = I18N::translate('Pedigree of %s', $person->getFullName()); $chartController = new HourglassController($person->getXref()); $controller->addInlineJavascript($chartController->setupJavascript()); $content .= '
' . I18N::translate('Title') . '' . I18N::translate('Individuals') . '
'; @@ -95,7 +95,7 @@ class ChartsBlockModule extends AbstractModule implements ModuleBlockInterface { $content .= '
'; break; case 'descendants': - $title = I18N::translate('Descendants of %s', $person->getFullName()); + $title = I18N::translate('Descendants of %s', $person->getFullName()); $chartController = new HourglassController($person->getXref()); $controller->addInlineJavascript($chartController->setupJavascript()); ob_start(); @@ -103,7 +103,7 @@ class ChartsBlockModule extends AbstractModule implements ModuleBlockInterface { $content .= ob_get_clean(); break; case 'hourglass': - $title = I18N::translate('Hourglass chart of %s', $person->getFullName()); + $title = I18N::translate('Hourglass chart of %s', $person->getFullName()); $chartController = new HourglassController($person->getXref()); $controller->addInlineJavascript($chartController->setupJavascript()); $content .= ''; @@ -121,8 +121,8 @@ class ChartsBlockModule extends AbstractModule implements ModuleBlockInterface { break; case 'treenav': $title = I18N::translate('Interactive tree of %s', $person->getFullName()); - $mod = new InteractiveTreeModule(WT_MODULES_DIR . 'tree'); - $tv = new TreeView; + $mod = new InteractiveTreeModule(WT_MODULES_DIR . 'tree'); + $tv = new TreeView; $content .= ''; $content .= ''; list($html, $js) = $tv->drawViewport($person, 2); @@ -183,8 +183,8 @@ class ChartsBlockModule extends AbstractModule implements ModuleBlockInterface { $this->setBlockSetting($block_id, 'pid', Filter::post('pid', WT_REGEX_XREF)); } - $type = $this->getBlockSetting($block_id, 'type', 'pedigree'); - $pid = $this->getBlockSetting($block_id, 'pid', Auth::check() ? ($gedcomid ? $gedcomid : $PEDIGREE_ROOT_ID) : $PEDIGREE_ROOT_ID); + $type = $this->getBlockSetting($block_id, 'type', 'pedigree'); + $pid = $this->getBlockSetting($block_id, 'pid', Auth::check() ? ($gedcomid ? $gedcomid : $PEDIGREE_ROOT_ID) : $PEDIGREE_ROOT_ID); $charts = [ 'pedigree' => I18N::translate('Pedigree'), diff --git a/app/Module/ClippingsCart/ClippingsCartController.php b/app/Module/ClippingsCart/ClippingsCartController.php index 8df2495801..2a885f7189 100644 --- a/app/Module/ClippingsCart/ClippingsCartController.php +++ b/app/Module/ClippingsCart/ClippingsCartController.php @@ -161,7 +161,7 @@ class ClippingsCartController { $this->cart[$WT_TREE->getTreeId()] = []; } elseif ($this->action === 'download') { // Create a new/empty .ZIP file - $temp_zip_file = tempnam(sys_get_temp_dir(), 'webtrees-zip-'); + $temp_zip_file = tempnam(sys_get_temp_dir(), 'webtrees-zip-'); $zip_filesystem = new Filesystem(new ZipArchiveAdapter($temp_zip_file)); // Media file prefix diff --git a/app/Module/FrequentlyAskedQuestionsModule.php b/app/Module/FrequentlyAskedQuestionsModule.php index e832e24d9c..e8a4d00c57 100644 --- a/app/Module/FrequentlyAskedQuestionsModule.php +++ b/app/Module/FrequentlyAskedQuestionsModule.php @@ -144,7 +144,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen $block_order = Database::prepare( "SELECT block_order FROM `##block` WHERE block_id = :block_id" )->execute(['block_id' => $block_id])->fetchOne(); - $gedcom_id = Database::prepare( + $gedcom_id = Database::prepare( "SELECT gedcom_id FROM `##block` WHERE block_id = :block_id" )->execute(['block_id' => $block_id])->fetchOne(); } else { @@ -154,7 +154,7 @@ class FrequentlyAskedQuestionsModule extends AbstractModule implements ModuleMen $block_order = Database::prepare( "SELECT IFNULL(MAX(block_order)+1, 0) FROM `##block` WHERE module_name = :module_name" )->execute(['module_name' => $this->getName()])->fetchOne(); - $gedcom_id = $WT_TREE->getTreeId(); + $gedcom_id = $WT_TREE->getTreeId(); } $controller->pageHeader(); if (Module::getModuleByName('ckeditor')) { diff --git a/app/Module/GoogleMapsModule.php b/app/Module/GoogleMapsModule.php index 1429b2d244..5242b4a594 100644 --- a/app/Module/GoogleMapsModule.php +++ b/app/Module/GoogleMapsModule.php @@ -1203,14 +1203,14 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface, $result = [ 'index' => 'ID' . $match1[1] . $match2[1], 'mapdata' => [ - 'class' => 'optionbox', - 'place' => $fact->getPlace()->getFullName(), - 'tooltip' => $fact->getPlace()->getGedcomName(), - 'lat' => strtr($match1[1], ['N' => '', 'S' => '-', ',' => '.']), - 'lng' => strtr($match2[1], ['E' => '', 'W' => '-', ',' => '.']), - 'pl_icon' => '', - 'pl_zoom' => '0', - 'events' => '', + 'class' => 'optionbox', + 'place' => $fact->getPlace()->getFullName(), + 'tooltip' => $fact->getPlace()->getGedcomName(), + 'lat' => strtr($match1[1], ['N' => '', 'S' => '-', ',' => '.']), + 'lng' => strtr($match2[1], ['E' => '', 'W' => '-', ',' => '.']), + 'pl_icon' => '', + 'pl_zoom' => '0', + 'events' => '', ], ]; } else { @@ -1219,14 +1219,14 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface, $result = [ 'index' => 'ID' . $place_location->pl_lati . $place_location->pl_long, 'mapdata' => [ - 'class' => 'optionbox', - 'place' => $fact->getPlace()->getFullName(), - 'tooltip' => $fact->getPlace()->getGedcomName(), - 'lat' => strtr($place_location->pl_lati, ['N' => '', 'S' => '-', ',' => '.']), - 'lng' => strtr($place_location->pl_long, ['E' => '', 'W' => '-', ',' => '.']), - 'pl_icon' => $place_location->pl_icon, - 'pl_zoom' => $place_location->pl_zoom, - 'events' => '', + 'class' => 'optionbox', + 'place' => $fact->getPlace()->getFullName(), + 'tooltip' => $fact->getPlace()->getGedcomName(), + 'lat' => strtr($place_location->pl_lati, ['N' => '', 'S' => '-', ',' => '.']), + 'lng' => strtr($place_location->pl_long, ['E' => '', 'W' => '-', ',' => '.']), + 'pl_icon' => $place_location->pl_icon, + 'pl_zoom' => $place_location->pl_zoom, + 'events' => '', ], ]; } @@ -2130,9 +2130,9 @@ class GoogleMapsModule extends AbstractModule implements ModuleConfigInterface, ->pageHeader(); echo Bootstrap4::breadcrumbs([ - 'admin.php' => I18N::translate('Control panel'), - 'admin_modules.php' => I18N::translate('Module administration'), - $this->getConfigLink() => $this->getTitle(), + 'admin.php' => I18N::translate('Control panel'), + 'admin_modules.php' => I18N::translate('Module administration'), + $this->getConfigLink() => $this->getTitle(), 'module.php?mod=googlemap&mod_action=admin_places' => I18N::translate('Geographic data'), ], $controller->getPageTitle()); diff --git a/app/Module/HtmlBlockModule.php b/app/Module/HtmlBlockModule.php index 4f9b621174..ade04049b6 100644 --- a/app/Module/HtmlBlockModule.php +++ b/app/Module/HtmlBlockModule.php @@ -154,15 +154,11 @@ class HtmlBlockModule extends AbstractModule implements ModuleBlockInterface { } $templates = [ - I18N::translate('Keyword examples') => - '#getAllTagsTable#', + I18N::translate('Keyword examples') => '#getAllTagsTable#', - I18N::translate('Narrative description') => - /* I18N: do not translate the #keywords# */ - I18N::translate('This family tree was last updated on #gedcomUpdated#. There are #totalSurnames# surnames in this family tree. The earliest recorded event is the #firstEventType# of #firstEventName# in #firstEventYear#. The most recent event is the #lastEventType# of #lastEventName# in #lastEventYear#.

If you have any comments or feedback please contact #contactWebmaster#.'), + I18N::translate('Narrative description') => /* I18N: do not translate the #keywords# */ I18N::translate('This family tree was last updated on #gedcomUpdated#. There are #totalSurnames# surnames in this family tree. The earliest recorded event is the #firstEventType# of #firstEventName# in #firstEventYear#. The most recent event is the #lastEventType# of #lastEventName# in #lastEventYear#.

If you have any comments or feedback please contact #contactWebmaster#.'), - I18N::translate('Statistics') => - '
+ I18N::translate('Statistics') => '
#gedcomTitle#
' . I18N::translate('This family tree was last updated on %s.', '#gedcomUpdated#') . '
diff --git a/app/Module/RecentChangesModule.php b/app/Module/RecentChangesModule.php index e9cb0109c5..b07f3e8edc 100755 --- a/app/Module/RecentChangesModule.php +++ b/app/Module/RecentChangesModule.php @@ -56,10 +56,10 @@ class RecentChangesModule extends AbstractModule implements ModuleBlockInterface public function getBlock($block_id, $template = true, $cfg = []) { global $ctype, $WT_TREE; - $days = $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); - $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_INFO_STYLE); - $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', self::DEFAULT_SORT_STYLE); - $show_user = $this->getBlockSetting($block_id, 'show_user', self::DEFAULT_SHOW_USER); + $days = $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); + $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_INFO_STYLE); + $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', self::DEFAULT_SORT_STYLE); + $show_user = $this->getBlockSetting($block_id, 'show_user', self::DEFAULT_SHOW_USER); foreach (['days', 'infoStyle', 'sortStyle', 'show_user'] as $name) { if (array_key_exists($name, $cfg)) { @@ -127,10 +127,10 @@ class RecentChangesModule extends AbstractModule implements ModuleBlockInterface $this->setBlockSetting($block_id, 'show_user', Filter::postBool('show_user')); } - $days = $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); - $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_INFO_STYLE); - $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', self::DEFAULT_SORT_STYLE); - $show_user = $this->getBlockSetting($block_id, 'show_user', self::DEFAULT_SHOW_USER); + $days = $this->getBlockSetting($block_id, 'days', self::DEFAULT_DAYS); + $infoStyle = $this->getBlockSetting($block_id, 'infoStyle', self::DEFAULT_INFO_STYLE); + $sortStyle = $this->getBlockSetting($block_id, 'sortStyle', self::DEFAULT_SORT_STYLE); + $show_user = $this->getBlockSetting($block_id, 'show_user', self::DEFAULT_SHOW_USER); echo '