The branch, master has been updated via 440f72082fb21b418818b7331863af56094f7bcc (commit) from 73fb08d3d81f33edba2550ceaa1a8bfd3418f172 (commit)
- Log ----------------------------------------------------------------- commit 440f72082fb21b418818b7331863af56094f7bcc Author: Michal Čihař mcihar@suse.cz Date: Thu Aug 4 14:47:11 2011 +0200
Coding style, simplify flow, remove exit() calls
-----------------------------------------------------------------------
Summary of changes: file_echo.php | 20 ++++++++------------ 1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/file_echo.php b/file_echo.php index d2f7257..7b27ffa 100644 --- a/file_echo.php +++ b/file_echo.php @@ -9,11 +9,14 @@
require_once './libraries/common.inc.php';
-if(isset($_REQUEST['filename']) && isset($_REQUEST['image'])) { - $allowed = Array( 'image/png'=>'png', 'image/svg+xml'=>'svg'); +if (isset($_REQUEST['filename']) && isset($_REQUEST['image'])) { + $allowed = array( + 'image/png' => 'png', + 'image/svg+xml' => 'svg', + );
if (! isset($allowed[$_REQUEST['type']])) { - exit('Invalid export type'); + die('Invalid export type'); }
if (! preg_match("/(".implode("|",$allowed).")$/i", $_REQUEST['filename'])) { @@ -28,17 +31,10 @@ if(isset($_REQUEST['filename']) && isset($_REQUEST['image'])) { echo $_REQUEST['image']; }
- exit(); -} - -if(isset($_REQUEST['monitorconfig'])) { +} else if (isset($_REQUEST['monitorconfig'])) { PMA_download_header('monitor.cfg', 'application/force-download'); echo urldecode($_REQUEST['monitorconfig']); - exit(); -} - -if(isset($_REQUEST['import'])) { +} else if (isset($_REQUEST['import'])) { echo '<html><body>' . file_get_contents($_FILES['file']['tmp_name']) . '</body></html>'; - exit(); } ?>
hooks/post-receive