PMASA-2011-1 fixes
This commit is contained in:

committed by
Marc Delisle

parent
3c7b1efa57
commit
035d002db1
@@ -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.
|
||||
*/
|
||||
if (substr(CHANGELOG_FILE, -3) == '.gz') {
|
||||
// Check if the file is available, some distributions remove these.
|
||||
if (is_readable($filename)) {
|
||||
|
||||
// Test if the if is in a compressed format
|
||||
if (substr($filename, -3) == '.gz') {
|
||||
ob_start();
|
||||
readgzfile(CHANGELOG_FILE);
|
||||
readgzfile($filename);
|
||||
$changelog = ob_get_contents();
|
||||
ob_end_clean();
|
||||
} else {
|
||||
$changelog = file_get_contents($filename);
|
||||
}
|
||||
} 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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
15
license.php
15
license.php
@@ -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');
|
||||
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);
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user