diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2018-12-19 11:44:03 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2018-12-19 11:44:03 +0000 |
| commit | 5f2ae57322ecd2d23660294256ca8376fd889348 (patch) | |
| tree | 314f927e493bccacf8b3aa00bd1c6d31758fa785 /app/Module/ReviewChangesModule.php | |
| parent | b1ed19986adeaa0c1001a72232d9d0f2be5f99d3 (diff) | |
| download | webtrees-5f2ae57322ecd2d23660294256ca8376fd889348.tar.gz webtrees-5f2ae57322ecd2d23660294256ca8376fd889348.tar.bz2 webtrees-5f2ae57322ecd2d23660294256ca8376fd889348.zip | |
Refactor $ctype global as a parameter
Diffstat (limited to 'app/Module/ReviewChangesModule.php')
| -rw-r--r-- | app/Module/ReviewChangesModule.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/Module/ReviewChangesModule.php b/app/Module/ReviewChangesModule.php index f3fa99b144..c936e07940 100644 --- a/app/Module/ReviewChangesModule.php +++ b/app/Module/ReviewChangesModule.php @@ -52,15 +52,13 @@ class ReviewChangesModule extends AbstractModule implements ModuleBlockInterface * * @param Tree $tree * @param int $block_id - * @param bool $template + * @param string $ctype * @param string[] $cfg * * @return string */ - public function getBlock(Tree $tree, int $block_id, bool $template = true, array $cfg = []): string + public function getBlock(Tree $tree, int $block_id, string $ctype = '', array $cfg = []): string { - global $ctype; - $sendmail = $this->getBlockSetting($block_id, 'sendmail', '1'); $days = $this->getBlockSetting($block_id, 'days', '1'); @@ -140,7 +138,7 @@ class ReviewChangesModule extends AbstractModule implements ModuleBlockInterface } $content .= '</ul>'; - if ($template) { + if ($ctype) { if ($ctype === 'gedcom' && Auth::isManager($tree)) { $config_url = route('tree-page-block-edit', [ 'block_id' => $block_id, |
