Project

General

Profile

Bug #15970 ยป bug-3097.patch

Administrator Admin, 2006-04-03 10:56

View differences:

TYPO3core/typo3/mod/tools/em/class.em_index.php 2006-04-03 10:51:32.000000000 +0200
$mfile = t3lib_div::tempnam('mirrors');
$mirrorsFile = t3lib_div::getURL($this->MOD_SETTINGS['mirrorListURL']);
if($mirrorsFile===false) {
$content = '<p>The mirror list was not updated, it could not be fetched from '.$this->MOD_SETTINGS['mirrorListURL'].'</p>';
t3lib_div::unlink_tempfile($mfile);
$content = '<p>The mirror list was not updated, it could not be fetched from '.$this->MOD_SETTINGS['mirrorListURL'].'. Possible reasons: network problems, allow_url_fopen not allowed, curl not enabled.</p>';
} else {
t3lib_div::writeFile($mfile, $mirrorsFile);
$mirrors = implode(gzfile($mfile));
......
if(is_file(PATH_site.'typo3temp/extensions.xml.gz')) $localmd5 = md5_file(PATH_site.'typo3temp/extensions.xml.gz');
if($extmd5 === false) {
$content .= '<p>Error: The extension MD5 sum could not be fetched from '.$mirror.'extensions.md5</p>';
$content .= '<p>Error: The extension MD5 sum could not be fetched from '.$mirror.'extensions.md5. Possible reasons: network problems, allow_url_fopen not allowed, curl not enabled.</p>';
} elseif($extmd5 == $localmd5) {
$content .= '<p>The extension list has not changed remotely, it has thus not been fetched.</p>';
} else {
$extXML = t3lib_div::getURL($extfile);
if($extXML === false) {
$content .= '<p>Error: The extension list could not be fetched from '.$extfile.'</p>';
$content .= '<p>Error: The extension list could not be fetched from '.$extfile.'. Possible reasons: network problems, allow_url_fopen not allowed, curl not enabled.</p>';
} else {
t3lib_div::writeFile(PATH_site.'typo3temp/extensions.xml.gz', $extXML);
$content .= $this->xmlhandler->parseExtensionsXML(implode(gzfile(PATH_site.'typo3temp/extensions.xml.gz')));
......
}
} else $content = 'Error: The extension can only be installed in the path '.$this->typePaths[$EM_CONF['lockType']].' (lockType='.$EM_CONF['lockType'].')';
} else $content = 'Error: No extension key!!! Why? - nobody knows... (Or no files in the file-array...)';
} else $content = 'Error: The datatransfer did not succeed, '.$fetchData;
} else $content = 'Error: The datatransfer did not succeed. '.$fetchData;
} else $content = 'Error: Installation is not allowed in this path ('.$this->typePaths[$loc].')';
$this->content.=$this->doc->section('Extension import results',$content,0,1);
TYPO3core/typo3/mod/tools/em/class.em_terconnection.php 2006-04-03 10:45:46.000000000 +0200
$t3x = t3lib_div::getURL($mirrorURL);
$MD5 = md5($t3x);
if($t3x===false) return 'The T3X file could not be fetched. Possible reasons: network problems, allow_url_fopen not allowed, curl not enabled.';
if($MD5 == $expectedMD5) {
// Fetch and return:
return $this->decodeExchangeData($t3x);
    (1-1/1)