1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Index: trunk/private/themesite.class.php
===================================================================
--- trunk/private/themesite.class.php	(Revision 24603)
+++ trunk/private/themesite.class.php	(Arbeitskopie)
@@ -299,10 +299,16 @@
         );
         $data = $this->db->query($sql)->next();
         $url = sprintf("%s/%s/%s",$data['mainlcd'],$data['shortname'],$data['zipfile']);
-        
-        $sql = sprintf("UPDATE themes SET downloadcnt=downloadcnt+1 WHERE RowId='%s'",
-            db::quote($themeid)
-        );
+        $cookiename = "downloadcnd_{$themeid}";
+
+        if (!(isset($_COOKIE[$cookiename])))
+        {
+            $sql = sprintf("UPDATE themes SET downloadcnt=downloadcnt+1 WHERE RowId='%s'",
+                db::quote($themeid)
+            );
+        }
+        setcookie($cookiename, "foo", time()+30);
+
         $this->db->query($sql);
         return $url;
     }