PMASA-2011-1 fixes

This commit is contained in:
Herman van Rink
2011-02-08 08:22:29 -05:00
committed by Marc Delisle
parent 3c7b1efa57
commit 035d002db1
2 changed files with 30 additions and 11 deletions

View File

@@ -7,20 +7,30 @@
*/ */
/** /**
* Load paths. * Gets core libraries and defines some variables
*/ */
require('./libraries/vendor_config.php'); require_once './libraries/common.inc.php';
$filename = CHANGELOG_FILE;
/** /**
* Read changelog. * Read changelog.
*/ */
if (substr(CHANGELOG_FILE, -3) == '.gz') { // Check if the file is available, some distributions remove these.
ob_start(); if (is_readable($filename)) {
readgzfile(CHANGELOG_FILE);
$changelog = ob_get_contents(); // Test if the if is in a compressed format
ob_end_clean(); if (substr($filename, -3) == '.gz') {
ob_start();
readgzfile($filename);
$changelog = ob_get_contents();
ob_end_clean();
} else {
$changelog = file_get_contents($filename);
}
} else { } else {
$changelog = file_get_contents(CHANGELOG_FILE); printf(__('The %s file is not available on this system, please visit www.phpmyadmin.net for more information.'), $filename);
exit;
} }
/** /**

View File

@@ -10,13 +10,22 @@
*/ */
/** /**
* Load paths. * Gets core libraries and defines some variables
*/ */
require('./libraries/vendor_config.php'); require_once './libraries/common.inc.php';
/** /**
* *
*/ */
header('Content-type: text/plain; charset=iso-8859-1'); header('Content-type: text/plain; charset=iso-8859-1');
readfile(LICENSE_FILE);
$filename = LICENSE_FILE;
// Check if the file is available, some distributions remove these.
if (is_readable($filename)) {
readfile($filename);
} else {
printf(__('The %s file is not available on this system, please visit www.phpmyadmin.net for more information.'), $filename);
}
?> ?>