diff options
| author | Greg Roach <fisharebest@gmail.com> | 2017-11-03 12:12:31 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2017-11-03 12:12:50 +0000 |
| commit | 0fd39724ec01f9f77115641c88ab7da1a4b09227 (patch) | |
| tree | c4dd113cffd7a8be7e851858917d176f28470e97 | |
| parent | 17319d0adba30d5333e0fee0a7e5140d5c78c1e2 (diff) | |
| download | webtrees-0fd39724ec01f9f77115641c88ab7da1a4b09227.tar.gz webtrees-0fd39724ec01f9f77115641c88ab7da1a4b09227.tar.bz2 webtrees-0fd39724ec01f9f77115641c88ab7da1a4b09227.zip | |
CodeStyle - spacing/alignment
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 '<p>pgv_users => wt_user_gedcom_setting…</p>'; - $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 = '<span dir="ltr">' . $latest_version . '</span>'; // 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 = '<i class="icon-yes"></i>'; -$icon_failure = '<i class="icon-failure"></i>'; +$icon_success = '<i class="icon-yes"></i>'; +$icon_failure = '<i class="icon-failure"></i>'; // 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) . ' <a href="' . $php_support_url . '">' . $php_support_url . '</a>'; } 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) . ' <a href="' . $php_support_url . '">' . $php_support_url . '</a>'; 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 '<td class="align-bottom">', - '<img id="vline_', $child->getXref(), '" src="', Theme::theme()->parameter('image-vline'), '" width="3" height="', $h -4, '"></td>'; + '<img id="vline_', $child->getXref(), '" src="', Theme::theme()->parameter('image-vline'), '" width="3" height="', $h - 4, '"></td>'; } 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 '<td class="align-top">', - '<img class="bvertline" width="3" id="vline_', $child->getXref(), '" src="', Theme::theme()->parameter('image-vline'), '" height="', $h -2, '"></td>'; + '<img class="bvertline" width="3" id="vline_', $child->getXref(), '" src="', Theme::theme()->parameter('image-vline'), '" height="', $h - 2, '"></td>'; } else { echo '<td class="align-bottomm"style="background: url(', Theme::theme()->parameter('image-vline'), ');">', '<img class="spacer" width="3" src="', Theme::theme()->parameter('image-spacer'), '"></td>'; 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[] = '<tr><td>' . $stack . '</td><td>' . $query . '</td><td>' . $rows . '</td><td>' . $milliseconds . '</td></tr>'; + self::$log[] = '<tr><td>' . $stack . '</td><td>' . $query . '</td><td>' . $rows . '</td><td>' . $milliseconds . '</td></tr>'; } /** 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 '<a ' . self::attributes($attributes) . '>' . self::decorativeIcon($icon, ['title' => $title]) . '</a>'; 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 '<td rowspan="2"><img src="' . Theme::theme()->parameter('image-hline') . '"></td><td rowspan="2"><img src="' . Theme::theme()->parameter('image-vline') . '" width="3" height="' . ($pbheight -14 ) . '"></td>'; + echo '<td rowspan="2"><img src="' . Theme::theme()->parameter('image-hline') . '"></td><td rowspan="2"><img src="' . Theme::theme()->parameter('image-vline') . '" width="3" height="' . ($pbheight - 14 ) . '"></td>'; echo '<td><img class="linea1 lined1" src="' . Theme::theme()->parameter('image-hline') . '"></td><td>'; // husband’s father if ($hfam && $hfam->getHusband()) { @@ -202,7 +202,7 @@ class FunctionsCharts { // wife’s parents $hfam = $wife->getPrimaryChildFamily(); if ($hfam) { - echo '<td rowspan="2"><img src="' . Theme::theme()->parameter('image-hline') . '"></td><td rowspan="2"><img src="' . Theme::theme()->parameter('image-vline') . '" width="3" height="' . ($pbheight -14 ) . '"></td>'; + echo '<td rowspan="2"><img src="' . Theme::theme()->parameter('image-hline') . '"></td><td rowspan="2"><img src="' . Theme::theme()->parameter('image-vline') . '" width="3" height="' . ($pbheight - 14 ) . '"></td>'; echo '<td><img class="linea3 lined3" src="' . Theme::theme()->parameter('image-hline') . '"></td><td>'; // wife’s father if ($hfam && $hfam->getHusband()) { @@ -460,7 +460,7 @@ class FunctionsCharts { if ($kids) { echo '<table cellspacing="0" cellpadding="0" border="0" ><tr>'; if ($kids > 1) { - echo '<td rowspan="', $kids, '"><img width="3px" height="', (($bheight) * ($kids -1)), 'px" src="', Theme::theme()->parameter('image-vline'), '"></td>'; + echo '<td rowspan="', $kids, '"><img width="3px" height="', (($bheight) * ($kids - 1)), 'px" src="', Theme::theme()->parameter('image-vline'), '"></td>'; } $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 .= '</div>'; $html .= '<div id="caldiv' . $id . '" style="position:absolute;visibility:hidden;background-color:white;z-index:1000"></div>'; - $html .= '<p class="text-muted">' . (new Date($value))->display() . '</p>'; + $html .= '<p class="text-muted">' . (new Date($value))->display() . '</p>'; } elseif ($fact === 'FAMC') { $html .= '<div class="input-group">' . 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 .= '<table ' . Datatables::noteTableAttributes() . '><thead><tr>'; $html .= '<th>' . I18N::translate('Title') . '</th>'; $html .= '<th>' . I18N::translate('Individuals') . '</th>'; 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 .= '<table cellspacing="0" cellpadding="0" border="0"><tr>'; @@ -95,7 +95,7 @@ class ChartsBlockModule extends AbstractModule implements ModuleBlockInterface { $content .= '</tr></table>'; 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 .= '<table cellspacing="0" cellpadding="0" border="0"><tr>'; @@ -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 .= '<script>$("head").append(\'<link rel="stylesheet" href="' . $mod->css() . '" type="text/css" />\');</script>'; $content .= '<script src="' . $mod->js() . '"></script>'; 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#.<br><br>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#.<br><br>If you have any comments or feedback please contact #contactWebmaster#.'), - I18N::translate('Statistics') => - '<div class="gedcom_stats"> + I18N::translate('Statistics') => '<div class="gedcom_stats"> <span style="font-weight: bold;"><a href="index.php?command=gedcom">#gedcomTitle#</a></span><br> ' . I18N::translate('This family tree was last updated on %s.', '#gedcomUpdated#') . ' <div class="row"> 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 '<div class="form-group row"><label class="col-sm-3 col-form-label" for="days">'; echo I18N::translate('Number of days to show'); diff --git a/app/Module/StoriesModule.php b/app/Module/StoriesModule.php index 57507e51b1..18db06efac 100644 --- a/app/Module/StoriesModule.php +++ b/app/Module/StoriesModule.php @@ -209,8 +209,8 @@ class StoriesModule extends AbstractModule implements ModuleTabInterface, Module $individual = Individual::getInstance($xref, $WT_TREE); echo Bootstrap4::breadcrumbs([ - 'admin.php' => I18N::translate('Control panel'), - 'admin_modules.php' => I18N::translate('Module administration'), + 'admin.php' => I18N::translate('Control panel'), + 'admin_modules.php' => I18N::translate('Module administration'), 'module.php?mod=' . $this->getName() . '&mod_action=admin_config' => $this->getTitle(), ], $controller->getPageTitle()); ?> diff --git a/app/Module/ThemeSelectModule.php b/app/Module/ThemeSelectModule.php index a24152bec7..4ab954e6c8 100644 --- a/app/Module/ThemeSelectModule.php +++ b/app/Module/ThemeSelectModule.php @@ -43,7 +43,7 @@ class ThemeSelectModule extends AbstractModule implements ModuleBlockInterface { * @return string */ public function getBlock($block_id, $template = true, $cfg = []) { - $menu = Theme::theme()->menuThemes(); + $menu = Theme::theme()->menuThemes(); if ($menu) { $content = '<ul class="nav text-justify">' . $menu->bootstrap4() . '</ul>'; diff --git a/app/Module/YahrzeitModule.php b/app/Module/YahrzeitModule.php index 63e781b4e4..624b385be5 100755 --- a/app/Module/YahrzeitModule.php +++ b/app/Module/YahrzeitModule.php @@ -272,7 +272,7 @@ class YahrzeitModule extends AbstractModule implements ModuleBlockInterface { echo '<div class="form-group row"><label class="col-sm-3 col-form-label" for="calendar">'; echo I18N::translate('Calendar'); echo '</label><div class="col-sm-9">'; - echo Bootstrap4::select(['jewish' => I18N::translate('Jewish'), 'gregorian' => I18N::translate('Gregorian')], $calendar, ['id' => 'calendar', 'name' => 'calendar']); + echo Bootstrap4::select(['jewish' => I18N::translate('Jewish'), 'gregorian' => I18N::translate('Gregorian')], $calendar, ['id' => 'calendar', 'name' => 'calendar']); echo '</div></div>'; } } diff --git a/app/Report/ReportParserGenerate.php b/app/Report/ReportParserGenerate.php index 275fceea84..56a62d12cc 100644 --- a/app/Report/ReportParserGenerate.php +++ b/app/Report/ReportParserGenerate.php @@ -354,9 +354,9 @@ class ReportParserGenerate extends ReportParserBase { * XML <pageHeaderEndHandler> */ private function pageHeaderEndHandler() { - $this->print_data = array_pop($this->print_data_stack); - $this->current_element = $this->wt_report; - $this->wt_report = array_pop($this->wt_report_stack); + $this->print_data = array_pop($this->print_data_stack); + $this->current_element = $this->wt_report; + $this->wt_report = array_pop($this->wt_report_stack); $this->wt_report->addElement($this->current_element); } @@ -1187,8 +1187,8 @@ class ReportParserGenerate extends ReportParserBase { if (empty($attrs['diff']) && !empty($id)) { $facts = $record->getFacts(); Functions::sortFacts($facts); - $this->repeats = []; - $nonfacts = explode(',', $tag); + $this->repeats = []; + $nonfacts = explode(',', $tag); foreach ($facts as $event) { if (!in_array($event->getTag(), $nonfacts)) { $this->repeats[] = $event->getGedcom(); diff --git a/app/Select2.php b/app/Select2.php index 20a81b5b01..45aef26737 100644 --- a/app/Select2.php +++ b/app/Select2.php @@ -403,7 +403,7 @@ class Select2 extends Html { if ($place_name === $query) { $found = true; } - $results[] = [ + $results[] = [ 'id' => $place_name, 'text' => $place_name, ]; @@ -438,7 +438,7 @@ class Select2 extends Html { if ($place_name === $query) { $found = true; } - $results[] = [ + $results[] = [ 'id' => $place_name, 'text' => $place_name, ]; diff --git a/app/Soundex.php b/app/Soundex.php index c41b5ca436..9c2eb43be0 100644 --- a/app/Soundex.php +++ b/app/Soundex.php @@ -175,18 +175,18 @@ class Soundex { 'Å' => ['1', '0', '', ''], 'Ă' => ['1', '0', '', ''], 'Ą' => ['1', '', '', '', '', '', '6'], - 'Ạ' => ['1', '0', '', ''], - 'Ả' => ['1', '0', '', ''], - 'Ấ' => ['1', '0', '', ''], - 'Ầ' => ['1', '0', '', ''], - 'Ẩ' => ['1', '0', '', ''], - 'Ẫ' => ['1', '0', '', ''], - 'Ậ' => ['1', '0', '', ''], - 'Ắ' => ['1', '0', '', ''], - 'Ằ' => ['1', '0', '', ''], - 'Ẳ' => ['1', '0', '', ''], - 'Ẵ' => ['1', '0', '', ''], - 'Ặ' => ['1', '0', '', ''], + 'Ạ ' => ['1', '0', '', ''], + 'Ả ' => ['1', '0', '', ''], + 'Ấ ' => ['1', '0', '', ''], + 'Ầ ' => ['1', '0', '', ''], + 'Ẩ ' => ['1', '0', '', ''], + 'Ẫ ' => ['1', '0', '', ''], + 'Ậ ' => ['1', '0', '', ''], + 'Ắ ' => ['1', '0', '', ''], + 'Ằ ' => ['1', '0', '', ''], + 'Ẳ ' => ['1', '0', '', ''], + 'Ẵ ' => ['1', '0', '', ''], + 'Ặ ' => ['1', '0', '', ''], 'AE' => ['1', '0', '1', ''], 'Æ' => ['1', '0', '1', ''], 'AI' => ['1', '0', '1', ''], @@ -232,14 +232,14 @@ class Soundex { 'Ĕ' => ['1', '0', '', ''], 'Ė' => ['1', '0', '', ''], 'Ę' => ['1', '', '', '6', '', '', ''], - 'Ẹ' => ['1', '0', '', ''], - 'Ẻ' => ['1', '0', '', ''], - 'Ẽ' => ['1', '0', '', ''], - 'Ế' => ['1', '0', '', ''], - 'Ề' => ['1', '0', '', ''], - 'Ể' => ['1', '0', '', ''], - 'Ễ' => ['1', '0', '', ''], - 'Ệ' => ['1', '0', '', ''], + 'Ẹ ' => ['1', '0', '', ''], + 'Ẻ ' => ['1', '0', '', ''], + 'Ẽ ' => ['1', '0', '', ''], + 'Ế ' => ['1', '0', '', ''], + 'Ề ' => ['1', '0', '', ''], + 'Ể ' => ['1', '0', '', ''], + 'Ễ ' => ['1', '0', '', ''], + 'Ệ ' => ['1', '0', '', ''], 'EAU' => ['1', '0', '', ''], 'EI' => ['1', '0', '1', ''], 'EJ' => ['1', '0', '1', ''], @@ -260,8 +260,8 @@ class Soundex { 'Ĩ' => ['1', '0', '', ''], 'Į' => ['1', '0', '', ''], 'İ' => ['1', '0', '', ''], - 'Ỉ' => ['1', '0', '', ''], - 'Ị' => ['1', '0', '', ''], + 'Ỉ ' => ['1', '0', '', ''], + 'Ị ' => ['1', '0', '', ''], 'IA' => ['1', '1', '', ''], 'IE' => ['1', '1', '', ''], 'IO' => ['1', '1', '', ''], @@ -295,18 +295,18 @@ class Soundex { 'Ő' => ['1', '0', '', ''], 'Œ' => ['1', '0', '', ''], 'Ơ' => ['1', '0', '', ''], - 'Ọ' => ['1', '0', '', ''], - 'Ỏ' => ['1', '0', '', ''], - 'Ố' => ['1', '0', '', ''], - 'Ồ' => ['1', '0', '', ''], - 'Ổ' => ['1', '0', '', ''], - 'Ỗ' => ['1', '0', '', ''], - 'Ộ' => ['1', '0', '', ''], - 'Ớ' => ['1', '0', '', ''], - 'Ờ' => ['1', '0', '', ''], - 'Ở' => ['1', '0', '', ''], - 'Ỡ' => ['1', '0', '', ''], - 'Ợ' => ['1', '0', '', ''], + 'Ọ ' => ['1', '0', '', ''], + 'Ỏ ' => ['1', '0', '', ''], + 'Ố ' => ['1', '0', '', ''], + 'Ồ ' => ['1', '0', '', ''], + 'Ổ ' => ['1', '0', '', ''], + 'Ỗ ' => ['1', '0', '', ''], + 'Ộ ' => ['1', '0', '', ''], + 'Ớ ' => ['1', '0', '', ''], + 'Ờ ' => ['1', '0', '', ''], + 'Ở ' => ['1', '0', '', ''], + 'Ỡ ' => ['1', '0', '', ''], + 'Ợ ' => ['1', '0', '', ''], 'OE' => ['1', '0', '', ''], 'OI' => ['1', '0', '1', ''], 'OJ' => ['1', '0', '1', ''], @@ -325,7 +325,7 @@ class Soundex { 'Š' => ['0', '4', '4', '4'], 'Ş' => ['0', '4', '4', '4'], 'SC' => ['0', '2', '4', '4'], - 'ŠČ' => ['0', '2', '4', '4'], + 'ŠČ ' => ['0', '2', '4', '4'], 'SCH' => ['0', '4', '4', '4'], 'SCHD' => ['0', '2', '43', '43'], 'SCHT' => ['0', '2', '43', '43'], @@ -382,13 +382,13 @@ class Soundex { 'Ű' => ['1', '0', '', ''], 'Ų' => ['1', '0', '', ''], 'Ư' => ['1', '0', '', ''], - 'Ụ' => ['1', '0', '', ''], - 'Ủ' => ['1', '0', '', ''], - 'Ứ' => ['1', '0', '', ''], - 'Ừ' => ['1', '0', '', ''], - 'Ử' => ['1', '0', '', ''], - 'Ữ' => ['1', '0', '', ''], - 'Ự' => ['1', '0', '', ''], + 'Ụ ' => ['1', '0', '', ''], + 'Ủ ' => ['1', '0', '', ''], + 'Ứ ' => ['1', '0', '', ''], + 'Ừ ' => ['1', '0', '', ''], + 'Ử ' => ['1', '0', '', ''], + 'Ữ ' => ['1', '0', '', ''], + 'Ự ' => ['1', '0', '', ''], 'UE' => ['1', '0', '', ''], 'UI' => ['1', '0', '1', ''], 'UJ' => ['1', '0', '1', ''], @@ -399,10 +399,10 @@ class Soundex { 'X' => ['0', '5', '54', '54'], 'Y' => ['1', '1', '', ''], 'Ý' => ['1', '1', '', ''], - 'Ỳ' => ['1', '1', '', ''], - 'Ỵ' => ['1', '1', '', ''], - 'Ỷ' => ['1', '1', '', ''], - 'Ỹ' => ['1', '1', '', ''], + 'Ỳ ' => ['1', '1', '', ''], + 'Ỵ ' => ['1', '1', '', ''], + 'Ỷ ' => ['1', '1', '', ''], + 'Ỹ ' => ['1', '1', '', ''], 'Z' => ['0', '4', '4', '4'], 'Ź' => ['0', '4', '4', '4'], 'Ż' => ['0', '4', '4', '4'], @@ -423,7 +423,7 @@ class Soundex { 'В' => ['0', '7', '7', '7'], 'Г' => ['0', '5', '5', '5'], 'Д' => ['0', '3', '3', '3'], - 'ДЗ' => ['0', '4', '4', '4'], + 'ДЗ ' => ['0', '4', '4', '4'], 'Е' => ['1', '0', '', ''], 'Ё' => ['1', '0', '', ''], 'Ж' => ['0', '4', '4', '4'], @@ -437,7 +437,7 @@ class Soundex { 'О' => ['1', '0', '', ''], 'П' => ['0', '7', '7', '7'], 'Р' => ['0', '9', '9', '9'], - 'РЖ' => ['0', '4', '4', '4'], + 'РЖ ' => ['0', '4', '4', '4'], 'С' => ['0', '4', '4', '4'], 'Т' => ['0', '3', '3', '3'], 'У' => ['1', '0', '', ''], @@ -456,15 +456,15 @@ class Soundex { // Greek alphabet 'Α' => ['1', '0', '', ''], 'Ά' => ['1', '0', '', ''], - 'ΑΙ' => ['1', '0', '1', ''], - 'ΑΥ' => ['1', '0', '1', ''], + 'ΑΙ ' => ['1', '0', '1', ''], + 'ΑΥ ' => ['1', '0', '1', ''], 'Β' => ['0', '7', '7', '7'], 'Γ' => ['0', '5', '5', '5'], 'Δ' => ['0', '3', '3', '3'], 'Ε' => ['1', '0', '', ''], 'Έ' => ['1', '0', '', ''], - 'ΕΙ' => ['1', '0', '1', ''], - 'ΕΥ' => ['1', '1', '1', ''], + 'ΕΙ ' => ['1', '0', '1', ''], + 'ΕΥ ' => ['1', '1', '1', ''], 'Ζ' => ['0', '4', '4', '4'], 'Η' => ['1', '0', '', ''], 'Ή' => ['1', '0', '', ''], @@ -476,27 +476,27 @@ class Soundex { 'Κ' => ['0', '5', '5', '5'], 'Λ' => ['0', '8', '8', '8'], 'Μ' => ['0', '6', '6', '6'], - 'ΜΠ' => ['0', '7', '7', '7'], + 'ΜΠ ' => ['0', '7', '7', '7'], 'Ν' => ['0', '6', '6', '6'], - 'ΝΤ' => ['0', '3', '3', '3'], + 'ΝΤ ' => ['0', '3', '3', '3'], 'Ξ' => ['0', '5', '54', '54'], 'Ο' => ['1', '0', '', ''], 'Ό' => ['1', '0', '', ''], - 'ΟΙ' => ['1', '0', '1', ''], - 'ΟΥ' => ['1', '0', '1', ''], + 'ΟΙ ' => ['1', '0', '1', ''], + 'ΟΥ ' => ['1', '0', '1', ''], 'Π' => ['0', '7', '7', '7'], 'Ρ' => ['0', '9', '9', '9'], 'Σ' => ['0', '4', '4', '4'], 'ς' => ['0', '', '', '4'], 'Τ' => ['0', '3', '3', '3'], - 'ΤΖ' => ['0', '4', '4', '4'], - 'ΤΣ' => ['0', '4', '4', '4'], + 'ΤΖ ' => ['0', '4', '4', '4'], + 'ΤΣ ' => ['0', '4', '4', '4'], 'Υ' => ['1', '1', '', ''], 'Ύ' => ['1', '1', '', ''], 'Ϋ' => ['1', '1', '', ''], 'ΰ' => ['1', '1', '', ''], - 'ΥΚ' => ['1', '5', '5', '5'], - 'ΥΥ' => ['1', '65', '65', '65'], + 'ΥΚ ' => ['1', '5', '5', '5'], + 'ΥΥ ' => ['1', '65', '65', '65'], 'Φ' => ['0', '7', '7', '7'], 'Χ' => ['0', '5', '5', '5'], 'Ψ' => ['0', '7', '7', '7'], @@ -504,143 +504,143 @@ class Soundex { 'Ώ' => ['1', '0', '', ''], // Hebrew alphabet 'א' => ['1', '0', '', ''], - 'או' => ['1', '0', '7', ''], - 'אג' => ['1', '4', '4', '4', '5', '5', '5', '34', '34', '34'], - 'בב' => ['0', '7', '7', '7', '77', '77', '77'], + 'או ' => ['1', '0', '7', ''], + 'אג ' => ['1', '4', '4', '4', '5', '5', '5', '34', '34', '34'], + 'בב ' => ['0', '7', '7', '7', '77', '77', '77'], 'ב' => ['0', '7', '7', '7'], - 'גג' => ['0', '4', '4', '4', '5', '5', '5', '45', '45', '45', '55', '55', '55', '54', '54', '54'], - 'גד' => ['0', '43', '43', '43', '53', '53', '53'], - 'גה' => ['0', '45', '45', '45', '55', '55', '55'], - 'גז' => ['0', '44', '44', '44', '45', '45', '45'], - 'גח' => ['0', '45', '45', '45', '55', '55', '55'], - 'גכ' => ['0', '45', '45', '45', '55', '55', '55'], - 'גך' => ['0', '45', '45', '45', '55', '55', '55'], - 'גצ' => ['0', '44', '44', '44', '45', '45', '45'], - 'גץ' => ['0', '44', '44', '44', '45', '45', '45'], - 'גק' => ['0', '45', '45', '45', '54', '54', '54'], - 'גש' => ['0', '44', '44', '44', '54', '54', '54'], - 'גת' => ['0', '43', '43', '43', '53', '53', '53'], + 'גג ' => ['0', '4', '4', '4', '5', '5', '5', '45', '45', '45', '55', '55', '55', '54', '54', '54'], + 'גד ' => ['0', '43', '43', '43', '53', '53', '53'], + 'גה ' => ['0', '45', '45', '45', '55', '55', '55'], + 'גז ' => ['0', '44', '44', '44', '45', '45', '45'], + 'גח ' => ['0', '45', '45', '45', '55', '55', '55'], + 'גכ ' => ['0', '45', '45', '45', '55', '55', '55'], + 'גך ' => ['0', '45', '45', '45', '55', '55', '55'], + 'גצ ' => ['0', '44', '44', '44', '45', '45', '45'], + 'גץ ' => ['0', '44', '44', '44', '45', '45', '45'], + 'גק ' => ['0', '45', '45', '45', '54', '54', '54'], + 'גש ' => ['0', '44', '44', '44', '54', '54', '54'], + 'גת ' => ['0', '43', '43', '43', '53', '53', '53'], 'ג' => ['0', '4', '4', '4', '5', '5', '5'], - 'דז' => ['0', '4', '4', '4'], - 'דד' => ['0', '3', '3', '3', '33', '33', '33'], - 'דט' => ['0', '33', '33', '33'], - 'דש' => ['0', '4', '4', '4'], - 'דצ' => ['0', '4', '4', '4'], - 'דץ' => ['0', '4', '4', '4'], + 'דז ' => ['0', '4', '4', '4'], + 'דד ' => ['0', '3', '3', '3', '33', '33', '33'], + 'דט ' => ['0', '33', '33', '33'], + 'דש ' => ['0', '4', '4', '4'], + 'דצ ' => ['0', '4', '4', '4'], + 'דץ ' => ['0', '4', '4', '4'], 'ד' => ['0', '3', '3', '3'], - 'הג' => ['0', '54', '54', '54', '55', '55', '55'], - 'הכ' => ['0', '55', '55', '55'], - 'הח' => ['0', '55', '55', '55'], - 'הק' => ['0', '55', '55', '55', '5', '5', '5'], - 'הה' => ['0', '5', '5', '', '55', '55', ''], + 'הג ' => ['0', '54', '54', '54', '55', '55', '55'], + 'הכ ' => ['0', '55', '55', '55'], + 'הח ' => ['0', '55', '55', '55'], + 'הק ' => ['0', '55', '55', '55', '5', '5', '5'], + 'הה ' => ['0', '5', '5', '', '55', '55', ''], 'ה' => ['0', '5', '5', ''], - 'וי' => ['1', '', '', '', '7', '7', '7'], + 'וי ' => ['1', '', '', '', '7', '7', '7'], 'ו' => ['1', '7', '7', '7', '7', '', ''], - 'וו' => ['1', '7', '7', '7', '7', '', ''], - 'וופ' => ['1', '7', '7', '7', '77', '77', '77'], - 'זש' => ['0', '4', '4', '4', '44', '44', '44'], - 'זדז' => ['0', '2', '4', '4'], + 'וו ' => ['1', '7', '7', '7', '7', '', ''], + 'וו ' => ['1', '7', '7', '7', '77', '77', '77'], + 'זש ' => ['0', '4', '4', '4', '44', '44', '44'], + 'זד ' => ['0', '2', '4', '4'], 'ז' => ['0', '4', '4', '4'], - 'זג' => ['0', '44', '44', '44', '45', '45', '45'], - 'זז' => ['0', '4', '4', '4', '44', '44', '44'], - 'זס' => ['0', '44', '44', '44'], - 'זצ' => ['0', '44', '44', '44'], - 'זץ' => ['0', '44', '44', '44'], - 'חג' => ['0', '54', '54', '54', '53', '53', '53'], - 'חח' => ['0', '5', '5', '5', '55', '55', '55'], - 'חק' => ['0', '55', '55', '55', '5', '5', '5'], - 'חכ' => ['0', '45', '45', '45', '55', '55', '55'], - 'חס' => ['0', '5', '54', '54'], - 'חש' => ['0', '5', '54', '54'], + 'זג ' => ['0', '44', '44', '44', '45', '45', '45'], + 'זז ' => ['0', '4', '4', '4', '44', '44', '44'], + 'זס ' => ['0', '44', '44', '44'], + 'זצ ' => ['0', '44', '44', '44'], + 'זץ ' => ['0', '44', '44', '44'], + 'חג ' => ['0', '54', '54', '54', '53', '53', '53'], + 'חח ' => ['0', '5', '5', '5', '55', '55', '55'], + 'חק ' => ['0', '55', '55', '55', '5', '5', '5'], + 'חכ ' => ['0', '45', '45', '45', '55', '55', '55'], + 'חס ' => ['0', '5', '54', '54'], + 'חש ' => ['0', '5', '54', '54'], 'ח' => ['0', '5', '5', '5'], - 'טש' => ['0', '4', '4', '4'], - 'טד' => ['0', '33', '33', '33'], - 'טי' => ['0', '3', '3', '3', '4', '4', '4', '3', '3', '34'], - 'טת' => ['0', '33', '33', '33'], - 'טט' => ['0', '3', '3', '3', '33', '33', '33'], + 'טש ' => ['0', '4', '4', '4'], + 'טד ' => ['0', '33', '33', '33'], + 'טי ' => ['0', '3', '3', '3', '4', '4', '4', '3', '3', '34'], + 'טת ' => ['0', '33', '33', '33'], + 'טט ' => ['0', '3', '3', '3', '33', '33', '33'], 'ט' => ['0', '3', '3', '3'], 'י' => ['1', '1', '', ''], - 'יא' => ['1', '1', '', '', '1', '1', '1'], - 'כג' => ['0', '55', '55', '55', '54', '54', '54'], - 'כש' => ['0', '5', '54', '54'], - 'כס' => ['0', '5', '54', '54'], - 'ככ' => ['0', '5', '5', '5', '55', '55', '55'], - 'כך' => ['0', '5', '5', '5', '55', '55', '55'], + 'יא ' => ['1', '1', '', '', '1', '1', '1'], + 'כג ' => ['0', '55', '55', '55', '54', '54', '54'], + 'כש ' => ['0', '5', '54', '54'], + 'כס ' => ['0', '5', '54', '54'], + 'ככ ' => ['0', '5', '5', '5', '55', '55', '55'], + 'כך ' => ['0', '5', '5', '5', '55', '55', '55'], 'כ' => ['0', '5', '5', '5'], - 'כח' => ['0', '55', '55', '55', '5', '5', '5'], + 'כח ' => ['0', '55', '55', '55', '5', '5', '5'], 'ך' => ['0', '', '5', '5'], 'ל' => ['0', '8', '8', '8'], - 'לל' => ['0', '88', '88', '88', '8', '8', '8'], - 'מנ' => ['0', '66', '66', '66'], - 'מן' => ['0', '66', '66', '66'], - 'ממ' => ['0', '6', '6', '6', '66', '66', '66'], - 'מם' => ['0', '6', '6', '6', '66', '66', '66'], + 'לל ' => ['0', '88', '88', '88', '8', '8', '8'], + 'מנ ' => ['0', '66', '66', '66'], + 'מן ' => ['0', '66', '66', '66'], + 'ממ ' => ['0', '6', '6', '6', '66', '66', '66'], + 'מם ' => ['0', '6', '6', '6', '66', '66', '66'], 'מ' => ['0', '6', '6', '6'], 'ם' => ['0', '', '6', '6'], - 'נמ' => ['0', '66', '66', '66'], - 'נם' => ['0', '66', '66', '66'], - 'ננ' => ['0', '6', '6', '6', '66', '66', '66'], - 'נן' => ['0', '6', '6', '6', '66', '66', '66'], + 'נמ ' => ['0', '66', '66', '66'], + 'נם ' => ['0', '66', '66', '66'], + 'ננ ' => ['0', '6', '6', '6', '66', '66', '66'], + 'נן ' => ['0', '6', '6', '6', '66', '66', '66'], 'נ' => ['0', '6', '6', '6'], 'ן' => ['0', '', '6', '6'], - 'סתש' => ['0', '2', '4', '4'], - 'סתז' => ['0', '2', '4', '4'], - 'סטז' => ['0', '2', '4', '4'], - 'סטש' => ['0', '2', '4', '4'], - 'סצד' => ['0', '2', '4', '4'], - 'סט' => ['0', '2', '4', '4', '43', '43', '43'], - 'סת' => ['0', '2', '4', '4', '43', '43', '43'], - 'סג' => ['0', '44', '44', '44', '4', '4', '4'], - 'סס' => ['0', '4', '4', '4', '44', '44', '44'], - 'סצ' => ['0', '44', '44', '44'], - 'סץ' => ['0', '44', '44', '44'], - 'סז' => ['0', '44', '44', '44'], - 'סש' => ['0', '44', '44', '44'], + 'סת ' => ['0', '2', '4', '4'], + 'סת ' => ['0', '2', '4', '4'], + 'סט ' => ['0', '2', '4', '4'], + 'סט ' => ['0', '2', '4', '4'], + 'סצ ' => ['0', '2', '4', '4'], + 'סט ' => ['0', '2', '4', '4', '43', '43', '43'], + 'סת ' => ['0', '2', '4', '4', '43', '43', '43'], + 'סג ' => ['0', '44', '44', '44', '4', '4', '4'], + 'סס ' => ['0', '4', '4', '4', '44', '44', '44'], + 'סצ ' => ['0', '44', '44', '44'], + 'סץ ' => ['0', '44', '44', '44'], + 'סז ' => ['0', '44', '44', '44'], + 'סש ' => ['0', '44', '44', '44'], 'ס' => ['0', '4', '4', '4'], 'ע' => ['1', '0', '', ''], - 'פב' => ['0', '7', '7', '7', '77', '77', '77'], - 'פוו' => ['0', '7', '7', '7', '77', '77', '77'], - 'פפ' => ['0', '7', '7', '7', '77', '77', '77'], - 'פף' => ['0', '7', '7', '7', '77', '77', '77'], + 'פב ' => ['0', '7', '7', '7', '77', '77', '77'], + 'פו ' => ['0', '7', '7', '7', '77', '77', '77'], + 'פפ ' => ['0', '7', '7', '7', '77', '77', '77'], + 'פף ' => ['0', '7', '7', '7', '77', '77', '77'], 'פ' => ['0', '7', '7', '7'], 'ף' => ['0', '', '7', '7'], - 'צג' => ['0', '44', '44', '44', '45', '45', '45'], - 'צז' => ['0', '44', '44', '44'], - 'צס' => ['0', '44', '44', '44'], - 'צצ' => ['0', '4', '4', '4', '5', '5', '5', '44', '44', '44', '54', '54', '54', '45', '45', '45'], - 'צץ' => ['0', '4', '4', '4', '5', '5', '5', '44', '44', '44', '54', '54', '54'], - 'צש' => ['0', '44', '44', '44', '4', '4', '4', '5', '5', '5'], + 'צג ' => ['0', '44', '44', '44', '45', '45', '45'], + 'צז ' => ['0', '44', '44', '44'], + 'צס ' => ['0', '44', '44', '44'], + 'צצ ' => ['0', '4', '4', '4', '5', '5', '5', '44', '44', '44', '54', '54', '54', '45', '45', '45'], + 'צץ ' => ['0', '4', '4', '4', '5', '5', '5', '44', '44', '44', '54', '54', '54'], + 'צש ' => ['0', '44', '44', '44', '4', '4', '4', '5', '5', '5'], 'צ' => ['0', '4', '4', '4', '5', '5', '5'], 'ץ' => ['0', '', '4', '4'], - 'קה' => ['0', '55', '55', '5'], - 'קס' => ['0', '5', '54', '54'], - 'קש' => ['0', '5', '54', '54'], - 'קק' => ['0', '5', '5', '5', '55', '55', '55'], - 'קח' => ['0', '55', '55', '55'], - 'קכ' => ['0', '55', '55', '55'], - 'קך' => ['0', '55', '55', '55'], - 'קג' => ['0', '55', '55', '55', '54', '54', '54'], + 'קה ' => ['0', '55', '55', '5'], + 'קס ' => ['0', '5', '54', '54'], + 'קש ' => ['0', '5', '54', '54'], + 'קק ' => ['0', '5', '5', '5', '55', '55', '55'], + 'קח ' => ['0', '55', '55', '55'], + 'קכ ' => ['0', '55', '55', '55'], + 'קך ' => ['0', '55', '55', '55'], + 'קג ' => ['0', '55', '55', '55', '54', '54', '54'], 'ק' => ['0', '5', '5', '5'], - 'רר' => ['0', '99', '99', '99', '9', '9', '9'], + 'רר ' => ['0', '99', '99', '99', '9', '9', '9'], 'ר' => ['0', '9', '9', '9'], - 'שטז' => ['0', '2', '4', '4'], - 'שתש' => ['0', '2', '4', '4'], - 'שתז' => ['0', '2', '4', '4'], - 'שטש' => ['0', '2', '4', '4'], - 'שד' => ['0', '2', '43', '43'], - 'שז' => ['0', '44', '44', '44'], - 'שס' => ['0', '44', '44', '44'], - 'שת' => ['0', '2', '43', '43'], - 'שג' => ['0', '4', '4', '4', '44', '44', '44', '4', '43', '43'], - 'שט' => ['0', '2', '43', '43', '44', '44', '44'], - 'שצ' => ['0', '44', '44', '44', '45', '45', '45'], - 'שץ' => ['0', '44', '', '44', '45', '', '45'], - 'שש' => ['0', '4', '4', '4', '44', '44', '44'], + 'שט ' => ['0', '2', '4', '4'], + 'שת ' => ['0', '2', '4', '4'], + 'שת ' => ['0', '2', '4', '4'], + 'שט ' => ['0', '2', '4', '4'], + 'שד ' => ['0', '2', '43', '43'], + 'שז ' => ['0', '44', '44', '44'], + 'שס ' => ['0', '44', '44', '44'], + 'שת ' => ['0', '2', '43', '43'], + 'שג ' => ['0', '4', '4', '4', '44', '44', '44', '4', '43', '43'], + 'שט ' => ['0', '2', '43', '43', '44', '44', '44'], + 'שצ ' => ['0', '44', '44', '44', '45', '45', '45'], + 'שץ ' => ['0', '44', '', '44', '45', '', '45'], + 'שש ' => ['0', '4', '4', '4', '44', '44', '44'], 'ש' => ['0', '4', '4', '4'], - 'תג' => ['0', '34', '34', '34'], - 'תז' => ['0', '34', '34', '34'], - 'תש' => ['0', '4', '4', '4'], - 'תת' => ['0', '3', '3', '3', '4', '4', '4', '33', '33', '33', '44', '44', '44', '34', '34', '34', '43', '43', '43'], + 'תג ' => ['0', '34', '34', '34'], + 'תז ' => ['0', '34', '34', '34'], + 'תש ' => ['0', '4', '4', '4'], + 'תת ' => ['0', '3', '3', '3', '4', '4', '4', '33', '33', '33', '44', '44', '44', '34', '34', '34', '43', '43', '43'], 'ת' => ['0', '3', '3', '3', '4', '4', '4'], // Arabic alphabet 'ا' => ['1', '0', '', ''], @@ -666,10 +666,10 @@ class Soundex { 'ق' => ['0', '5', '5', '5'], 'ك' => ['0', '5', '5', '5'], 'ل' => ['0', '8', '8', '8'], - 'لا' => ['0', '8', '8', '8'], + 'لا ' => ['0', '8', '8', '8'], 'م' => ['0', '6', '6', '6'], 'ن' => ['0', '6', '6', '6'], - 'هن' => ['0', '66', '66', '66'], + 'هن ' => ['0', '66', '66', '66'], 'ه' => ['0', '5', '5', ''], 'و' => ['1', '', '', '', '7', '', ''], 'ي' => ['0', '1', '', ''], diff --git a/app/Stats.php b/app/Stats.php index 6ebf4aae28..648825609d 100644 --- a/app/Stats.php +++ b/app/Stats.php @@ -898,8 +898,8 @@ class Stats { * @return string */ public function chartSex($params = []) { - $WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x'); - $WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y'); + $WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x'); + $WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y'); if (isset($params[0]) && $params[0] != '') { $size = strtolower($params[0]); @@ -1032,8 +1032,8 @@ class Stats { * @return string */ public function chartMortality($params = []) { - $WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x'); - $WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y'); + $WT_STATS_S_CHART_X = Theme::theme()->parameter('stats-small-chart-x'); + $WT_STATS_S_CHART_Y = Theme::theme()->parameter('stats-small-chart-y'); if (isset($params[0]) && $params[0] != '') { $size = strtolower($params[0]); @@ -4450,13 +4450,9 @@ class Stats { $family = Family::getInstance($rows[$c]['id'], $this->tree); if ($family->canShow()) { if ($type === 'list') { - $top10[] = - '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . - I18N::plural('%s child', '%s children', $rows[$c]['tot'], I18N::number($rows[$c]['tot'])); + $top10[] = '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s child', '%s children', $rows[$c]['tot'], I18N::number($rows[$c]['tot'])); } else { - $top10[] = - '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . - I18N::plural('%s child', '%s children', $rows[$c]['tot'], I18N::number($rows[$c]['tot'])); + $top10[] = '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s child', '%s children', $rows[$c]['tot'], I18N::number($rows[$c]['tot'])); } } } @@ -5250,13 +5246,9 @@ class Stats { $family = Family::getInstance($row['id'], $this->tree); if ($family->canShow()) { if ($type === 'list') { - $top10[] = - '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . - I18N::plural('%s grandchild', '%s grandchildren', $row['tot'], I18N::number($row['tot'])); + $top10[] = '<li><a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s grandchild', '%s grandchildren', $row['tot'], I18N::number($row['tot'])); } else { - $top10[] = - '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . - I18N::plural('%s grandchild', '%s grandchildren', $row['tot'], I18N::number($row['tot'])); + $top10[] = '<a href="' . $family->getHtmlUrl() . '">' . $family->getFullName() . '</a> - ' . I18N::plural('%s grandchild', '%s grandchildren', $row['tot'], I18N::number($row['tot'])); } } } diff --git a/app/SurnameTradition.php b/app/SurnameTradition.php index 14b5396a6e..915320ffe4 100644 --- a/app/SurnameTradition.php +++ b/app/SurnameTradition.php @@ -67,37 +67,28 @@ class SurnameTradition { */ public static function allDescriptions() { return [ - 'paternal' => - I18N::translateContext('Surname tradition', 'paternal') . - ' — ' . /* I18N: In the paternal surname tradition, ... */ I18N::translate('Children take their father’s surname.') . - ' ' . /* I18N: In the paternal surname tradition, ... */ I18N::translate('Wives take their husband’s surname.'), - /* I18N: A system where children take their father’s surname */ 'patrilineal' => - I18N::translate('patrilineal') . - ' — ' . /* I18N: In the patrilineal surname tradition, ... */ I18N::translate('Children take their father’s surname.'), - /* I18N: A system where children take their mother’s surname */ 'matrilineal' => - I18N::translate('matrilineal') . - ' — ' . /* I18N: In the matrilineal surname tradition, ... */ I18N::translate('Children take their mother’s surname.'), - 'spanish' => - I18N::translateContext('Surname tradition', 'Spanish') . - ' — ' . /* I18N: In the Spanish surname tradition, ... */ I18N::translate('Children take one surname from the father and one surname from the mother.'), - 'portuguese' => - I18N::translateContext('Surname tradition', 'Portuguese') . - ' — ' . /* I18N: In the Portuguese surname tradition, ... */ I18N::translate('Children take one surname from the mother and one surname from the father.'), - 'icelandic' => - I18N::translateContext('Surname tradition', 'Icelandic') . - ' — ' . /* I18N: In the Icelandic surname tradition, ... */ I18N::translate('Children take a patronym instead of a surname.'), - 'polish' => - I18N::translateContext('Surname tradition', 'Polish') . - ' — ' . /* I18N: In the Polish surname tradition, ... */ I18N::translate('Children take their father’s surname.') . - ' ' . /* I18N: In the Polish surname tradition, ... */ I18N::translate('Wives take their husband’s surname.') . - ' ' . /* I18N: In the Polish surname tradition, ... */ I18N::translate('Surnames are inflected to indicate an individual’s gender.'), - 'lithuanian' => - I18N::translateContext('Surname tradition', 'Lithuanian') . - ' — ' . /* I18N: In the Lithuanian surname tradition, ... */ I18N::translate('Children take their father’s surname.') . - ' ' . /* I18N: In the Lithuanian surname tradition, ... */ I18N::translate('Wives take their husband’s surname.') . - ' ' . /* I18N: In the Lithuanian surname tradition, ... */ I18N::translate('Surnames are inflected to indicate an individual’s gender and marital status.'), - 'none' => - I18N::translateContext('Surname tradition', 'none'), + 'paternal' => I18N::translateContext('Surname tradition', 'paternal') . ' — ' . + /* I18N: In the paternal surname tradition, ... */ I18N::translate('Children take their father’s surname.') . ' ' . + /* I18N: In the paternal surname tradition, ... */ I18N::translate('Wives take their husband’s surname.'), + 'patrilineal ' => /* I18N: A system where children take their father’s surname */ I18N::translate('patrilineal') . ' — ' . + /* I18N: In the patrilineal surname tradition, ... */ I18N::translate('Children take their father’s surname.'), + 'matrilineal ' => /* I18N: A system where children take their mother’s surname */ I18N::translate('matrilineal') . ' — ' . + /* I18N: In the matrilineal surname tradition, ... */ I18N::translate('Children take their mother’s surname.'), + 'spanish' => I18N::translateContext('Surname tradition', 'Spanish') . ' — ' . + /* I18N: In the Spanish surname tradition, ... */ I18N::translate('Children take one surname from the father and one surname from the mother.'), + 'portuguese' => I18N::translateContext('Surname tradition', 'Portuguese') . ' — ' . + /* I18N: In the Portuguese surname tradition, ... */ I18N::translate('Children take one surname from the mother and one surname from the father.'), + 'icelandic' => I18N::translateContext('Surname tradition', 'Icelandic') . ' — ' . + /* I18N: In the Icelandic surname tradition, ... */ I18N::translate('Children take a patronym instead of a surname.'), + 'polish' => I18N::translateContext('Surname tradition', 'Polish') . ' — ' . + /* I18N: In the Polish surname tradition, ... */ I18N::translate('Children take their father’s surname.') . ' ' . + /* I18N: In the Polish surname tradition, ... */ I18N::translate('Wives take their husband’s surname.') . ' ' . + /* I18N: In the Polish surname tradition, ... */ I18N::translate('Surnames are inflected to indicate an individual’s gender.'), + 'lithuanian' => I18N::translateContext('Surname tradition', 'Lithuanian') . ' — ' . + /* I18N: In the Lithuanian surname tradition, ... */ I18N::translate('Children take their father’s surname.') . ' ' . + /* I18N: In the Lithuanian surname tradition, ... */ I18N::translate('Wives take their husband’s surname.') . ' ' . + /* I18N: In the Lithuanian surname tradition, ... */ I18N::translate('Surnames are inflected to indicate an individual’s gender and marital status.'), + 'none' => I18N::translateContext('Surname tradition', 'none'), ]; } diff --git a/app/SurnameTradition/LithuanianSurnameTradition.php b/app/SurnameTradition/LithuanianSurnameTradition.php index ed99edc707..b81e03ef53 100644 --- a/app/SurnameTradition/LithuanianSurnameTradition.php +++ b/app/SurnameTradition/LithuanianSurnameTradition.php @@ -39,10 +39,10 @@ class LithuanianSurnameTradition extends PaternalSurnameTradition implements Sur /** @var string[] Inflect a surname for males */ protected $inflect_male = [ - 'aitė\b' => 'as', - 'ytė\b' => 'is', - 'iūtė\b' => 'ius', - 'utė\b' => 'us', + 'aitė\b' => 'as', + 'ytė\b' => 'is', + 'iūtė\b ' => 'ius', + 'utė\b' => 'us', ]; /** @@ -90,7 +90,7 @@ class LithuanianSurnameTradition extends PaternalSurnameTradition implements Sur ]); } else { return [ - 'NAME' => '//', + 'NAME' => '//', ]; } } diff --git a/app/SurnameTradition/PolishSurnameTradition.php b/app/SurnameTradition/PolishSurnameTradition.php index 5e7beb6039..93a384438a 100644 --- a/app/SurnameTradition/PolishSurnameTradition.php +++ b/app/SurnameTradition/PolishSurnameTradition.php @@ -80,7 +80,7 @@ class PolishSurnameTradition extends PaternalSurnameTradition implements Surname ]); } else { return [ - 'NAME' => '//', + 'NAME' => '//', ]; } } diff --git a/app/Theme/AbstractTheme.php b/app/Theme/AbstractTheme.php index 1a7bd2d905..37ed699a39 100755 --- a/app/Theme/AbstractTheme.php +++ b/app/Theme/AbstractTheme.php @@ -106,9 +106,9 @@ abstract class AbstractTheme { 'mime-text-html' => '', // Other icons - 'mail' => 'fa fa-envelope-o', - 'help' => 'fa fa-info-circle', - 'search' => 'fa fa-search', + 'mail' => 'fa fa-envelope-o', + 'help' => 'fa fa-info-circle', + 'search' => 'fa fa-search', ]; /** @var Request */ @@ -669,8 +669,7 @@ abstract class AbstractTheme { $title .= ' – ' . $this->tree->getPreference('META_TITLE'); } - $html = - $this->metaCharset() . + $html = $this->metaCharset() . $this->metaCsrf() . $this->title($title) . $this->favicon() . @@ -834,11 +833,9 @@ abstract class AbstractTheme { $content = '<span class="namedef name1">' . $individual->getFullName() . '</span>'; $icons = ''; if ($individual->canShow()) { - $content = - '<a href="' . $individual->getHtmlUrl() . '">' . $content . '</a>' . + $content = '<a href="' . $individual->getHtmlUrl() . '">' . $content . '</a>' . '<div class="namedef name1">' . $individual->getAddName() . '</div>'; - $icons = - '<div class="icons">' . + $icons = '<div class="icons">' . '<span class="iconz icon-zoomin" title="' . I18N::translate('Zoom in/out on this box.') . '"></span>' . '<div class="itr"><i class="icon-pedigree"></i><div class="popup">' . '<ul class="' . $personBoxClass . '">' . implode('', array_map(function(Menu $menu) { return $menu->bootstrap4(); }, $this->individualBoxMenu($individual))) . '</ul>' . @@ -886,11 +883,9 @@ abstract class AbstractTheme { $content = '<span class="namedef name1">' . $individual->getFullName() . '</span>'; $icons = ''; if ($individual->canShow()) { - $content = - '<a href="' . $individual->getHtmlUrl() . '">' . $content . '</a>' . + $content = '<a href="' . $individual->getHtmlUrl() . '">' . $content . '</a>' . '<div class="namedef name2">' . $individual->getAddName() . '</div>'; - $icons = - '<div class="icons">' . + $icons = '<div class="icons">' . '<span class="iconz icon-zoomin" title="' . I18N::translate('Zoom in/out on this box.') . '"></span>' . '<div class="itr"><i class="icon-pedigree"></i><div class="popup">' . '<ul class="' . $personBoxClass . '">' . implode('', array_map(function(Menu $menu) { return $menu->bootstrap4(); }, $this->individualBoxMenu($individual))) . '</ul>' . diff --git a/app/Theme/FabTheme.php b/app/Theme/FabTheme.php index 02bc739985..2be6fe0ee8 100644 --- a/app/Theme/FabTheme.php +++ b/app/Theme/FabTheme.php @@ -26,7 +26,7 @@ class FabTheme extends AbstractTheme implements ThemeInterface { * Where are our CSS, JS and other assets? */ const THEME_DIR = 'fab'; - const ASSET_DIR = 'themes/' . self::THEME_DIR . '/css-2.0.0/'; + const ASSET_DIR = 'themes/' . self::THEME_DIR . '/css-2.0.0/'; const STYLESHEET = self::ASSET_DIR . 'style.css'; /** diff --git a/app/Theme/MinimalTheme.php b/app/Theme/MinimalTheme.php index 4bcdf85a35..27ab5f964e 100644 --- a/app/Theme/MinimalTheme.php +++ b/app/Theme/MinimalTheme.php @@ -59,10 +59,10 @@ class MinimalTheme extends AbstractTheme implements ThemeInterface { */ public function parameter($parameter_name) { $parameters = [ - 'chart-background-f' => 'dddddd', - 'chart-background-m' => 'cccccc', - 'distribution-chart-low-values' => 'cccccc', - 'distribution-chart-no-values' => 'ffffff', + 'chart-background-f' => 'dddddd', + 'chart-background-m' => 'cccccc', + 'distribution-chart-low-values' => 'cccccc', + 'distribution-chart-no-values' => 'ffffff', ]; if (array_key_exists($parameter_name, $parameters)) { diff --git a/app/Tree.php b/app/Tree.php index f55858b2be..c8b704ea99 100644 --- a/app/Tree.php +++ b/app/Tree.php @@ -479,8 +479,7 @@ class Tree { // Genealogy data // It is simpler to create a temporary/unimported GEDCOM than to populate all the tables... - $john_doe = /* I18N: This should be a common/default/placeholder name of an individual. Put slashes around the surname. */ - I18N::translate('John /DOE/'); + $john_doe = /* I18N: This should be a common/default/placeholder name of an individual. Put slashes around the surname. */ I18N::translate('John /DOE/'); $note = I18N::translate('Edit this individual and replace their details with your own.'); Database::prepare("INSERT INTO `##gedcom_chunk` (gedcom_id, chunk_data) VALUES (?, ?)")->execute([ $tree_id, diff --git a/calendar.php b/calendar.php index 9ffeeb1ba3..8fcd7bfcba 100644 --- a/calendar.php +++ b/calendar.php @@ -640,7 +640,7 @@ function calendar_list_text($list, $tag1, $tag2, $show_sex_symbols) { $html = ''; foreach ($list as $id => $facts) { - $tmp = GedcomRecord::getInstance($id, $WT_TREE); + $tmp = GedcomRecord::getInstance($id, $WT_TREE); $html .= $tag1 . '<a href="' . $tmp->getHtmlUrl() . '">' . $tmp->getFullName() . '</a> '; if ($show_sex_symbols && $tmp instanceof Individual) { switch ($tmp->getSex()) { diff --git a/edit_changes.php b/edit_changes.php index 62502afcca..52f8c5be52 100644 --- a/edit_changes.php +++ b/edit_changes.php @@ -143,13 +143,13 @@ foreach ($rows as $row) { break; } - $row->accept_url = Html::url('edit_changes.php', [ + $row->accept_url = Html::url('edit_changes.php', [ 'action' => 'accept', 'change_id' => $row->change_id, 'ged' => $row->gedcom_name, 'url' => $url, ]); - $row->reject_url = Html::url('edit_changes.php', [ + $row->reject_url = Html::url('edit_changes.php', [ 'action' => 'reject', 'change_id' => $row->change_id, 'ged' => $row->gedcom_name, diff --git a/edit_interface.php b/edit_interface.php index e1bd72e9de..5ecd16bebe 100755 --- a/edit_interface.php +++ b/edit_interface.php @@ -146,8 +146,8 @@ case 'editrawfact': ////////////////////////////////////////////////////////////////////////////// // Edit a GEDCOM fact ////////////////////////////////////////////////////////////////////////////// - $xref = Filter::get('xref', WT_REGEX_XREF); - $fact_id = Filter::get('fact_id'); + $xref = Filter::get('xref', WT_REGEX_XREF); + $fact_id = Filter::get('fact_id'); $record = GedcomRecord::getInstance($xref, $controller->tree()); check_record_access($record); @@ -250,8 +250,8 @@ case 'edit': ////////////////////////////////////////////////////////////////////////////// // Edit a fact ////////////////////////////////////////////////////////////////////////////// - $xref = Filter::get('xref', WT_REGEX_XREF); - $fact_id = Filter::get('fact_id'); + $xref = Filter::get('xref', WT_REGEX_XREF); + $fact_id = Filter::get('fact_id'); $record = GedcomRecord::getInstance($xref, $controller->tree()); check_record_access($record); @@ -361,7 +361,7 @@ case 'add': // Add a new fact ////////////////////////////////////////////////////////////////////////////// $xref = Filter::get('xref', WT_REGEX_XREF); - $fact = Filter::get('fact', WT_REGEX_TAG); + $fact = Filter::get('fact', WT_REGEX_TAG); $record = GedcomRecord::getInstance($xref, $controller->tree()); check_record_access($record); @@ -467,7 +467,7 @@ case 'update': $newged = ''; if (!empty($_POST['NAME'])) { - $newged .= "\n1 NAME " . $_POST['NAME']; + $newged .= "\n1 NAME " . $_POST['NAME']; $name_facts = ['TYPE', 'NPFX', 'GIVN', 'NICK', 'SPFX', 'SURN', 'NSFX']; foreach ($name_facts as $name_fact) { if (!empty($_POST[$name_fact])) { @@ -531,8 +531,8 @@ case 'media-edit': ////////////////////////////////////////////////////////////////////////////// // Edit a media object ////////////////////////////////////////////////////////////////////////////// - $xref = Filter::get('xref', WT_REGEX_XREF); - $fact_id = Filter::get('fact_id'); + $xref = Filter::get('xref', WT_REGEX_XREF); + $fact_id = Filter::get('fact_id'); $record = GedcomRecord::getInstance($xref, $controller->tree()); check_record_access($record); @@ -1651,7 +1651,7 @@ case 'addsourceaction': $TITL = Filter::post('TITL'); if ($TITL) { $newgedrec .= "\n1 TITL " . $TITL; - $_HEB = Filter::post('_HEB'); + $_HEB = Filter::post('_HEB'); if ($_HEB) { $newgedrec .= "\n2 _HEB " . $_HEB; } @@ -1671,7 +1671,7 @@ case 'addsourceaction': $REPO = Filter::post('REPO', WT_REGEX_XREF); if ($REPO) { $newgedrec .= "\n1 REPO @" . $REPO . '@'; - $CALN = Filter::post('CALN'); + $CALN = Filter::post('CALN'); if ($CALN) { $newgedrec .= "\n2 CALN " . $CALN; } @@ -1956,7 +1956,7 @@ case 'addrepoaction': $REPO_NAME = Filter::post('REPO_NAME'); if ($REPO_NAME) { $gedrec .= "\n1 NAME " . $REPO_NAME; - $_HEB = Filter::post('_HEB'); + $_HEB = Filter::post('_HEB'); if ($_HEB) { $gedrec .= "\n2 _HEB " . $_HEB; } @@ -2058,7 +2058,7 @@ case 'save-media-link': } $xref = Filter::post('xref', WT_REGEX_XREF); $media_xref = Filter::post('media-xref', WT_REGEX_XREF); - $record = GedcomRecord::getInstance($xref, $controller->tree()); + $record = GedcomRecord::getInstance($xref, $controller->tree()); check_record_access($record); $gedcom = '1 OBJE @' . $media_xref . '@'; diff --git a/editnews.php b/editnews.php index 0faea7908f..b496b0e910 100644 --- a/editnews.php +++ b/editnews.php @@ -23,9 +23,9 @@ require 'includes/session.php'; $controller = new PageController; -$ctype = Filter::get('ctype', 'user|gedcom', 'user'); -$action = Filter::get('action', 'delete', Filter::post('action', 'save')); -$news_id = Filter::getInteger('news_id', 0, PHP_INT_MAX, Filter::postInteger('news_id')); +$ctype = Filter::get('ctype', 'user|gedcom', 'user'); +$action = Filter::get('action', 'delete', Filter::post('action', 'save')); +$news_id = Filter::getInteger('news_id', 0, PHP_INT_MAX, Filter::postInteger('news_id')); $news = Database::prepare("SELECT user_id, gedcom_id, UNIX_TIMESTAMP(updated) AS date, subject, body FROM `##news` WHERE news_id = :news_id")->execute(['news_id' => $news_id])->fetchOneRow(PDO::FETCH_ASSOC); @@ -47,7 +47,7 @@ if ($ctype === 'user' && $news['user_id'] != Auth::id() || $ctype === 'gedcom' & switch ($action) { case 'delete': - Database::prepare("DELETE FROM `##news` WHERE news_id = :news_id")->execute(['news_id' => $news_id,]); + Database::prepare("DELETE FROM `##news` WHERE news_id = :news_id")->execute(['news_id' => $news_id,]); header('Location: index.php?ctype=' . $ctype . '&ged=' . $controller->tree()->getNameUrl()); diff --git a/help_text.php b/help_text.php index 0a8ac26d6c..f8481b127c 100644 --- a/help_text.php +++ b/help_text.php @@ -31,39 +31,39 @@ switch ($help_topic) { case 'DATE': $title = I18N::translate('Date'); $dates = [ - '1900' => new Date('1900'), - 'JAN 1900' => new Date('JAN 1900'), - 'FEB 1900' => new Date('FEB 1900'), - 'MAR 1900' => new Date('MAR 1900'), - 'APR 1900' => new Date('APR 1900'), - 'MAY 1900' => new Date('MAY 1900'), - 'JUN 1900' => new Date('JUN 1900'), - 'JUL 1900' => new Date('JUL 1900'), - 'AUG 1900' => new Date('AUG 1900'), - 'SEP 1900' => new Date('SEP 1900'), - 'OCT 1900' => new Date('OCT 1900'), - 'NOV 1900' => new Date('NOV 1900'), - 'DEC 1900' => new Date('DEC 1900'), - '11 DEC 1913' => new Date('11 DEC 1913'), - '01 FEB 2003' => new Date('01 FEB 2003'), - 'ABT 1900' => new Date('ABT 1900'), - 'EST 1900' => new Date('EST 1900'), - 'CAL 1900' => new Date('CAL 1900'), - 'INT 1900 (...)' => new Date('INT 1900 (...)'), - '@#DJULIAN@ 44 B.C.' => new Date('@#DJULIAN@ 44 B.C.'), - '@#DJULIAN@ 14 JAN 1700' => new Date('@#DJULIAN@ 14 JAN 1700'), - 'BET @#DJULIAN@ 01 SEP 1752 AND @#DGREGORIAN@ 30 SEP 1752' => new Date('BET @#DJULIAN@ 01 SEP 1752 AND @#DGREGORIAN@ 30 SEP 1752'), - '@#DJULIAN@ 20 FEB 1742/43' => new Date('@#DJULIAN@ 20 FEB 1742/43'), - 'FROM 1900 TO 1910' => new Date('FROM 1900 TO 1910'), - 'FROM 1900' => new Date('FROM 1900'), - 'TO 1910' => new Date('TO 1910'), - 'BET 1900 AND 1910' => new Date('BET 1900 AND 1910'), - 'BET JAN 1900 AND MAR 1900' => new Date('BET JAN 1900 AND MAR 1900'), - 'BET APR 1900 AND JUN 1900' => new Date('BET APR 1900 AND JUN 1900'), - 'BET JUL 1900 AND SEP 1900' => new Date('BET JUL 1900 AND SEP 1900'), - 'BET OCT 1900 AND DEC 1900' => new Date('BET OCT 1900 AND DEC 1900'), - 'AFT 1900' => new Date('AFT 1900'), - 'BEF 1910' => new Date('BEF 1910'), + '1900' => new Date('1900'), + 'JAN 1900' => new Date('JAN 1900'), + 'FEB 1900' => new Date('FEB 1900'), + 'MAR 1900' => new Date('MAR 1900'), + 'APR 1900' => new Date('APR 1900'), + 'MAY 1900' => new Date('MAY 1900'), + 'JUN 1900' => new Date('JUN 1900'), + 'JUL 1900' => new Date('JUL 1900'), + 'AUG 1900' => new Date('AUG 1900'), + 'SEP 1900' => new Date('SEP 1900'), + 'OCT 1900' => new Date('OCT 1900'), + 'NOV 1900' => new Date('NOV 1900'), + 'DEC 1900' => new Date('DEC 1900'), + '11 DEC 1913' => new Date('11 DEC 1913'), + '01 FEB 2003' => new Date('01 FEB 2003'), + 'ABT 1900' => new Date('ABT 1900'), + 'EST 1900' => new Date('EST 1900'), + 'CAL 1900' => new Date('CAL 1900'), + 'INT 1900 (...)' => new Date('INT 1900 (...)'), + '@#DJULIAN@ 44 B.C.' => new Date('@#DJULIAN@ 44 B.C.'), + '@#DJULIAN@ 14 JAN 1700' => new Date('@#DJULIAN@ 14 JAN 1700'), + 'BET @#DJULIAN@ 01 SEP 1752 AND @#DGREGORIAN@ 30 SEP 1752' => new Date('BET @#DJULIAN@ 01 SEP 1752 AND @#DGREGORIAN@ 30 SEP 1752'), + '@#DJULIAN@ 20 FEB 1742/43' => new Date('@#DJULIAN@ 20 FEB 1742/43'), + 'FROM 1900 TO 1910' => new Date('FROM 1900 TO 1910'), + 'FROM 1900' => new Date('FROM 1900'), + 'TO 1910' => new Date('TO 1910'), + 'BET 1900 AND 1910' => new Date('BET 1900 AND 1910'), + 'BET JAN 1900 AND MAR 1900' => new Date('BET JAN 1900 AND MAR 1900'), + 'BET APR 1900 AND JUN 1900' => new Date('BET APR 1900 AND JUN 1900'), + 'BET JUL 1900 AND SEP 1900' => new Date('BET JUL 1900 AND SEP 1900'), + 'BET OCT 1900 AND DEC 1900' => new Date('BET OCT 1900 AND DEC 1900'), + 'AFT 1900' => new Date('AFT 1900'), + 'BEF 1910' => new Date('BEF 1910'), // Hijri dates '@#DHIJRI@ 1497' => new Date('@#DHIJRI@ 1497'), '@#DHIJRI@ MUHAR 1497' => new Date('@#DHIJRI@ MUHAR 1497'), @@ -251,10 +251,7 @@ case 'PLAC': case 'RESN': $title = GedcomTag::getLabel('RESN'); - $text = - I18N::translate('Restrictions can be added to records and/or facts. They restrict who can view the data and who can edit it.') . - '<br><br>' . - I18N::translate('Note that if a user account is linked to a record, then that user will always be able to view that record.'); + $text = I18N::translate('Restrictions can be added to records and/or facts. They restrict who can view the data and who can edit it.') . '<br><br>' . I18N::translate('Note that if a user account is linked to a record, then that user will always be able to view that record.'); break; case 'ROMN': @@ -288,10 +285,7 @@ case 'google_chart_surname': case 'pending_changes': $title = I18N::translate('Pending changes'); - $text = - '<p>' . - I18N::translate('When you add, edit, or delete information, the changes are not saved immediately. Instead, they are kept in a “pending” area. These pending changes need to be reviewed by a moderator before they are accepted.') . - '</p><p>' . + $text = '<p>' . I18N::translate('When you add, edit, or delete information, the changes are not saved immediately. Instead, they are kept in a “pending” area. These pending changes need to be reviewed by a moderator before they are accepted.') . '</p><p>' . I18N::translate('This process allows the site’s owner to ensure that the new information follows the site’s standards and conventions, has proper source attributions, etc.') . '</p><p>' . I18N::translate('Pending changes are only shown when your account has permission to edit. When you sign out, you will no longer be able to see them. Also, pending changes are only shown on certain pages. For example, they are not shown in lists, reports, or search results.') . diff --git a/includes/session.php b/includes/session.php index 17b7e49b20..ad904b2520 100644 --- a/includes/session.php +++ b/includes/session.php @@ -123,7 +123,7 @@ require WT_ROOT . 'vendor/autoload.php'; date_default_timezone_set('UTC'); // Calculate the base URL, so we can generate absolute URLs. -$request = Request::createFromGlobals(); +$request = Request::createFromGlobals(); $request_uri = $request->getSchemeAndHttpHost() . $request->getRequestUri(); // Remove any PHP script name and parameters. diff --git a/individual.php b/individual.php index 8cc55e7806..997629bbed 100644 --- a/individual.php +++ b/individual.php @@ -84,7 +84,7 @@ $user_link = ''; if (Auth::isAdmin()) { $user = User::findByIndividual($controller->record); if ($user) { - $user_link = ' — <a href="admin_users.php?filter=' . Html::escape($user->getUserName()) . '">' . Html::escape($user->getUserName()) . '</a>'; + $user_link = ' — <a href="admin_users.php?filter=' . Html::escape($user->getUserName()) . '">' . Html::escape($user->getUserName()) . '</a>'; }; } @@ -229,7 +229,7 @@ default: case 'requestpw': $username = Filter::post('new_passwd_username'); - $user = User::findByIdentifier($username); + $user = User::findByIdentifier($username); if ($user) { $passchars = 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; diff --git a/mediafirewall.php b/mediafirewall.php index ae0825eed4..1eb95bf510 100644 --- a/mediafirewall.php +++ b/mediafirewall.php @@ -70,7 +70,7 @@ try { $cache_dir = new Filesystem(new Local(WT_DATA_DIR . 'thumbnail-cache/' . md5($media_dir))); $assets_dir = new Filesystem(new Local( 'assets')); - $server = ServerFactory::create([ + $server = ServerFactory::create([ 'driver' => $driver, 'source' => $source_dir, 'cache' => $cache_dir, diff --git a/medialist.php b/medialist.php index 7ca896be97..d310457465 100644 --- a/medialist.php +++ b/medialist.php @@ -33,23 +33,23 @@ $controller ->setPageTitle(I18N::translate('Media objects')) ->pageHeader(); -$action = Filter::get('action'); -$page = Filter::getInteger('page'); -$max = Filter::get('max', '10|20|30|40|50|75|100|125|150|200', '20'); -$folder = Filter::get('folder', null, ''); // MySQL needs an empty string, not NULL -$filter = Filter::get('filter', null, ''); // MySQL needs an empty string, not NULL -$subdirs = Filter::get('subdirs', '1'); -$details = Filter::get('details', '1'); -$form_type = Filter::get('form_type', implode('|', array_keys(GedcomTag::getFileFormTypes()))); +$action = Filter::get('action'); +$page = Filter::getInteger('page'); +$max = Filter::get('max', '10|20|30|40|50|75|100|125|150|200', '20'); +$folder = Filter::get('folder', null, ''); // MySQL needs an empty string, not NULL +$filter = Filter::get('filter', null, ''); // MySQL needs an empty string, not NULL +$subdirs = Filter::get('subdirs', '1'); +$details = Filter::get('details', '1'); +$form_type = Filter::get('form_type', implode('|', array_keys(GedcomTag::getFileFormTypes()))); // reset all variables if ($action === 'reset') { - $max = '20'; - $folder = ''; - $subdirs = ''; - $details = ''; - $filter = ''; - $form_type = ''; + $max = '20'; + $folder = ''; + $subdirs = ''; + $details = ''; + $filter = ''; + $form_type = ''; } // A list of all subfolders used by this tree @@ -150,7 +150,7 @@ if ($action === 'submit') { </div> <div class="col"> <?php if ($page > 1): ?> - <a href="<?= $url ?>&page=<?= $page -1 ?>"><?= I18N::translate('previous') ?></a> + <a href="<?= $url ?>&page=<?= $page - 1 ?>"><?= I18N::translate('previous') ?></a> <?php endif ?> </div> <div class="col"> @@ -237,7 +237,7 @@ if ($action === 'submit') { </div> <div class="col"> <?php if ($page > 1): ?> - <a href="<?= $url ?>&page=<?= $page -1 ?>"><?= I18N::translate('previous') ?></a> + <a href="<?= $url ?>&page=<?= $page - 1 ?>"><?= I18N::translate('previous') ?></a> <?php endif ?> </div> <div class="col"> diff --git a/message.php b/message.php index 326efd2da3..2a5452e1cf 100644 --- a/message.php +++ b/message.php @@ -180,7 +180,7 @@ $to_names = implode(I18N::$list_separator, array_map(function(User $user) { retu */ function recipients($to) { if ($to === 'all') { - $recipients = User::all(); + $recipients = User::all(); } elseif ($to === 'last_6mo') { $recipients = array_filter(User::all(), function(User $user) { return $user->getPreference('sessiontime') > 0 && WT_TIMESTAMP - $user->getPreference('sessiontime') > 60 * 60 * 24 * 30 * 6; diff --git a/relationship.php b/relationship.php index 476fd57191..44493f5967 100644 --- a/relationship.php +++ b/relationship.php @@ -23,14 +23,14 @@ use Fisharebest\Webtrees\Module\RelationshipsChartModule; require 'includes/session.php'; -$controller = new RelationshipController; +$controller = new RelationshipController; $max_recursion = (int) $controller->tree()->getPreference('RELATIONSHIP_RECURSION', RelationshipsChartModule::DEFAULT_RECURSION); $ancestors_only = $controller->tree()->getPreference('RELATIONSHIP_ANCESTORS', RelationshipsChartModule::DEFAULT_ANCESTORS); -$pid1 = Filter::get('pid1', WT_REGEX_XREF); -$pid2 = Filter::get('pid2', WT_REGEX_XREF); -$recursion = Filter::getInteger('recursion', 0, $max_recursion, 0); -$ancestors = Filter::get('ancestors', '[01]', '0'); +$pid1 = Filter::get('pid1', WT_REGEX_XREF); +$pid2 = Filter::get('pid2', WT_REGEX_XREF); +$recursion = Filter::getInteger('recursion', 0, $max_recursion, 0); +$ancestors = Filter::get('ancestors', '[01]', '0'); $person1 = Individual::getInstance($pid1, $controller->tree()); $person2 = Individual::getInstance($pid2, $controller->tree()); @@ -115,11 +115,11 @@ if ($person1 && $person2) { if ($person1 && $person2) { if (I18N::direction() === 'ltr') { - $diagonal1 = Theme::theme()->parameter('image-dline'); - $diagonal2 = Theme::theme()->parameter('image-dline2'); + $diagonal1 = Theme::theme()->parameter('image-dline'); + $diagonal2 = Theme::theme()->parameter('image-dline2'); } else { - $diagonal1 = Theme::theme()->parameter('image-dline2'); - $diagonal2 = Theme::theme()->parameter('image-dline'); + $diagonal1 = Theme::theme()->parameter('image-dline2'); + $diagonal2 = Theme::theme()->parameter('image-dline'); } $num_paths = 0; @@ -136,8 +136,8 @@ if ($person1 && $person2) { // Use a table/grid for layout. $table = []; // Current position in the grid. - $x = 0; - $y = 0; + $x = 0; + $y = 0; // Extent of the grid. $min_y = 0; $max_y = 0; diff --git a/reportengine.php b/reportengine.php index 860ece2103..334edb9ce8 100644 --- a/reportengine.php +++ b/reportengine.php @@ -160,9 +160,9 @@ case 'setup': 'value' => $input['default'], ]; $input['control'] = '<input ' . Html::attributes($attributes) . '>'; - $input['extra'] = FontAwesome::linkIcon('calendar', I18N::translate('Select a date'), [ - 'class' => 'btn btn-link', - 'href' => '#', + $input['extra'] = FontAwesome::linkIcon('calendar', I18N::translate('Select a date'), [ + 'class' => 'btn btn-link', + 'href' => '#', 'onclick' => 'return calendarWidget("calendar-widget-' . $n . '", "input-' . $n . '");', ]) . '<div id="calendar-widget-' . $n . '" style="position:absolute;visibility:hidden;background-color:white;z-index:1000;"></div>'; break; diff --git a/resources/views/emails/verify-notify-html.php b/resources/views/emails/verify-notify-html.php index a34f4e1d31..5cfe690a2f 100644 --- a/resources/views/emails/verify-notify-html.php +++ b/resources/views/emails/verify-notify-html.php @@ -12,8 +12,8 @@ <?= I18N::translate('You need to review the account details.') ?> </p> -<a href="<?= Html::escape(Html::url(WT_BASE_URL . 'admin_users.php', ['action' => 'edit', 'user_id' => $user->getUserId()])) ?>"> - <?= Html::escape(Html::url(WT_BASE_URL . 'admin_users.php', ['action' => 'edit', 'user_id' => $user->getUserId()])) ?> +<a href="<?= Html::escape(Html::url(WT_BASE_URL . 'admin_users.php', ['action' => 'edit', 'user_id' => $user->getUserId()])) ?>"> + <?= Html::escape(Html::url(WT_BASE_URL . 'admin_users.php', ['action' => 'edit', 'user_id' => $user->getUserId()])) ?> </a> <ul> diff --git a/resources/views/emails/verify-notify-text.php b/resources/views/emails/verify-notify-text.php index fd617c9190..4432297d5e 100644 --- a/resources/views/emails/verify-notify-text.php +++ b/resources/views/emails/verify-notify-text.php @@ -6,7 +6,7 @@ <?= I18N::translate('You need to review the account details.') ?> -<?= Html::url(WT_BASE_URL . 'admin_users.php', ['action' => 'edit', 'user_id' => $user->getUserId()]) ?> +<?= Html::url(WT_BASE_URL . 'admin_users.php', ['action' => 'edit', 'user_id' => $user->getUserId()]) ?> <?= /* I18N: You need to: */ I18N::translate('Set the status to “approved”.') ?> <?= /* I18N: You need to: */ I18N::translate('Set the access level for each tree.') ?> @@ -129,8 +129,8 @@ if (!isset($_POST['lang'])) { } // Recommended extensions foreach ([ - 'gd' => /* I18N: a program feature */ I18N::translate('creating thumbnails of images'), - 'xml' => /* I18N: a program feature */ I18N::translate('reporting'), + 'gd' => /* I18N: a program feature */ I18N::translate('creating thumbnails of images'), + 'xml' => /* I18N: a program feature */ I18N::translate('reporting'), 'simplexml' => /* I18N: a program feature */ I18N::translate('reporting'), ] as $extension => $features) { if (!extension_loaded($extension)) { diff --git a/statisticsplot.php b/statisticsplot.php index 4b7cbb4b86..53e188d770 100644 --- a/statisticsplot.php +++ b/statisticsplot.php @@ -1107,9 +1107,9 @@ case '19': $male_female = false; $z_boundaries[0] = 100000; if ($z_axis === 300) { - $zgiven = false; - $legend[0] = 'all'; - $zmax = 1; + $zgiven = false; + $legend[0] = 'all'; + $zmax = 1; } elseif ($z_axis === 301) { $male_female = true; $zgiven = true; diff --git a/tests/app/Census/CensusOfCzechRepublicTest.php b/tests/app/Census/CensusOfCzechRepublicTest.php index 2ad53e68c2..1134167082 100644 --- a/tests/app/Census/CensusOfCzechRepublicTest.php +++ b/tests/app/Census/CensusOfCzechRepublicTest.php @@ -37,7 +37,7 @@ class CensusOfCzechRepublicTest extends \PHPUnit_Framework_TestCase { * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic */ public function testAllDates() { - $census = new CensusOfCzechRepublic; + $census = new CensusOfCzechRepublic; $census_dates = $census->allCensusDates(); diff --git a/tests/app/Census/CensusOfDenmarkTest.php b/tests/app/Census/CensusOfDenmarkTest.php index 76f4e549a4..9c222d6079 100644 --- a/tests/app/Census/CensusOfDenmarkTest.php +++ b/tests/app/Census/CensusOfDenmarkTest.php @@ -37,7 +37,7 @@ class CensusOfDenmarkTest extends \PHPUnit_Framework_TestCase { * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark */ public function testAllDates() { - $census = new CensusOfDenmark; + $census = new CensusOfDenmark; $census_dates = $census->allCensusDates(); diff --git a/tests/app/Census/CensusOfDeutschlandTest.php b/tests/app/Census/CensusOfDeutschlandTest.php index 244f16cd53..ce6e293526 100644 --- a/tests/app/Census/CensusOfDeutschlandTest.php +++ b/tests/app/Census/CensusOfDeutschlandTest.php @@ -37,7 +37,7 @@ class CensusOfDeutschlandTest extends \PHPUnit_Framework_TestCase { * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland */ public function testAllDates() { - $census = new CensusOfDeutschland; + $census = new CensusOfDeutschland; $census_dates = $census->allCensusDates(); diff --git a/tests/app/Census/CensusOfEnglandTest.php b/tests/app/Census/CensusOfEnglandTest.php index a40e358404..b4a4d0100b 100644 --- a/tests/app/Census/CensusOfEnglandTest.php +++ b/tests/app/Census/CensusOfEnglandTest.php @@ -37,7 +37,7 @@ class CensusOfEnglandTest extends \PHPUnit_Framework_TestCase { * @covers \Fisharebest\Webtrees\Census\CensusOfEngland */ public function testAllDates() { - $census = new CensusOfEngland; + $census = new CensusOfEngland; $census_dates = $census->allCensusDates(); diff --git a/tests/app/Census/CensusOfFranceTest.php b/tests/app/Census/CensusOfFranceTest.php index 769be2b30f..922febc501 100644 --- a/tests/app/Census/CensusOfFranceTest.php +++ b/tests/app/Census/CensusOfFranceTest.php @@ -37,7 +37,7 @@ class CensusOfFranceTest extends \PHPUnit_Framework_TestCase { * @covers \Fisharebest\Webtrees\Census\CensusOfFrance */ public function testAllDates() { - $census = new CensusOfFrance; + $census = new CensusOfFrance; $census_dates = $census->allCensusDates(); diff --git a/tests/app/Census/CensusOfScotlandTest.php b/tests/app/Census/CensusOfScotlandTest.php index 3a8ed96e9a..a2503105a0 100644 --- a/tests/app/Census/CensusOfScotlandTest.php +++ b/tests/app/Census/CensusOfScotlandTest.php @@ -37,7 +37,7 @@ class CensusOfScotlandTest extends \PHPUnit_Framework_TestCase { * @covers \Fisharebest\Webtrees\Census\CensusOfScotland */ public function testAllDates() { - $census = new CensusOfScotland; + $census = new CensusOfScotland; $census_dates = $census->allCensusDates(); diff --git a/tests/app/Census/CensusOfUnitedStatesTest.php b/tests/app/Census/CensusOfUnitedStatesTest.php index e7aef072ff..0ac31a09e1 100644 --- a/tests/app/Census/CensusOfUnitedStatesTest.php +++ b/tests/app/Census/CensusOfUnitedStatesTest.php @@ -37,7 +37,7 @@ class CensusOfUnitedStatesTest extends \PHPUnit_Framework_TestCase { * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates */ public function testAllDates() { - $census = new CensusOfUnitedStates; + $census = new CensusOfUnitedStates; $census_dates = $census->allCensusDates(); diff --git a/tests/app/Census/CensusOfWalesTest.php b/tests/app/Census/CensusOfWalesTest.php index b3e4a6aece..662642e9bf 100644 --- a/tests/app/Census/CensusOfWalesTest.php +++ b/tests/app/Census/CensusOfWalesTest.php @@ -37,7 +37,7 @@ class CensusOfWalesTest extends \PHPUnit_Framework_TestCase { * @covers \Fisharebest\Webtrees\Census\CensusOfWales */ public function testAllDates() { - $census = new CensusOfWales; + $census = new CensusOfWales; $census_dates = $census->allCensusDates(); |
