Author: sevein
Date: Sat Oct  9 05:24:00 2010
New Revision: 8035

Log:
Allow users to remove maintenance note content in function forms. Fixes issue 
1791.

Modified:
   trunk/apps/qubit/modules/function/actions/editAction.class.php

Modified: trunk/apps/qubit/modules/function/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/function/actions/editAction.class.php      Sat Oct 
 9 04:46:07 2010        (r8034)
+++ trunk/apps/qubit/modules/function/actions/editAction.class.php      Sat Oct 
 9 05:24:00 2010        (r8035)
@@ -303,19 +303,16 @@
         $criteria->add(QubitNote::TYPE_ID, QubitTerm::MAINTENANCE_NOTE_ID);
         $note = QubitNote::getOne($criteria);
 
-        if (0 < strlen($value = $this->form->getValue($name)))
+        if (null === $note)
         {
-          if (null === $note)
-          {
-            // Create a maintenance note for this object if one doesn't exist
-            $note = new QubitNote;
-            $note->typeId = QubitTerm::MAINTENANCE_NOTE_ID;
-          }
+          // Create a maintenance note for this object if one doesn't exist
+          $note = new QubitNote;
+          $note->typeId = QubitTerm::MAINTENANCE_NOTE_ID;
+        }
 
-          $note->content = $value;
+        $note->content = $this->form->getValue($name);
 
-          $this->func->notes[] = $note;
-        }
+        $this->func->notes[] = $note;
 
         break;
 

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to