svn: /phpdoc/en/trunk/reference/zip/ziparchive/ getexternalattributesindex.xml setexternalattributesname.xml
| From: | Remi Collet | Date: | Thu, 02 Jun 2016 12:48:44 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/zip/ziparchive/ getexternalattributesindex.xml setexternalattributesname.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-14166@lists.php.net to get a copy of this message | ||
remi Thu, 02 Jun 2016 12:48:44 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=339282
Log:
Fix code sample
Changed paths:
U phpdoc/en/trunk/reference/zip/ziparchive/getexternalattributesindex.xml
U phpdoc/en/trunk/reference/zip/ziparchive/setexternalattributesname.xml
Modified: phpdoc/en/trunk/reference/zip/ziparchive/getexternalattributesindex.xml
===================================================================
--- phpdoc/en/trunk/reference/zip/ziparchive/getexternalattributesindex.xml 2016-06-02 12:43:40 UTC
(rev 339281)
+++ phpdoc/en/trunk/reference/zip/ziparchive/getexternalattributesindex.xml 2016-06-02 12:48:44 UTC
(rev 339282)
@@ -83,7 +83,7 @@
if ($zip->extractTo('.', $s['name'])) {
if ($zip->getExternalAttributesIndex($idx, $opsys, $attr)
&& $opsys==ZipArchive::OPSYS_UNIX) {
- chmod($s['name'], ($attr & 07777));
+ chmod($s['name'], ($attr >> 16) & 0777);
}
}
}
Modified: phpdoc/en/trunk/reference/zip/ziparchive/setexternalattributesname.xml
===================================================================
--- phpdoc/en/trunk/reference/zip/ziparchive/setexternalattributesname.xml 2016-06-02 12:43:40 UTC
(rev 339281)
+++ phpdoc/en/trunk/reference/zip/ziparchive/setexternalattributesname.xml 2016-06-02 12:48:44 UTC
(rev 339282)
@@ -81,7 +81,7 @@
$stat = stat($filename='test.txt');
if (is_array($stat) && $zip->open('test.zip', ZipArchive::CREATE) === TRUE) {
$zip->addFile($filename);
- $zip->setExternalAttributesName($filename, ZipArchive::OPSYS_UNIX, $stat['mode']);
+ $zip->setExternalAttributesName($filename, ZipArchive::OPSYS_UNIX, $stat['mode']
<< 16);
$zip->close();
echo "Ok\n";
} else {