Skip to content

Commit

Permalink
PMASA-2011-1 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
helmo authored and lem9 committed Feb 8, 2011
1 parent 3c7b1ef commit 035d002
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
26 changes: 18 additions & 8 deletions changelog.php
Expand Up @@ -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') {
ob_start();
readgzfile(CHANGELOG_FILE);
$changelog = ob_get_contents();
ob_end_clean();
// 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($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;
}

/**
Expand Down
15 changes: 12 additions & 3 deletions license.php
Expand Up @@ -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);
}

?>

0 comments on commit 035d002

Please sign in to comment.