summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-03-02 21:21:40 +0000
committerGreg Roach <fisharebest@webtrees.net>2019-03-02 21:21:40 +0000
commit041cc9179fec8ae3763d2cdf46af3c9343d04404 (patch)
tree085c30791ace9d28842122ef00a24838abe5fe4e
parentf6f7bcfffb8de388b89285e219c3c8090e3d9e52 (diff)
downloadwebtrees-041cc9179fec8ae3763d2cdf46af3c9343d04404.tar.gz
webtrees-041cc9179fec8ae3763d2cdf46af3c9343d04404.tar.bz2
webtrees-041cc9179fec8ae3763d2cdf46af3c9343d04404.zip
Remove global variable
-rw-r--r--app/Functions/FunctionsEdit.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Functions/FunctionsEdit.php b/app/Functions/FunctionsEdit.php
index b757b26286..c8a9b7d674 100644
--- a/app/Functions/FunctionsEdit.php
+++ b/app/Functions/FunctionsEdit.php
@@ -47,6 +47,7 @@ use Fisharebest\Webtrees\Services\UserService;
use Fisharebest\Webtrees\Source;
use Fisharebest\Webtrees\Tree;
use Ramsey\Uuid\Uuid;
+use Symfony\Component\HttpFoundation\Request;
/**
* Class FunctionsEdit - common functions for editing
@@ -460,9 +461,8 @@ class FunctionsEdit
*/
public static function addSimpleTag(Tree $tree, $tag, $upperlevel = '', $label = ''): string
{
- // @TODO $xref is no longer set (from edit_interface).
- global $request;
- $xref = $request->get('xref', '');
+ $request = app()->make(Request::class);
+ $xref = $request->get('xref', '');
// Some form fields need access to previous form fields.
static $previous_ids = [