Alexander Nicolaysen Sørnes : Use objectManager to delete screenshots

Chris Morgan cmorgan at winehq.org
Thu Sep 27 08:23:13 CDT 2007


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

Author: Alexander Nicolaysen Sørnes <alexander at alex.alexstyrt>
Date:   Thu Sep 27 12:26:00 2007 +0200

Use objectManager to delete screenshots

---

 include/objectManager.php |    3 ++-
 screenshots.php           |    4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/objectManager.php b/include/objectManager.php
index 0aacf10..76680f5 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -935,7 +935,8 @@ class ObjectManager
         if($sAction)
             $sUrl .= "&sAction=$sAction";
 
-
+        if($this->sReturnTo)
+            $sUrl .= "&sReturnTo=".urlencode($this->sReturnTo);
 
         if(!$sTitle)
             $sTitle = $this->sTitle;
diff --git a/screenshots.php b/screenshots.php
index 306ae7d..ca23e53 100644
--- a/screenshots.php
+++ b/screenshots.php
@@ -107,7 +107,9 @@ if($hResult && query_num_rows($hResult))
             )
           )
         {
-            echo "<br />[<a href='screenshots.php?sCmd=delete&iImageId=$oRow->id&iAppId=".$aClean['iAppId']."&iVersionId=".$aClean['iVersionId']."'>Delete Image</a>]";
+            $oM = new objectManager("screenshot");
+            $oM->sReturnTo = "screenshots.php?iAppId=".$oScreenshot->iAppId."&iVersionId=".$oScreenshot->iVersionId;
+            echo '<br />[<a href="'.$oM->makeUrl("delete", $oScreenshot->iScreenshotId, "Delete Screenshot").'">Delete</a>]';
         }
 
         echo "</div></td>\n";




More information about the wine-cvs mailing list