From 1f6d16e38c85af8bd7f1a8ce0ee42be9c7b6a9cc Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 6 Dec 2009 18:27:44 +0000 Subject: [PATCH] code cleanup; missing doc; XHTML fixes in doc --- Documentation.html | 17 +++++++++++++--- libraries/display_import_ajax.lib.php | 28 ++++++++++++++------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/Documentation.html b/Documentation.html index 4455cc96b..bc6058b82 100644 --- a/Documentation.html +++ b/Documentation.html @@ -81,7 +81,9 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78 is strongly suggested for most users and is required for 64–bit machines. Not using mcrypt will cause phpMyAdmin to load pages significantly slower. - + +
  • To support upload progress bars, see + FAQ 2.9.
  • MySQL 5.0 or newer (details);
  • @@ -3277,6 +3279,15 @@ the mysql_upgrade command on the server.

    +

    + 2.9 Seeing an upload progress bar

    + +

    To be able to see a progress bar during your uploads, your server must +have either the APC extension + or the uploadprogress + one. Moreover, the JSON extension has to be enabled in your PHP.

    +

    If using APC, you must set apc.rfc1867 to on in your php.ini.

    +

    Known limitations

    @@ -3444,7 +3455,7 @@ the mysql_upgrade command on the server.

    3.15 When I import an Excel spreadsheet, some cells with calculations do not display correctly.

    - phpMyAdmin uses the PHPExcel library to parse Excel XLS and XLSX spreadsheets. + phpMyAdmin uses the PHPExcel library to parse Excel XLS and XLSX spreadsheets. Therefore, any limitations that are listed on their page regarding Excel calculations will also apply here.

    PHPExcel will be kept up to date so as to make all improvements available to phpMyAdmin users. @@ -4377,7 +4388,7 @@ server host name, username, password, port and the name of the database. Therefo now synchronize your databases placed on the same server or some remote server.

    -

    For more details see How to synchronize +

    For more details see How to synchronize

    diff --git a/libraries/display_import_ajax.lib.php b/libraries/display_import_ajax.lib.php index 1e9346325..cf75da30f 100644 --- a/libraries/display_import_ajax.lib.php +++ b/libraries/display_import_ajax.lib.php @@ -7,7 +7,7 @@ */ if (!defined('PHPMYADMIN')) { - exit; + exit; } /** * constant for differenciating array in $_SESSION variable @@ -35,11 +35,11 @@ $plugins = array( // select available plugin foreach ($plugins as $plugin) { - $check = "PMA_import_".$plugin."Check"; + $check = "PMA_import_" . $plugin . "Check"; - if ($check()) { - $_SESSION[$SESSION_KEY]["handler"] = $plugin; - include_once("import/upload/".$plugin.".php"); + if ($check()) { + $_SESSION[$SESSION_KEY]["handler"] = $plugin; + include_once("import/upload/" . $plugin . ".php"); break; } } @@ -50,9 +50,10 @@ foreach ($plugins as $plugin) { * @return true if APC extension is available and if rfc1867 is enabled, false if it is not */ function PMA_import_apcCheck() { - if (!extension_loaded('apc') || !function_exists('apc_fetch') || !function_exists('getallheaders')) - return false; - return (ini_get('apc.enabled') && ini_get('apc.rfc1867')); + if (! extension_loaded('apc') || ! function_exists('apc_fetch') || ! function_exists('getallheaders')) { + return false; + } + return (ini_get('apc.enabled') && ini_get('apc.rfc1867')); } /** @@ -61,9 +62,10 @@ function PMA_import_apcCheck() { * @return true if UploadProgress extension is available, false if it is not */ function PMA_import_uploadprogressCheck() { - if (!function_exists("uploadprogress_get_info") || !function_exists('getallheaders')) - return false; - return true; + if (! function_exists("uploadprogress_get_info") || ! function_exists('getallheaders')) { + return false; + } + return true; } /** * Default plugin for handling import. If no other plugin is available, noplugin is used. @@ -71,7 +73,7 @@ function PMA_import_uploadprogressCheck() { * @return true */ function PMA_import_nopluginCheck() { - return true; + return true; } /** @@ -83,4 +85,4 @@ function PMA_importAjaxStatus($id) { header('Content-type: application/json'); echo json_encode(PMA_getUploadStatus($id)); } -?> \ No newline at end of file +?>