Alexander Nicolaysen Sørnes : Allow removing downloadurl from queued versions

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


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

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

Allow removing downloadurl from queued versions

---

 include/downloadurl.php |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/downloadurl.php b/include/downloadurl.php
index 340e2f2..4b0498d 100644
--- a/include/downloadurl.php
+++ b/include/downloadurl.php
@@ -351,6 +351,12 @@ class downloadurl
         if(!$this->bQueued && !$this->canEdit($this->iVersionId))
             return FALSE;
 
+        if(!$this->sDescription && !$this->sUrl)
+        {
+            $this->delete();
+            return true;
+        }
+
         $hResult = query_parameters("UPDATE appData SET
                    description = '?', url = '?' WHERE id = '?'",
                        $this->sDescription, $this->sUrl, $this->iId);




More information about the wine-cvs mailing list