diff options
author | Mohamed Mujahid <muja_dd@494418.no-reply.drupal.org> | 2010-07-23 10:01:23 +0000 |
---|---|---|
committer | Mohamed Mujahid <muja_dd@494418.no-reply.drupal.org> | 2010-07-23 10:01:23 +0000 |
commit | ef4365879413eab6a0d2be64374a9840c7eed804 (patch) | |
tree | f32097751575177f2245b68b412f55cd95cbc70a /cdn/video_s3/includes/S3.php | |
parent | e8f0a0d58a73a0d3e5877d9cd433e5c191fd93d2 (diff) | |
download | video-ef4365879413eab6a0d2be64374a9840c7eed804.tar.gz video-ef4365879413eab6a0d2be64374a9840c7eed804.tar.bz2 |
function replacements
Diffstat (limited to 'cdn/video_s3/includes/S3.php')
-rw-r--r-- | cdn/video_s3/includes/S3.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cdn/video_s3/includes/S3.php b/cdn/video_s3/includes/S3.php index 70d3ad8..77af0f6 100644 --- a/cdn/video_s3/includes/S3.php +++ b/cdn/video_s3/includes/S3.php @@ -749,7 +749,7 @@ class S3 { * @return string */ public static function getAuthenticatedURL($bucket, $uri, $lifetime, $hostBucket = false, $https = false) { - $expires = time() + $lifetime; + $expires = REQUEST_TIME + $lifetime; $uri = str_replace('%2F', '/', rawurlencode($uri)); // URI should be encoded (thanks Sean O'Dea) return sprintf(($https ? 'https' : 'http').'://%s/%s?AWSAccessKeyId=%s&Expires=%u&Signature=%s', $hostBucket ? $bucket : $bucket.'.s3.amazonaws.com', $uri, self::$__accessKey, $expires, @@ -773,7 +773,7 @@ class S3 { public static function getHttpUploadPostParams($bucket, $uriPrefix = '', $acl = self::ACL_PRIVATE, $lifetime = 3600, $maxFileSize = 5242880, $successRedirect = "201", $amzHeaders = array(), $headers = array(), $flashVars = false) { // Create policy object $policy = new stdClass; - $policy->expiration = gmdate('Y-m-d\TH:i:s\Z', (time() + $lifetime)); + $policy->expiration = gmdate('Y-m-d\TH:i:s\Z', (REQUEST_TIME + $lifetime)); $policy->conditions = array(); $obj = new stdClass; $obj->bucket = $bucket; array_push($policy->conditions, $obj); $obj = new stdClass; $obj->acl = $acl; array_push($policy->conditions, $obj); |