http://www.mediawiki.org/wiki/Special:Code/MediaWiki/90913
Revision: 90913
Author: reedy
Date: 2011-06-27 22:11:33 +0000 (Mon, 27 Jun 2011)
Log Message:
-----------
aws-sdk 1.3.5
Modified Paths:
--------------
trunk/extensions/OpenStackManager/aws-sdk/_compatibility_test/sdk_compatibility_test.php
trunk/extensions/OpenStackManager/aws-sdk/lib/yaml/lib/sfYamlInline.php
trunk/extensions/OpenStackManager/aws-sdk/lib/yaml/lib/sfYamlParser.php
trunk/extensions/OpenStackManager/aws-sdk/sdk.class.php
trunk/extensions/OpenStackManager/aws-sdk/services/s3.class.php
trunk/extensions/OpenStackManager/aws-sdk/utilities/utilities.class.php
Modified:
trunk/extensions/OpenStackManager/aws-sdk/_compatibility_test/sdk_compatibility_test.php
===================================================================
---
trunk/extensions/OpenStackManager/aws-sdk/_compatibility_test/sdk_compatibility_test.php
2011-06-27 21:56:36 UTC (rev 90912)
+++
trunk/extensions/OpenStackManager/aws-sdk/_compatibility_test/sdk_compatibility_test.php
2011-06-27 22:11:33 UTC (rev 90913)
@@ -6,7 +6,7 @@
echo base64_decode($data);
exit;
}
-elseif (isset($_GET['background']))
+else if (isset($_GET['background']))
{
$data='R0lGODlhMAEeAeYAAP///8ni6cTf5+72+PD3+c3k6+nz9ufy9ev099Pn7bnZ48bg6LfY4uHv8/r8/f3+/v7//7bX4cjh6fj7/Mvj6vz9/rva4+z19/X6+/f7/Pn8/fb6+7jZ4vv9/bra473b5Lzb5LXX4b7c5b/c5e31+NTo7tvs8dfq7/H3+bjY4tnq79Hm7c/l69nr8PL4+t7t8sDd5cLe5uPw9Nvr8Mri6fP4+tLn7er099Hm7O/2+dDm7OTw9OXx9Nbp7tbp7+Lv8+Du8szj6sXg57bY4d3s8djq7+jz9tzs8cPe58fh6M7k68Pf5+by9fz+/sDd5vT5+vT5+97t8bbY4trr8P7+/v7+/+Pw8+Xx9dXo7sHe5vH4+fP5+sHd5t/u8s/l7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAALAAAAAAwAR4BAAf/gCGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKNEaWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExbBDyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7KUuHi4+Tl5ufo6err7O3u7/Dx8vP09fb34wz6+/z9/v8AAwocSLCgwYMIEypcyLChw4cQI0qcSLGixYsYM2osmKKjx48gQ4ocSbKkyZMoU6pcybKly5cwY8qc+ZGDzZs4c+rcybOnz59AgwodSrSo0aNIkypdyrSp06dQo0qdSrWq1aAKsmrdyrWr169gw4odS7as2bNo06pdy7at27dw/+PKnUu3rt27ePOS9cC3r9+/gAMLHky4sOHDiBMrXsy4sePHkCNLnky5suXLmDNr3sz5sIXPoEOLHk26tOnTqFOrXs26tevXsGPLnk27tu3buHPr3s27t+/fqkEIH068uPHjyJMrX868ufPn0KNLn069uvXr2LNr3869u/fv4MOLb/6hvPnz6NOrX8++vfv38OPLn0+/vv37+PPr38+/v///AAYo4IAEFgifCAgmqOCCDDbo4IMQRijhhBRWaOGFGGao4YYcdujhhyCGKOKIJJZo4okoTjjCiiy26OKLMMYo44w01mjjjTjmqOOOPPbo449ABinkkEQWaeSRSCap5P+SNsLg5JNQRinllFRWaeWVWGap5ZZcdunll2CGKeaYZELpxJlopqnmmmy26eabcMYp55x01mnnnXjmqeeefPaZJheABirooIQWauihiCaq6KKMNuroo5BGKumklFZqqaBZZKrpppx26umnoIYq6qiklmrqqaimquqqrLbq6qubxiDrrLTWauutuOaq66689urrr8AGK+ywxBZr7LHI0orEssw26+yz0EYr7bTUVmvttdhmq+223Hbr7bfghtvsEuSWa+656Kar7rrstuvuu/DGK++89NZr77345quvuQL06++/AAcs8MAEF2zwwQgnrPDCDDfs8MMQRyzxxBRXbPH/xRhnrPHGHHeMsBAghyzyyCSXbPLJKKes8sost+zyyzDHLPPMNNdss8gL5Kzzzjz37PPPQAct9NBEF2300UgnrfTSTDft9NNQRy311FRXbfXVWGdNdBJcd+3112CHLfbYZJdt9tlop6322my37fbbcMctt9cS1G333XjnrffefPft99+ABy744IQXbvjhiCeu+OKMN+7445BHLvnklFcOeACYZ6755px37vnnoIcu+uikl2766ainrvrqrLfu+uuwxy777LTXbvvtuI9Ow+689+7778AHL/zwxBdv/PHIJ6/88sw37/zz0EffOwXUV2/99dhnr/323Hfv/ffghy/+//jkl2/++einr/767Lfv/vvwxy///PR/H8T9+Oev//789+///wAMoAAHSMACGvCACEygAhfIwAbmrwAQjKAEJ0jBClrwghjMoAY3yMEOevCDIAyhCEdIwhKa8IQoTKEKV8jCFrrwhTDcoBJmSMMa2vCGOMyhDnfIwx768IdADKIQh0jEIhrxiEhMYg1ZwMQmOvGJUIyiFKdIxSpa8YpYzKIWt8jFLnrxi2AMoxid6IUymvGMaEyjGtfIxja68Y1wjKMc50jHOtrxjnjMox73eEYd+PGPgAykIAdJyEIa8pCITKQiF8nIRjrykZCMpCQnSUlA4uCSmMykJjfJyU568v+ToAylKEdJylKa8pSoTKUqV8nKVmZyBbCMpSxnScta2vKWuMylLnfJy1768pfADKYwh0nMYhpTljZIpjKXycxmOvOZ0IymNKdJzWpa85rYzKY2t8nNbnrzm8tMgDjHSc5ymvOc6EynOtfJzna6853wjKc850nPetrznvjMpz73yc9++vOfAA2oQNtZgoIa9KAITahCF8rQhjr0oRCNqEQnStGKWvSiGM2oRjd6UCx49KMgDalIR0rSkpr0pChNqUpXytKWuvSlMI2pTGdKU5D24KY4zalOd8rTnvr0p0ANqlCHStSiGvWoSE2qUpfK1Kbm1AdQjapUp0rVqlr1qlj/zapWt8rVrnr1q2ANq1jHStaymlWqJ0irWtfK1ra69a1wjatc50rXutr1rnjNq173yte++vWvay2CYAdL2MIa9rCITaxiF8vYxjr2sZCNrGQnS9nKWvaymCWsCjbL2c569rOgDa1oR0va0pr2tKhNrWpXy9rWuva1sI1tZ1tA29ra9ra4za1ud8vb3vr2t8ANrnCHS9ziGve4yE2ucm07heY697nQja50p0vd6lr3utjNrna3y93ueve74A2veMf73BmY97zoTa9618ve9rr3vfCNr3znS9/62ve++M2vfvfLX/Sa4L8ADrCAB0zgAhv4wAhOsIIXzOAGO/jBEI6w/4QnTOEKB/gIGM6whjfM4Q57+MMgDrGIR0ziEpv4xChOsYpXzOIWu1jDRIixjGdM4xrb+MY4zrGOd8zjHvv4x0AOspCHTOQiG/nIM46CkpfM5CY7+clQjrKUp0zlKlv5yljOspa3zOUue/nLYGbyC8ZM5jKb+cxoTrOa18zmNrv5zXCOs5znTOc62/nOeM5zmbvA5z77+c+ADrSgB03oQhv60IhOtKIXzehGO/rRkI60pP0MhEpb+tKYzrSmN83pTnv606AOtahHTepSm/rUqE61qld96Qa4+tWwjrWsZ03rWtv61rjOta53zete+/rXwA62sIdN7GIb+9jITrayl//N7GY7O9c/iLa0p03talv72tjOtra3ze1ue/vb4A63uMdN7nKb+9zTtoK6183udrv73fCOt7znTe962/ve+M63vvfN7377+98AZ7cMBk7wghv84AhPuMIXzvCGO/zhEI+4xCdO8Ypb/OIYz3jBd8Dxjnv84yAPuchHTvKSm/zkKE+5ylfO8pa7/OUwj7nMPc6Dmtv85jjPuc53zvOe+/znQA+60IdO9KIb/ehIT7rSl37zKzj96VCPutSnTvWqW/3qWM+61rfO9a57/etgD7vYx052qDPh7GhPu9rXzva2u/3tcI+73OdO97rb/e54z7ve9873vqf9AIAPvOAHT/j/whv+8IhPvOIXz/jGO/7xkI+85CdP+cpb/vKYz7zmN8/5znv+86BfvBFGT/rSm/70qE+96lfP+ta7/vWwj73sZ0/72tv+9rjPfekNwPve+/73wA++8IdP/OIb//jIT77yl8/85jv/+dCPvvSnT/3qW//62M++9rfP/ePf4PvgD7/4x0/+8pv//OhPv/rXz/72u//98I+//OdP//qHHwH4z7/+98///vv//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wiRcwiZ8wiicwiq8wizcwi78wjAcwzI8wzRcFcM2fMM4nMM6vMM83MM+/MNArLmBAAA7';
header('Content-type: image/gif');
Modified:
trunk/extensions/OpenStackManager/aws-sdk/lib/yaml/lib/sfYamlInline.php
===================================================================
--- trunk/extensions/OpenStackManager/aws-sdk/lib/yaml/lib/sfYamlInline.php
2011-06-27 21:56:36 UTC (rev 90912)
+++ trunk/extensions/OpenStackManager/aws-sdk/lib/yaml/lib/sfYamlInline.php
2011-06-27 22:11:33 UTC (rev 90913)
@@ -188,7 +188,7 @@
$output = rtrim(substr($output, 0, $strpos));
}
}
- elseif (preg_match('/^(.+?)('.implode('|', $delimiters).')/',
substr($scalar, $i), $match))
+ else if (preg_match('/^(.+?)('.implode('|', $delimiters).')/',
substr($scalar, $i), $match))
{
$output = $match[1];
$i += strlen($output);
Modified:
trunk/extensions/OpenStackManager/aws-sdk/lib/yaml/lib/sfYamlParser.php
===================================================================
--- trunk/extensions/OpenStackManager/aws-sdk/lib/yaml/lib/sfYamlParser.php
2011-06-27 21:56:36 UTC (rev 90912)
+++ trunk/extensions/OpenStackManager/aws-sdk/lib/yaml/lib/sfYamlParser.php
2011-06-27 22:11:33 UTC (rev 90913)
@@ -121,7 +121,7 @@
}
}
}
- elseif (preg_match('#^(?P<key>'.sfYamlInline::REGEX_QUOTED_STRING.'|[^
\'"].*?) *\:(\s+(?P<value>.+?))?\s*$#', $this->currentLine, $values))
+ else if (preg_match('#^(?P<key>'.sfYamlInline::REGEX_QUOTED_STRING.'|[^
\'"].*?) *\:(\s+(?P<value>.+?))?\s*$#', $this->currentLine, $values))
{
$key = sfYamlInline::parseScalar($values['key']);
@@ -155,7 +155,7 @@
{
throw new InvalidArgumentException(sprintf("YAML merge keys used
with a scalar value instead of an array at line %s (%s)",
$this->getRealCurrentLineNb() + 1, $this->currentLine));
}
- elseif (isset($parsed[0]))
+ else if (isset($parsed[0]))
{
// Numeric array, merge individual elements
foreach (array_reverse($parsed) as $parsedItem)
@@ -176,7 +176,7 @@
$isProcessed = $merged;
}
}
- elseif (isset($values['value']) && preg_match('#^&(?P<ref>[^ ]+)
*(?P<value>.*)#', $values['value'], $matches))
+ else if (isset($values['value']) && preg_match('#^&(?P<ref>[^ ]+)
*(?P<value>.*)#', $values['value'], $matches))
{
$isRef = $matches['ref'];
$values['value'] = $matches['value'];
@@ -188,7 +188,7 @@
$data = $isProcessed;
}
// hash
- elseif (!isset($values['value']) || '' == trim($values['value'], ' ')
|| 0 === strpos(ltrim($values['value'], ' '), '#'))
+ else if (!isset($values['value']) || '' == trim($values['value'], ' ')
|| 0 === strpos(ltrim($values['value'], ' '), '#'))
{
// if next line is less indented or equal, then it means that the
current value is null
if ($this->isNextLineIndented())
@@ -347,11 +347,11 @@
// empty line
$data[] = $match['text'];
}
- elseif ($indent >= $newIndent)
+ else if ($indent >= $newIndent)
{
$data[] = substr($this->currentLine, $newIndent);
}
- elseif (0 == $indent)
+ else if (0 == $indent)
{
$this->moveToPreviousLine();
@@ -481,7 +481,7 @@
$text .= str_repeat(' ', $diff = strlen($matches['indent']) -
strlen($textIndent)).$matches['text'].($diff ? "\n" : $separator);
}
- elseif (preg_match('#^(?P<text> *)$#', $this->currentLine, $matches))
+ else if (preg_match('#^(?P<text> *)$#', $this->currentLine, $matches))
{
$text .= preg_replace('#^ {1,'.strlen($textIndent).'}#', '',
$matches['text'])."\n";
}
Modified: trunk/extensions/OpenStackManager/aws-sdk/sdk.class.php
===================================================================
--- trunk/extensions/OpenStackManager/aws-sdk/sdk.class.php 2011-06-27
21:56:36 UTC (rev 90912)
+++ trunk/extensions/OpenStackManager/aws-sdk/sdk.class.php 2011-06-27
22:11:33 UTC (rev 90913)
@@ -102,9 +102,9 @@
// INTERMEDIARY CONSTANTS
define('CFRUNTIME_NAME', 'aws-sdk-php');
-define('CFRUNTIME_VERSION', '1.3.4');
+define('CFRUNTIME_VERSION', '1.3.5');
// define('CFRUNTIME_BUILD', gmdate('YmdHis', filemtime(__FILE__))); // @todo:
Hardcode for release.
-define('CFRUNTIME_BUILD', '20110607180731');
+define('CFRUNTIME_BUILD', '20110621180731');
define('CFRUNTIME_USERAGENT', CFRUNTIME_NAME . '/' . CFRUNTIME_VERSION . '
PHP/' . PHP_VERSION . ' ' . php_uname('s') . '/' . php_uname('r') . ' Arch/' .
php_uname('m') . ' SAPI/' . php_sapi_name() . ' Integer/' . PHP_INT_MAX . '
Build/' . CFRUNTIME_BUILD . __aws_sdk_ua_callback());
Modified: trunk/extensions/OpenStackManager/aws-sdk/services/s3.class.php
===================================================================
--- trunk/extensions/OpenStackManager/aws-sdk/services/s3.class.php
2011-06-27 21:56:36 UTC (rev 90912)
+++ trunk/extensions/OpenStackManager/aws-sdk/services/s3.class.php
2011-06-27 22:11:33 UTC (rev 90913)
@@ -3073,6 +3073,90 @@
}
/**
+ * Since Amazon S3's standard <copy_object()> operation only supports
copying objects that are smaller than
+ * 5 GB, the ability to copy large objects (greater than 5 GB) requires
the use of "Multipart Copy".
+ *
+ * Copying large objects requires the developer to initiate a new
multipart "upload", copy pieces of the
+ * large object (specifying a range of bytes up to 5 GB from the large
source file), then complete the
+ * multipart "upload".
+ *
+ * NOTE: <strong>This is a synchronous operation</strong>, not an
<em>asynchronous</em> operation, which means
+ * that Amazon S3 will not return a response for this operation until
the copy has completed across the Amazon
+ * S3 server fleet. Copying objects within a single region will
complete more quickly than copying objects
+ * <em>across</em> regions. The synchronous nature of this operation is
different from other services where
+ * responses are typically returned immediately, even if the operation
itself has not yet been completed on
+ * the server-side.
+ *
+ * @param array $source (Required) The bucket and file name to copy
from. The following keys must be set: <ul>
+ * <li><code>bucket</code> - <code>string</code> - Required -
Specifies the name of the bucket containing the source object.</li>
+ * <li><code>filename</code> - <code>string</code> - Required -
Specifies the file name of the source object to copy.</li></ul>
+ * @param array $dest (Required) The bucket and file name to copy to.
The following keys must be set: <ul>
+ * <li><code>bucket</code> - <code>string</code> - Required -
Specifies the name of the bucket to copy the object to.</li>
+ * <li><code>filename</code> - <code>string</code> - Required -
Specifies the file name to copy the object to.</li></ul>
+ * @param string $upload_id (Required) The upload ID identifying the
multipart upload whose parts are being listed. The upload ID is retrieved from
a call to <initiate_multipart_upload()>.
+ * @param integer $part_number (Required) A part number uniquely
identifies a part and defines its position within the destination object. When
you complete a multipart upload, a complete object is created by concatenating
parts in ascending order based on part number. If you copy a new part using the
same part number as a previously copied/uploaded part, the previously written
part is overwritten.
+ * @param array $opt (Optional) An associative array of parameters that
can have the following keys: <ul>
+ * <li><code>ifMatch</code> - <code>string</code> - Optional - The
ETag header from a previous request. Copies the object if its entity tag (ETag)
matches the specified tag; otherwise, the request returns a <code>412</code>
HTTP status code error (precondition failed). Used in conjunction with
<code>ifUnmodifiedSince</code>.</li>
+ * <li><code>ifUnmodifiedSince</code> - <code>string</code> -
Optional - The LastModified header from a previous request. Copies the object
if it hasn't been modified since the specified time; otherwise, the request
returns a <code>412</code> HTTP status code error (precondition failed). Used
in conjunction with <code>ifMatch</code>.</li>
+ * <li><code>ifNoneMatch</code> - <code>string</code> - Optional -
The ETag header from a previous request. Copies the object if its entity tag
(ETag) is different than the specified ETag; otherwise, the request returns a
<code>412</code> HTTP status code error (failed condition). Used in conjunction
with <code>ifModifiedSince</code>.</li>
+ * <li><code>ifModifiedSince</code> - <code>string</code> -
Optional - The LastModified header from a previous request. Copies the object
if it has been modified since the specified time; otherwise, the request
returns a <code>412</code> HTTP status code error (failed condition). Used in
conjunction with <code>ifNoneMatch</code>.</li>
+ * <li><code>range</code> - <code>string</code> - Optional - The
range of bytes to copy from the object. Specify this parameter when copying
partial bits. The specified range must be notated with a hyphen (e.g.,
0-10485759). Defaults to the byte range of the complete Amazon S3 object.</li>
+ * <li><code>versionId</code> - <code>string</code> - Optional -
The version of the object to copy. Version IDs are returned in the
<code>x-amz-version-id</code> header of any previous object-related
request.</li>
+ * <li><code>curlopts</code> - <code>array</code> - Optional - A
set of values to pass directly into <code>curl_setopt()</code>, where the key
is a pre-defined <code>CURLOPT_*</code> constant.</li>
+ * <li><code>returnCurlHandle</code> - <code>boolean</code> -
Optional - A private toggle specifying that the cURL handle be returned rather
than actually completing the request. This toggle is useful for manually
managed batch requests.</li></ul>
+ * @return CFResponse A <CFResponse> object containing a parsed HTTP
response.
+ */
+ public function copy_part($source, $dest, $upload_id, $part_number,
$opt = null)
+ {
+ if (!$opt) $opt = array();
+
+ // Add this to our request
+ $opt['verb'] = 'PUT';
+ $opt['resource'] = $dest['filename'];
+ $opt['uploadId'] = $upload_id;
+ $opt['partNumber'] = $part_number;
+
+ // Handle copy source
+ if (isset($source['bucket']) && isset($source['filename']))
+ {
+ $opt['headers']['x-amz-copy-source'] = '/' .
$source['bucket'] . '/' . rawurlencode($source['filename'])
+ . (isset($opt['versionId']) ? ('?' .
'versionId=' . rawurlencode($opt['versionId'])) : ''); // Append the versionId
to copy, if available
+ unset($opt['versionId']);
+ }
+
+ // Handle conditional-copy parameters
+ if (isset($opt['ifMatch']))
+ {
+ $opt['headers']['x-amz-copy-source-if-match'] =
$opt['ifMatch'];
+ unset($opt['ifMatch']);
+ }
+ if (isset($opt['ifNoneMatch']))
+ {
+ $opt['headers']['x-amz-copy-source-if-none-match'] =
$opt['ifNoneMatch'];
+ unset($opt['ifNoneMatch']);
+ }
+ if (isset($opt['ifUnmodifiedSince']))
+ {
+
$opt['headers']['x-amz-copy-source-if-unmodified-since'] =
$opt['ifUnmodifiedSince'];
+ unset($opt['ifUnmodifiedSince']);
+ }
+ if (isset($opt['ifModifiedSince']))
+ {
+ $opt['headers']['x-amz-copy-source-if-modified-since']
= $opt['ifModifiedSince'];
+ unset($opt['ifModifiedSince']);
+ }
+
+ // Partial content range
+ if (isset($opt['range']))
+ {
+ $opt['headers']['x-amz-copy-source-range'] = 'bytes=' .
$opt['range'];
+ }
+
+ // Authenticate to S3
+ return $this->authenticate($dest['bucket'], $opt);
+ }
+
+ /**
* Creates an Amazon S3 object using the multipart upload APIs. It is
analogous to <create_object()>.
*
* While each individual part of a multipart upload can hold up to 5 GB
of data, this method limits the
Modified:
trunk/extensions/OpenStackManager/aws-sdk/utilities/utilities.class.php
===================================================================
--- trunk/extensions/OpenStackManager/aws-sdk/utilities/utilities.class.php
2011-06-27 21:56:36 UTC (rev 90912)
+++ trunk/extensions/OpenStackManager/aws-sdk/utilities/utilities.class.php
2011-06-27 22:11:33 UTC (rev 90913)
@@ -170,7 +170,7 @@
{
$data[$q[0]][] = urldecode($q[1]);
}
- elseif (isset($data[$q[0]]) && !is_array($data[$q[0]]))
+ else if (isset($data[$q[0]]) && !is_array($data[$q[0]]))
{
$data[$q[0]] = array($data[$q[0]]);
$data[$q[0]][] = urldecode($q[1]);
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs