Project

General

Profile

Bug #40409 » 40409-46.patch

Ivan Dharma Kartolo, 2012-09-01 19:40

View differences:

t3lib/class.t3lib_compressor.php (revision )
protected function retrieveExternalFile($url) {
$externalContent = t3lib_div::getUrl($url);
$filename = $this->targetDirectory . 'external-' . md5($url);
//write only if file not exists and md5 of the content is not the same with fetched one
if (!file_exists(PATH_site . $filename) && (md5($externalContent) != md5(t3lib_div::getUrl(PATH_site . $filename)))) {
t3lib_div::writeFile(PATH_site . $filename, $externalContent);
t3lib_div::writeFile(PATH_site . $filename, $externalContent);
}
return $filename;
}
(2-2/2)