phpmyadmin/phpmyadmin — pull request #944 by yzsolt (2014-02-17 12:03:09+00:00)
Title: Import improvements

The current version of import.php happily runs absolutely unnecessary parts of the code (the ones without a !$error check) upon error. This patch introduces a small local helper, \_pma_stop_import() which closes opened file handles, sets the response attributes and immediately exits the code when called.
This patch changes open_basedir handling too: it replaces the current hard-coded tmp directory name to a system-provided one (the correct way would be using $cfg['TempDir'] in the first place) and adds an error message to handle cases when the tmp directory isn't available in open_basedir.