The branch, master has been updated
via 878e78866c39b2b1229984861e094eccf9e59ae7 (commit)
via 21510a093a91e6ed2748d46bb8d54b248e9cf082 (commit)
from d7e400416eda7ea663631ab19d8b1b59fbb1cd5d (commit)
- Log -----------------------------------------------------------------
commit 878e78866c39b2b1229984861e094eccf9e59ae7
Author: Madhura Jayaratne <[email protected]>
Date: Fri Aug 19 19:55:43 2011 +0530
proper indentation for switch-case statements
commit 21510a093a91e6ed2748d46bb8d54b248e9cf082
Author: Madhura Jayaratne <[email protected]>
Date: Fri Aug 19 19:54:25 2011 +0530
Fix some doc blocks
-----------------------------------------------------------------------
Summary of changes:
libraries/zip_extension.lib.php | 71 ++++++++++++++++++++++-----------------
1 files changed, 40 insertions(+), 31 deletions(-)
diff --git a/libraries/zip_extension.lib.php b/libraries/zip_extension.lib.php
index 7bfa848..9aa2758 100644
--- a/libraries/zip_extension.lib.php
+++ b/libraries/zip_extension.lib.php
@@ -7,13 +7,14 @@
*/
/**
- * Gets zip file contents
- *
- * @param string $specific_entry regular expression to match a file
- * @return array ($error_message, $file_data); $error_message
- * is empty if no error
- */
-
+ * Gets zip file contents
+ *
+ * @param string $file zip file
+ * @param string $specific_entry regular expression to match a file
+ *
+ * @return array ($error_message, $file_data); $error_message
+ * is empty if no error
+ */
function PMA_getZipContents($file, $specific_entry = null)
{
$error_message = '';
@@ -77,6 +78,8 @@ function PMA_getZipContents($file, $specific_entry = null)
*
* @param string $file_regexp regular expression for the file name to match
* @param string $file zip archive
+ *
+ * @return string the file name of the first file that matches the given regexp
*/
function PMA_findFileFromZipArchive ($file_regexp, $file)
{
@@ -100,7 +103,9 @@ function PMA_findFileFromZipArchive ($file_regexp, $file)
/**
* Returns the number of files in the zip archive.
*
- * @param string $file
+ * @param string $file zip archive
+ *
+ * @return int the number of files in the zip archive
*/
function PMA_getNoOfFilesInZip($file)
{
@@ -121,11 +126,14 @@ function PMA_getNoOfFilesInZip($file)
/**
* Extracts a set of files from the given zip archive to a given destinations.
*
- * @param string $zip_path
- * @param string $destination
- * @param array $entries
+ * @param string $zip_path path to the zip archive
+ * @param string $destination destination to extract files
+ * @param array $entries files in archive that should be extracted
+ *
+ * @return bool true on sucess, false otherwise
*/
-function PMA_zipExtract($zip_path, $destination, $entries) {
+function PMA_zipExtract($zip_path, $destination, $entries)
+{
$zip = new ZipArchive;
if ($zip->open($zip_path) === true) {
$zip->extractTo($destination, $entries);
@@ -138,30 +146,31 @@ function PMA_zipExtract($zip_path, $destination,
$entries) {
/**
* Gets zip error message
*
- * @param integer error code
- * @return string error message
+ * @param integer $code error code
+ *
+ * @return string error message
*/
function PMA_getZipError($code)
{
// I don't think this needs translation
switch ($code) {
- case ZIPARCHIVE::ER_MULTIDISK:
- $message = 'Multi-disk zip archives not supported';
- break;
- case ZIPARCHIVE::ER_READ:
- $message = 'Read error';
- break;
- case ZIPARCHIVE::ER_CRC:
- $message = 'CRC error';
- break;
- case ZIPARCHIVE::ER_NOZIP:
- $message = 'Not a zip archive';
- break;
- case ZIPARCHIVE::ER_INCONS:
- $message = 'Zip archive inconsistent';
- break;
- default:
- $message = $code;
+ case ZIPARCHIVE::ER_MULTIDISK:
+ $message = 'Multi-disk zip archives not supported';
+ break;
+ case ZIPARCHIVE::ER_READ:
+ $message = 'Read error';
+ break;
+ case ZIPARCHIVE::ER_CRC:
+ $message = 'CRC error';
+ break;
+ case ZIPARCHIVE::ER_NOZIP:
+ $message = 'Not a zip archive';
+ break;
+ case ZIPARCHIVE::ER_INCONS:
+ $message = 'Zip archive inconsistent';
+ break;
+ default:
+ $message = $code;
}
return $message;
}
hooks/post-receive
--
phpMyAdmin
------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Phpmyadmin-git mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpmyadmin-git