From 4926bc9737c8f1871c9043ec0007c04d1f62f9b9 Mon Sep 17 00:00:00 2001 From: "melaniekung." <71947221+melaniekung@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:07:51 -0700 Subject: [PATCH] Fix delete function of 'Lang and script note'. (#1846) (#1866) Update delete function for 'Language and script note' field to delete entry from database and removing duplicate check for deleted entry. --- lib/model/om/BaseNote.php | 2 +- plugins/sfIsadPlugin/lib/sfIsadPlugin.class.php | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/model/om/BaseNote.php b/lib/model/om/BaseNote.php index b0e86d319a..740a8bbb31 100644 --- a/lib/model/om/BaseNote.php +++ b/lib/model/om/BaseNote.php @@ -405,7 +405,7 @@ public function save($connection = null) { if ($this->deleted) { - throw new PropelException('You cannot save an object that has been deleted.'); + return $this; } if ($this->new) diff --git a/plugins/sfIsadPlugin/lib/sfIsadPlugin.class.php b/plugins/sfIsadPlugin/lib/sfIsadPlugin.class.php index 952070ba31..b5fc616a2a 100644 --- a/plugins/sfIsadPlugin/lib/sfIsadPlugin.class.php +++ b/plugins/sfIsadPlugin/lib/sfIsadPlugin.class.php @@ -77,13 +77,6 @@ public function __set($name, $value) if (0 == strlen($value)) { // Delete note if it's available if (!$missingNote) { - // Update deleted note on duplication - if (!isset($value)) { - $note->content = $value; - - break; - } - $note->delete(); }