[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_2-2093-ge4a399f

Michal Čihař nijel at users.sourceforge.net
Thu Apr 29 14:10:21 CEST 2010


The branch, master has been updated
       via  e4a399fc6a61ce9641c80c8096bccd1271f506a2 (commit)
      from  a5750bb3bfd699cb235bba90f234e7302f05a54d (commit)


- Log -----------------------------------------------------------------
commit e4a399fc6a61ce9641c80c8096bccd1271f506a2
Author: Michal Čihař <mcihar at novell.com>
Date:   Thu Apr 29 14:10:11 2010 +0200

    Add docs.

-----------------------------------------------------------------------

Summary of changes:
 libraries/import/upload/apc.php            |   13 +++++++++----
 libraries/import/upload/noplugin.php       |    7 ++++++-
 libraries/import/upload/uploadprogress.php |   19 ++++++++++++-------
 3 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/libraries/import/upload/apc.php b/libraries/import/upload/apc.php
index d997e2c..6b50aeb 100644
--- a/libraries/import/upload/apc.php
+++ b/libraries/import/upload/apc.php
@@ -12,10 +12,15 @@ if (! defined('PHPMYADMIN')) {
 
 $ID_KEY      = 'APC_UPLOAD_PROGRESS';
 
+/**
+ * Returns upload status.
+ *
+ * This is implementation for APC extension.
+ */
 function PMA_getUploadStatus($id) {
     global $SESSION_KEY;
     global $ID_KEY;
-  
+
     if (trim($id) == "") {
         return;
     }
@@ -30,7 +35,7 @@ function PMA_getUploadStatus($id) {
          );
     }
     $ret = $_SESSION[$SESSION_KEY][$id];
- 
+
     if (! PMA_import_apcCheck() || $ret['finished']) {
         return $ret;
     }
@@ -40,7 +45,7 @@ function PMA_getUploadStatus($id) {
         $ret['finished'] = (bool)$status['done'];
         $ret['total']    = $status['total'];
         $ret['complete'] = $status['current'];
- 
+
         if ($ret['total'] > 0) {
             $ret['percent'] = $ret['complete'] / $ret['total'] * 100;
         }
@@ -51,7 +56,7 @@ function PMA_getUploadStatus($id) {
 
         $_SESSION[$SESSION_KEY][$id] = $ret;
     }
- 
+
     return $ret;
 }
 
diff --git a/libraries/import/upload/noplugin.php b/libraries/import/upload/noplugin.php
index af55d76..b3baf70 100644
--- a/libraries/import/upload/noplugin.php
+++ b/libraries/import/upload/noplugin.php
@@ -12,10 +12,15 @@ if (! defined('PHPMYADMIN')) {
 
 $ID_KEY      = 'noplugin';
 
+/**
+ * Returns upload status.
+ *
+ * This is implementation when no webserver support exists, so it returns just zeroes.
+ */
 function PMA_getUploadStatus($id) {
     global $SESSION_KEY;
     global $ID_KEY;
-  
+
     if (trim($id) == "") {
         return;
     }
diff --git a/libraries/import/upload/uploadprogress.php b/libraries/import/upload/uploadprogress.php
index b1530a9..ce4c476 100644
--- a/libraries/import/upload/uploadprogress.php
+++ b/libraries/import/upload/uploadprogress.php
@@ -11,14 +11,19 @@ if (! defined('PHPMYADMIN')) {
 
 $ID_KEY = "UPLOAD_IDENTIFIER";
 
+/**
+ * Returns upload status.
+ *
+ * This is implementation for uploadprogress extension.
+ */
 function PMA_getUploadStatus($id) {
     global $SESSION_KEY;
     global $ID_KEY;
-  
+
     if (trim($id) == "") {
         return;
     }
-  
+
     if (! array_key_exists($id, $_SESSION[$SESSION_KEY])) {
         $_SESSION[$SESSION_KEY][$id] = array(
                     'id'       => $id,
@@ -30,11 +35,11 @@ function PMA_getUploadStatus($id) {
         );
     }
     $ret = $_SESSION[$SESSION_KEY][$id];
-    
+
     if (! PMA_import_uploadprogressCheck() || $ret['finished']) {
         return $ret;
     }
-    
+
     $status = uploadprogress_get_info($id);
 
     if ($status) {
@@ -45,7 +50,7 @@ function PMA_getUploadStatus($id) {
         }
         $ret['total']    = $status['bytes_total'];
         $ret['complete'] = $status['bytes_uploaded'];
- 
+
         if ($ret['total'] > 0) {
             $ret['percent'] = $ret['complete'] / $ret['total'] * 100;
         }
@@ -59,9 +64,9 @@ function PMA_getUploadStatus($id) {
                     'plugin'   => $ID_KEY
                 );
     }
-    
+
     $_SESSION[$SESSION_KEY][$id] = $ret;
-    
+
     return $ret;
 }
 ?>


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list