[AppDB] Do not show delete button or comment box on manage notes page

Rosanne DiMesio dimesio at earthlink.net
Fri Jun 16 13:44:06 CDT 2017


The sole purpose of the manage notes page is to enable maintainers
to reorder the notes display for their version. The delete button
and comment box don't actually do anything. Fixes bug 38509.

Signed-off-by: Rosanne DiMesio <dimesio at earthlink.net>
---
 include/objectManager.php    | 20 +++++++++++---------
 include/tagAssignmentMgr.php | 10 ++++++++++
 2 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/include/objectManager.php b/include/objectManager.php
index 10c52d3..331992b 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -409,17 +409,19 @@ class ObjectManager
         /* If it isn't implemented, that means there is no default text */
         $sDefaultReply = $this->getOptionalSetting("getDefaultReply", "");
 
-        if($this->getIsQueue())
-            $sReplyFieldHeader = 'Reply Text';
-        else
-            $sReplyFieldHeader = 'Comment';
+        if(!$this->getOptionalSetting("objectHideReplyField", FALSE))
+        {
+            if($this->getIsQueue())
+                $sReplyFieldHeader = 'Reply Text';
+            else
+                $sReplyFieldHeader = 'Comment';
 
-        echo html_frame_start($sReplyFieldHeader, "90%", "", 0);
-        echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
-        echo '<tr valign=top><td class="color0"><b>E-mail Text</b></td>',"\n";
-        echo '<td><textarea name="sReplyText" style="width: 100%" cols="80" '. 
+            echo html_frame_start($sReplyFieldHeader, "90%", "", 0);
+            echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
+            echo '<tr valign=top><td class="color0"><b>E-mail Text</b></td>',"\n";
+            echo '<td><textarea name="sReplyText" style="width: 100%" cols="80" '. 
                 'rows="10">'.$sDefaultReply.'</textarea></td></tr>',"\n";
-
+        }
         if($this->getIsQueue())
         {
             /////////////////////////////////////////////////
diff --git a/include/tagAssignmentMgr.php b/include/tagAssignmentMgr.php
index 37ddb7f..255bba0 100644
--- a/include/tagAssignmentMgr.php
+++ b/include/tagAssignmentMgr.php
@@ -52,6 +52,16 @@ abstract class TagAssignmentMgr extends ObjectManagerBase
         return null;
     }
     
+    function objectHideDelete()
+    {
+        return true;
+    }
+    
+    function objectHideReplyField()
+    {
+        return true;
+    }
+    
     public function outputEditor()
     {
         if(sizeof($this->aTaggedEntries) == 0)
-- 
2.12.3




More information about the wine-patches mailing list