Alexander Nicolaysen Sørnes : Improve help text on the confirm deletion page

Chris Morgan cmorgan at winehq.org
Tue Oct 23 18:31:16 CDT 2007


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

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Tue Oct 23 16:21:17 2007 +0200

Improve help text on the confirm deletion page

---

 include/objectManager.php |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/include/objectManager.php b/include/objectManager.php
index 8c49d0c..b40a461 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -433,6 +433,22 @@ class ObjectManager
             return;
         }
 
+        /* Why the user should write an explanation for the deletion */
+        if($oObject->objectGetSubmitterId() != $_SESSION['current']->iUserId)
+        {
+            $shWhyComment = "Please enter a reason why so that you don&#8217;t hurt the submitter&#8217;s".
+                            " feelings.";
+
+            $oUser = new user($oObject->objectGetSubmitterId());
+            $sSubmitter = " (submitted by ".$oUser->objectMakeLink().")";
+        } else
+        {
+            $shWhyComment = "Although you submitted it it might be useful for other users to know why ".
+                            "you are deleting it.";
+
+            $sSubmitter = "";
+        }
+
         $oTable = new Table();
         $oTableRow = new TableRow();
         $oTable->setAlign("center");
@@ -444,9 +460,8 @@ class ObjectManager
         "Confirm deletion".
         "</div>".
         '<div class="info_contents">'.
-        "Are you sure you wish to delete this entry?<br />".
-        "Please enter a reason why so that you don&#8217;t hurt the submitter&#8217;s".
-        " feelings.".
+        "Are you sure you wish to delete this entry".$sSubmitter."?<br />".
+        $shWhyComment.
         "</div>".
         "</div>".
 




More information about the wine-cvs mailing list