• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

XOOPS Cube Legacy base repository


Commit MetaInfo

Revision13a9f182d0ce340007936c94cdfa89cf5f9f4ec4 (tree)
Zeit2012-01-27 22:46:19
Autorkilica <kilica@704c...>
Commiterkilica

Log Message

- Fix Bug #3470792 - download the template, the extra null at the end of defect

git-svn-id: https://xoopscube.svn.sourceforge.net/svnroot/xoopscube/Package_Legacy/trunk@1133 704cf05f-ae62-4b0e-a484-234ee0250e75

Ändern Zusammenfassung

Diff

--- a/html/class/class.tar.php
+++ b/html/class/class.tar.php
@@ -78,15 +78,15 @@ XOOPS changes onokazu <webmaster@xoops.org>
7878
7979 /**
8080 * tar Class
81- *
81+ *
8282 * This class reads and writes Tape-Archive (TAR) Files and Gzip
8383 * compressed TAR files, which are mainly used on UNIX systems.
8484 * This class works on both windows AND unix systems, and does
8585 * NOT rely on external applications!! Woohoo!
86- *
86+ *
8787 * @author Josh Barger <joshb@npt.com>
8888 * @copyright Copyright (C) 2002 Josh Barger
89- *
89+ *
9090 * @package kernel
9191 * @subpackage core
9292 */
@@ -121,9 +121,9 @@ class tar
121121 /**
122122 * Computes the unsigned Checksum of a file's header
123123 * to try to ensure valid file
124- *
124+ *
125125 * @param string $bytestring
126- *
126+ *
127127 * @access private
128128 */
129129 function __computeUnsignedChecksum($bytestring)
@@ -141,11 +141,11 @@ class tar
141141
142142 /**
143143 * Converts a NULL padded string to a non-NULL padded string
144- *
144+ *
145145 * @param string $string
146- *
147- * @return string
148- *
146+ *
147+ * @return string
148+ *
149149 * @access private
150150 **/
151151 function __parseNullPaddedString($string)
@@ -156,9 +156,9 @@ class tar
156156
157157 /**
158158 * This function parses the current TAR file
159- *
159+ *
160160 * @return bool always TRUE
161- *
161+ *
162162 * @access private
163163 **/
164164 function __parseTar()
@@ -262,10 +262,10 @@ class tar
262262
263263 /**
264264 * Read a non gzipped tar file in for processing.
265- *
265+ *
266266 * @param string $filename full filename
267267 * @return bool always TRUE
268- *
268+ *
269269 * @access private
270270 **/
271271 function __readTar($filename='')
@@ -296,9 +296,9 @@ class tar
296296
297297 /**
298298 * Generates a TAR file from the processed data
299- *
299+ *
300300 * @return bool always TRUE
301- *
301+ *
302302 * @access private
303303 **/
304304 function __generateTAR()
@@ -395,9 +395,9 @@ class tar
395395
396396 /**
397397 * Open a TAR file
398- *
398+ *
399399 * @param string $filename
400- * @return bool
400+ * @return bool
401401 **/
402402 function openTAR($filename)
403403 {
@@ -424,7 +424,7 @@ class tar
424424
425425 /**
426426 * Appends a tar file to the end of the currently opened tar file.
427- *
427+ *
428428 * @param string $filename
429429 * @return bool
430430 **/
@@ -441,7 +441,7 @@ class tar
441441
442442 /**
443443 * Retrieves information about a file in the current tar archive
444- *
444+ *
445445 * @param string $filename
446446 * @return string FALSE on fail
447447 **/
@@ -459,7 +459,7 @@ class tar
459459
460460 /**
461461 * Retrieves information about a directory in the current tar archive
462- *
462+ *
463463 * @param string $dirname
464464 * @return string FALSE on fail
465465 **/
@@ -477,7 +477,7 @@ class tar
477477
478478 /**
479479 * Check if this tar archive contains a specific file
480- *
480+ *
481481 * @param string $filename
482482 * @return bool
483483 **/
@@ -494,7 +494,7 @@ class tar
494494
495495 /**
496496 * Check if this tar archive contains a specific directory
497- *
497+ *
498498 * @param string $dirname
499499 * @return bool
500500 **/
@@ -512,7 +512,7 @@ class tar
512512
513513 /**
514514 * Add a directory to this tar archive
515- *
515+ *
516516 * @param string $dirname
517517 * @return bool
518518 **/
@@ -540,7 +540,7 @@ class tar
540540
541541 /**
542542 * Add a file to the tar archive
543- *
543+ *
544544 * @param string $filename
545545 * @param boolean $binary Binary file?
546546 * @return bool
@@ -581,14 +581,16 @@ class tar
581581 $activeFile["checksum"] = isset($checksum) ? $checksum : '';
582582 $activeFile["user_name"] = "";
583583 $activeFile["group_name"] = "";
584- $activeFile["file"] = trim($file_contents);
584+ // "trim" May be needless. by nao-pon
585+ //$activeFile["file"] = trim($file_contents);
586+ $activeFile["file"] = $file_contents;
585587
586588 return true;
587589 }
588590
589591 /**
590592 * Remove a file from the tar archive
591- *
593+ *
592594 * @param string $filename
593595 * @return bool
594596 **/
@@ -608,7 +610,7 @@ class tar
608610
609611 /**
610612 * Remove a directory from the tar archive
611- *
613+ *
612614 * @param string $dirname
613615 * @return bool
614616 **/
@@ -628,8 +630,8 @@ class tar
628630
629631 /**
630632 * Write the currently loaded tar archive to disk
631- *
632- * @return bool
633+ *
634+ * @return bool
633635 **/
634636 function saveTar()
635637 {
@@ -645,7 +647,7 @@ class tar
645647
646648 /**
647649 * Saves tar archive to a different file than the current file
648- *
650+ *
649651 * @param string $filename
650652 * @param bool $useGzip Use GZ compression?
651653 * @return bool
@@ -681,7 +683,7 @@ class tar
681683
682684 /**
683685 * Sends tar archive to stdout
684- *
686+ *
685687 * @param string $filename
686688 * @param bool $useGzip Use GZ compression?
687689 * @return string