Alexander Nicolaysen Sørnes : Remove downloadurl::processFormSingle

Chris Morgan cmorgan at winehq.org
Fri Oct 3 07:37:10 CDT 2008


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

Author: Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
Date:   Fri Oct  3 13:48:56 2008 +0200

Remove downloadurl::processFormSingle

---

 include/downloadurl.php   |   31 -------------------------------
 include/version_queue.php |    5 ++---
 2 files changed, 2 insertions(+), 34 deletions(-)

diff --git a/include/downloadurl.php b/include/downloadurl.php
index d4903da..340e2f2 100644
--- a/include/downloadurl.php
+++ b/include/downloadurl.php
@@ -361,37 +361,6 @@ class downloadurl
         return TRUE;
     }
 
-    /* Process a form made only for submitting one URL */
-    function processFormSingle($iVersionId, $aValues, $bUnQueue = FALSE)
-    {
-        /* Calling this function without suitable input data is perfectly valid,
-           but in that case there is nothing to do here */
-        if(empty($aValues['sDownloadUrlDescription']) || 
-                empty($aValues['sDownloadUrlUrl']))
-            return;
-
-        $iId = null;
-        if($hResult = appData::getData($iVersionId, "downloadurl", TRUE, TRUE))
-        {
-            $oObject = query_fetch_object($hResult);
-            $iId = $oObject->id;
-        }
-
-        $oDownloadurl = new downloadurl($iId);
-
-        $oDownloadurl->sDescription = $aValues['sDownloadUrlDescription'];
-        $oDownloadurl->sUrl = $aValues['sDownloadUrlUrl'];
-        $oDownloadurl->iVersionId = $iVersionId;
-
-        if($iId)
-            $oDownloadurl->update();
-        else
-            $oDownloadurl->create();
-
-        if($bUnQueue)
-            $oDownloadurl->unQueue();
-    }
-
     function unQueue()
     {
         if($this->mustBeQueued())
diff --git a/include/version_queue.php b/include/version_queue.php
index db3dd01..e2bba12 100644
--- a/include/version_queue.php
+++ b/include/version_queue.php
@@ -46,9 +46,8 @@ class version_queue
 
         $this->oTestDataQueue->oTestData->iVersionId = $this->oVersion->iVersionId;
         $this->oTestDataQueue->create();
-        $this->oDownloadUrl->processFormSingle($this->oVersion->iVersionId,
-                                               $aClean,
-                                               $this->oVersion->canEdit());
+        $this->oDownloadUrl->objectSetParent($this->oVersion->objectGetId());
+        $this->oDownloadUrl->create();
 
         return TRUE;
     }




More information about the wine-cvs mailing list