PMASA-2011-1 fixes

This commit is contained in:
Herman van Rink
2011-02-08 08:15:01 -05:00
committed by Marc Delisle
parent 08a6fd9c12
commit 44ace60f77
2 changed files with 22 additions and 7 deletions

View File

@@ -15,13 +15,19 @@ require('./libraries/vendor_config.php');
/**
* Read changelog.
*/
if (substr(CHANGELOG_FILE, -3) == '.gz') {
ob_start();
readgzfile(CHANGELOG_FILE);
$changelog = ob_get_contents();
ob_end_clean();
// Check if the Changelog file is available, some distributions remove these.
if (is_readable(CHANGELOG_FILE)) {
if (substr(CHANGELOG_FILE, -3) == '.gz') {
ob_start();
readgzfile(CHANGELOG_FILE);
$changelog = ob_get_contents();
ob_end_clean();
} else {
$changelog = file_get_contents(CHANGELOG_FILE);
}
} else {
$changelog = file_get_contents(CHANGELOG_FILE);
echo "The Changelog file is not available on this system, please visit www.phpmyadmin.net for more information.";
exit;
}
/**

View File

@@ -19,5 +19,14 @@ require('./libraries/vendor_config.php');
*
*/
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 {
echo "The $filename file is not available on this system, please visit www.phpmyadmin.net for more information.";
}
?>