43 public function fetchExtension($extensionKey, $version, $expectedMd5, $mirrorUrl) {
45 $mirrorUrl .= $extensionPath[0] .
'/' . $extensionPath[1] .
'/' . $extensionPath .
'_' . $version .
'.t3x';
49 throw new ExtensionManagerException(sprintf(
'The T3X file "%s" could not be fetched. Possible reasons: network problems, allow_url_fopen is off,' .
' cURL is not enabled in Install Tool.', $mirrorUrl), 1334426097);
51 if ($md5 === $expectedMd5) {
55 throw new ExtensionManagerException(
'Error: MD5 hash of downloaded file not as expected:<br />' . $md5 .
' != ' . $expectedMd5, 1334426098);
57 return $extensionData;
73 $parts = explode(
':', $externalData, 4);
74 $dat = base64_decode($parts[2]);
77 if (ltrim($parts[0]) == md5($dat)) {
78 if ($parts[1] ==
'gzcompress') {
79 if (function_exists(
'gzuncompress')) {
80 $dat = gzuncompress($dat);
82 throw new ExtensionManagerException(
'Decoding Error: No decompressor available for compressed content. gzuncompress() function is not available!', 1342859463);
85 $listArr = unserialize($dat);
86 if (!is_array($listArr)) {
104 $parts = explode(
':', $stream, 3);
105 if ($parts[1] ==
'gzcompress') {
106 if (function_exists(
'gzuncompress')) {
107 $parts[2] = gzuncompress($parts[2]);
109 throw new ExtensionManagerException(
'Decoding Error: No decompressor available for compressed content. gzcompress()/gzuncompress() ' .
'functions are not available!', 1344761814);
112 if (md5($parts[2]) === $parts[0]) {
113 $output = unserialize($parts[2]);
114 if (!is_array($output)) {
115 throw new ExtensionManagerException(
'Error: Content could not be unserialized to an array. Strange (since MD5 hashes match!)', 1344761938);
118 throw new ExtensionManagerException(
'Error: MD5 mismatch. Maybe the extension file was downloaded and saved as a text file by the ' .
'browser and thereby corrupted!? (Always select "All" filetype when saving extensions)', 1344761991);
fetchExtension($extensionKey, $version, $expectedMd5, $mirrorUrl)
decodeServerData($externalData)
static getUrl($url, $includeHeader=0, $requestHeaders=FALSE, &$report=NULL)
decodeExchangeData($stream)