summaryrefslogtreecommitdiffstats
path: root/inc/property.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/property.inc.php')
-rw-r--r--inc/property.inc.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/inc/property.inc.php b/inc/property.inc.php
index 77d2b985..0aa1841e 100644
--- a/inc/property.inc.php
+++ b/inc/property.inc.php
@@ -45,7 +45,7 @@ class Property
. " ON DUPLICATE KEY UPDATE value = VALUES(value), dateline = VALUES(dateline)", array(
'key' => $key,
'value' => $value,
- 'dateline' => time() + ($minage * 60)
+ 'dateline' => ($minage === 0 ? 0 : time() + ($minage * 60))
));
if (self::$cache !== false) {
self::$cache[$key] = $value;
@@ -139,4 +139,14 @@ class Property
self::set('vmstore-config', json_encode($value));
}
+ public static function getDownloadTask($name)
+ {
+ return self::get('dl-' . $name);
+ }
+
+ public static function setDownloadTask($name, $taskId)
+ {
+ self::set('dl-' . $name, $taskId, 5);
+ }
+
}