PMASA-2011-1 fixes

This commit is contained in:
Herman van Rink
2011-02-08 08:11:37 -05:00
committed by Marc Delisle
parent 373a6626ad
commit f0e8849034
3 changed files with 28 additions and 3 deletions

View File

@@ -6,7 +6,15 @@
* @version $Id$ * @version $Id$
*/ */
$changelog = htmlspecialchars(file_get_contents('ChangeLog')); $filename = 'ChangeLog';
// Check if the file is available, some distributions remove these.
if (is_readable($filename)) {
$changelog = htmlspecialchars(file_get_contents($filename));
} else {
echo "The $filename file is not available on this system, please visit www.phpmyadmin.net for more information.";
exit;
}
$replaces = array( $replaces = array(
'@(http://[./a-zA-Z0-9.-]*[/a-zA-Z0-9])@' '@(http://[./a-zA-Z0-9.-]*[/a-zA-Z0-9])@'

View File

@@ -13,5 +13,14 @@
* *
*/ */
header('Content-type: text/plain; charset=iso-8859-1'); header('Content-type: text/plain; charset=iso-8859-1');
readfile('LICENSE');
$filename = 'LICENSE';
// 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.";
}
?> ?>

View File

@@ -13,5 +13,13 @@
* *
*/ */
header('Content-type: text/plain; charset=utf-8'); header('Content-type: text/plain; charset=utf-8');
readfile('README');
$filename = 'README';
// 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.";
}
?> ?>