Alexander Nicolaysen Sørnes : application: Only show submitter column when processing queued entries

Chris Morgan cmorgan at winehq.org
Thu Jun 12 18:53:07 CDT 2008


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

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Fri Jun 13 00:03:58 2008 +0200

application: Only show submitter column when processing queued entries

---

 include/application.php       |   12 +++++++++---
 include/application_queue.php |    4 ++--
 include/objectManager.php     |    2 +-
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/include/application.php b/include/application.php
index bb50fc4..8ce20bb 100644
--- a/include/application.php
+++ b/include/application.php
@@ -1030,11 +1030,14 @@ class Application {
         return array('submitTime', 'appName', 'appId', 'userName', 'vendorName');
     }
 
-    public static function objectGetHeader()
+    public static function objectGetHeader($sState)
     {
         $oTableRow = new TableRowSortable();
         $oTableRow->AddSortableTextCell('Submission Date', 'submitTime');
-        $oTableRow->AddTextCell('Submitter');
+
+        /* Only show submitter when processing queued entries */
+        if($sState != 'accepted')
+            $oTableRow->AddTextCell('Submitter');
         $oTableRow->AddSortableTextCell('Vendor', 'vendorName');
         $oTableRow->AddSortableTextCell('Application', 'appName');
         return $oTableRow;
@@ -1049,7 +1052,10 @@ class Application {
 
         $oTableRow = new TableRow();
         $oTableRow->AddTextCell(print_date(mysqldatetime_to_unixtimestamp($this->sSubmitTime)));
-        $oTableRow->AddTextCell($oUser->objectMakeLink());
+
+        /* Only show submitter when processing queued entries */
+        if($this->sState != 'accepted')
+            $oTableRow->AddTextCell($oUser->objectMakeLink());
         $oTableRow->AddTextCell($sVendor);
         $oTableRow->AddTextCell(($this->sState == 'accepted') ? $this->objectMakeLink() : $this->sName);
 
diff --git a/include/application_queue.php b/include/application_queue.php
index 9e02bba..0c7f2f3 100644
--- a/include/application_queue.php
+++ b/include/application_queue.php
@@ -400,9 +400,9 @@ class application_queue
         return application::objectGetSortableFields();
     }
 
-    function objectGetHeader()
+    function objectGetHeader($sState)
     {
-        return $this->oApp->objectGetHeader();
+        return $this->oApp->objectGetHeader($sState);
     }
 
     function objectGetTableRow()
diff --git a/include/objectManager.php b/include/objectManager.php
index 1b8fb4c..f565185 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -1315,7 +1315,7 @@ class ObjectManager
     private function outputHeader($sClass)
     {
         $oObject = new $this->sClass();
-        $oTableRow = $oObject->objectGetHeader();
+        $oTableRow = $oObject->objectGetHeader($this->sState);
 
         /* Add an action column if the user can edit this class, or if it is a queue.
            Even though a user annot process items, he can edit his queued submissions */




More information about the wine-cvs mailing list