summaryrefslogtreecommitdiff
path: root/app/Report/ReportParserGenerate.php
diff options
context:
space:
mode:
authorScrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>2018-09-23 17:45:07 +0200
committerGreg Roach <fisharebest@gmail.com>2018-09-23 16:45:07 +0100
commit7a899edebc26ee2b42546baa6f2f0115679f901b (patch)
treeb459ff14285ff3d397a274a287d8d8f226ca0801 /app/Report/ReportParserGenerate.php
parent5f9f5f945848a4f657e142aba6bac7a29d525e02 (diff)
downloadwebtrees-7a899edebc26ee2b42546baa6f2f0115679f901b.tar.gz
webtrees-7a899edebc26ee2b42546baa6f2f0115679f901b.tar.bz2
webtrees-7a899edebc26ee2b42546baa6f2f0115679f901b.zip
Scrutinizer Auto-Fixes (#1924)
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
Diffstat (limited to 'app/Report/ReportParserGenerate.php')
-rw-r--r--app/Report/ReportParserGenerate.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/Report/ReportParserGenerate.php b/app/Report/ReportParserGenerate.php
index e0710b0504..b05d365767 100644
--- a/app/Report/ReportParserGenerate.php
+++ b/app/Report/ReportParserGenerate.php
@@ -1847,7 +1847,7 @@ class ReportParserGenerate extends ReportParserBase
// Some filters/sorts can be applied using SQL, while others require PHP
switch ($listname) {
case 'pending':
- $rows = Database::prepare(
+ $rows = Database::prepare(
"SELECT xref, CASE new_gedcom WHEN '' THEN old_gedcom ELSE new_gedcom END AS gedcom" .
" FROM `##change`" . " WHERE (xref, change_id) IN (" .
" SELECT xref, MAX(change_id)" .
@@ -1886,7 +1886,7 @@ class ReportParserGenerate extends ReportParserBase
$sql_params[$attr . 'date'] = $date->minimumJulianDay();
}
if ($sortby == $match[1]) {
- $sortby = "";
+ $sortby = "";
$sql_order_by .= ($sql_order_by ? ", " : " ORDER BY ") . "{$attr}.d_julianday1";
}
unset($attrs[$attr]); // This filter has been fully processed
@@ -1898,13 +1898,13 @@ class ReportParserGenerate extends ReportParserBase
if ($match[1] != '') {
$names = explode(' ', $match[1]);
foreach ($names as $n => $name) {
- $sql_where .= " AND {$attr}.n_full LIKE CONCAT('%', :{$attr}name{$n}, '%')";
+ $sql_where .= " AND {$attr}.n_full LIKE CONCAT('%', :{$attr}name{$n}, '%')";
$sql_params[$attr . 'name' . $n] = $name;
}
}
// Let the DB do the name sorting even when no name was entered
if ($sortby == 'NAME') {
- $sortby = '';
+ $sortby = '';
$sql_order_by .= ($sql_order_by ? ', ' : ' ORDER BY ') . "{$attr}.n_sort";
}
}
@@ -1921,7 +1921,7 @@ class ReportParserGenerate extends ReportParserBase
$sql_params[$attr . 'place'] = $match[1];
// Don't unset this filter. This is just initial filtering
} elseif (preg_match('/^(\w*):*(\w*) CONTAINS (.+)$/', $value, $match)) {
- $sql_where .= " AND i_gedcom LIKE CONCAT('%', :{$attr}contains1, '%', :{$attr}contains2, '%', :{$attr}contains3, '%')";
+ $sql_where .= " AND i_gedcom LIKE CONCAT('%', :{$attr}contains1, '%', :{$attr}contains2, '%', :{$attr}contains3, '%')";
$sql_params[$attr . 'contains1'] = $match[1];
$sql_params[$attr . 'contains2'] = $match[2];
$sql_params[$attr . 'contains3'] = $match[3];
@@ -1963,7 +1963,7 @@ class ReportParserGenerate extends ReportParserBase
$sql_params[$attr . 'date'] = $date->minimumJulianDay();
}
if ($sortby == $match[1]) {
- $sortby = '';
+ $sortby = '';
$sql_order_by .= ($sql_order_by ? ', ' : ' ORDER BY ') . "{$attr}.d_julianday1";
}
unset($attrs[$attr]); // This filter has been fully processed
@@ -1980,13 +1980,13 @@ class ReportParserGenerate extends ReportParserBase
if ($match[1] != '') {
$names = explode(' ', $match[1]);
foreach ($names as $n => $name) {
- $sql_where .= " AND {$attr}.n_full LIKE CONCAT('%', :{$attr}name{$n}, '%')";
+ $sql_where .= " AND {$attr}.n_full LIKE CONCAT('%', :{$attr}name{$n}, '%')";
$sql_params[$attr . 'name' . $n] = $name;
}
}
// Let the DB do the name sorting even when no name was entered
if ($sortby == 'NAME') {
- $sortby = '';
+ $sortby = '';
$sql_order_by .= ($sql_order_by ? ', ' : ' ORDER BY ') . "{$attr}.n_sort";
}
}
@@ -1998,7 +1998,7 @@ class ReportParserGenerate extends ReportParserBase
$sql_params[$attr . 'place'] = $match[1];
// Don't unset this filter. This is just initial filtering
} elseif (preg_match('/^(\w*):*(\w*) CONTAINS (.+)$/', $value, $match)) {
- $sql_where .= " AND f_gedcom LIKE CONCAT('%', :{$attr}contains1, '%', :{$attr}contains2, '%', :{$attr}contains3, '%')";
+ $sql_where .= " AND f_gedcom LIKE CONCAT('%', :{$attr}contains1, '%', :{$attr}contains2, '%', :{$attr}contains3, '%')";
$sql_params[$attr . 'contains1'] = $match[1];
$sql_params[$attr . 'contains2'] = $match[2];
$sql_params[$attr . 'contains3'] = $match[3];