From ec8efec61ea433b5473c6e9134954bd6fc6ab805 Mon Sep 17 00:00:00 2001 From: Rod Wright Date: Mon, 23 Feb 2026 06:37:51 -0500 Subject: [PATCH] determine original owner of template to prevent stealing it when the intent is to copy it --- distfiles/templates.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/distfiles/templates.php b/distfiles/templates.php index 8282715..87829df 100644 --- a/distfiles/templates.php +++ b/distfiles/templates.php @@ -162,6 +162,12 @@ if ($usertemplateid) { $loadtemplate = NULL; } +// determine original owner of template +$orig_owner=dblookup($db, "notetemplates","templateid","tech",$templateid); +if ($efftechid != NULL && $efftechid != $orig_owner) { + $operation="add"; +} + if ($operation == "add") { if ($submit) { if ($note) {