Alexander Nicolaysen Sørnes : objectManager: Display reply text when editing another user's entry

Chris Morgan cmorgan at winehq.org
Sun Sep 30 09:36:55 CDT 2007


Module: appdb
Branch: master
Commit: 5875da01a70acc421a9dd62d2b17d14f81b29853
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=5875da01a70acc421a9dd62d2b17d14f81b29853

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Sat Sep 29 22:12:40 2007 +0200

objectManager: Display reply text when editing another user's entry

---

 include/objectManager.php |   42 ++++++++++++++++++++++--------------------
 1 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/include/objectManager.php b/include/objectManager.php
index 549d675..807824b 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -287,7 +287,7 @@ class ObjectManager
 
         /* if this is a queue add a dialog for replying to the submitter of the
            queued entry */
-        if($this->bIsQueue)
+        if($this->bIsQueue || ($oObject->objectGetSubmitterId() && $oObject->objectGetSubmitterId() != $_SESSION['current']->iUserId))
         {
             /* If it isn't implemented, that means there is no default text */
             if(method_exists(new $this->sClass, "getDefaultReply"))
@@ -299,27 +299,29 @@ class ObjectManager
             echo '<td><textarea name="sReplyText" style="width: 100%" cols="80" '. 
                  'rows="10">'.$sDefaultReply.'</textarea></td></tr>',"\n";
 
-
-            /////////////////////////////////////////////////
-            // output radio buttons for some common responses
-            echo '<tr valign=top><td class="color0"></td><td class="color0">'.
-              '<b>Common replies</b><br/> Email <a href="mailto:'.APPDB_OWNER_EMAIL.'">'.
-              APPDB_OWNER_EMAIL.'</a> if you want to suggest a new common reply.</td></tr>',"\n";
-
-            // NOTE: We use the label tag so the user can click anywhere in
-            // the text of the radio button to select the radio button.
-            // Otherwise the user has to click on the very small circle portion
-            // of the button to select it
-            foreach($this->aCommonResponses as $iIndex => $sReply)
+            if($this->bIsQueue)
             {
-              echo '<tr valign=top><td class="color0"></td>',"\n";
-              echo '<td class="color0"><label for="'.$iIndex.'"><input'.
-                ' type="radio" name="sOMCommonReply" id="'.$iIndex.'" value="'.$sReply.'"/>'.
-                $sReply.'</label></td>',"\n";
-              echo '</tr>',"\n";
+                /////////////////////////////////////////////////
+                // output radio buttons for some common responses
+                echo '<tr valign=top><td class="color0"></td><td class="color0">'.
+                '<b>Common replies</b><br/> Email <a href="mailto:'.APPDB_OWNER_EMAIL.'">'.
+                APPDB_OWNER_EMAIL.'</a> if you want to suggest a new common reply.</td></tr>',"\n";
+
+                // NOTE: We use the label tag so the user can click anywhere in
+                // the text of the radio button to select the radio button.
+                // Otherwise the user has to click on the very small circle portion
+                // of the button to select it
+                foreach($this->aCommonResponses as $iIndex => $sReply)
+                {
+                echo '<tr valign=top><td class="color0"></td>',"\n";
+                echo '<td class="color0"><label for="'.$iIndex.'"><input'.
+                    ' type="radio" name="sOMCommonReply" id="'.$iIndex.'" value="'.$sReply.'"/>'.
+                    $sReply.'</label></td>',"\n";
+                echo '</tr>',"\n";
+                }
+                // end output radio buttons for common responses
+                /////////////////////////////////////////////////
             }
-            // end output radio buttons for common responses
-            /////////////////////////////////////////////////
 
 
             /* buttons for operations we can perform on this entry */




More information about the wine-cvs mailing list