Register
phpBB.com Wiki · Home Projects Help

root / trunk / phpBB / includes / functions_compress.php

functions_compress.php

View | Annotate | Download (18.4 KB)

# Date Author Comment
8781 View | Annotate 08/22/2008 03:32 PM acydburn

Merge chmod changes into trunk

8640 View | Annotate 06/09/2008 07:46 PM acydburn

check if folder is not empty (may happen for absolute paths). Thanks paul

8572 View | Annotate 05/29/2008 02:25 PM acydburn

ok… i hope i haven’t messed too much with the code and everything is still working.
Changes:
- Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed.
- A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid(‘memberlist’)) – in this case the root path and extension get added automatically. The hook is called after these are added.

8545 View | Annotate 05/04/2008 04:47 PM acydburn

some missing merges…

8477 View | Annotate 03/29/2008 01:08 AM naderman

Go away evil carriage returns\!

8295 View | Annotate 01/03/2008 06:00 PM davidmj

oh boy…
- Migrate code base to PHP 5.1+

8146 View | Annotate 10/05/2007 04:30 PM acydburn

dumdidum… sorry. ;)

7877 View | Annotate 07/13/2007 05:16 AM davidmj

#13327

7134 View | Annotate 03/06/2007 12:30 PM acydburn

safer name for the updater downloads (even if removed after download) – reported by SHS`

6688 View | Annotate 11/28/2006 03:29 PM davidmj

#5654
- bzopen_or_bzdopen in bzlib.c appends us our binary mode in a strcat call, we don’t need it for bzopen();

6549 View | Annotate 11/04/2006 12:09 AM davidmj

- compress is nicer (fixed a bug :P)
- UTF-8 code is nicer (fixed a bug :P)
- new CAPTCHA. Replaced the old one for size and usability issues. The old CAPTCHA will most likely be released as a separate package

6371 View | Annotate 09/16/2006 08:07 AM davidmj

bug fixes
schema changes
i really hope nothing went wrong

6073 View | Annotate 06/16/2006 06:54 PM acydburn

- removed db cache (might re-appear, but for now we do not see the need for it)
- all changes to styles/subsilver/template are purely cosmetic (no functional changes)
- cosmetics
- bugfixes
- add index to modules table
- use modules ordering code for forums too

6058 View | Annotate 06/13/2006 11:06 PM acydburn

make sure custom profile fields are created correctly on registration (#2225)

6015 View | Annotate 06/06/2006 10:53 PM acydburn

ok, this one is rather large… the most important change:
re-introduce append_sid: old style continues to work, not a performance hog as it was in 2.0.x -> structure is different

apart from this, code cleanage, bug fixing, etc.

5853 View | Annotate 04/27/2006 04:20 PM naderman

- allow searches for multibyte characters in fulltext_native
- use preg_quote safely

5786 View | Annotate 04/15/2006 08:00 PM davidmj

- Some archivers are worthless in this world

5765 View | Annotate 04/06/2006 07:15 PM acydburn

To all people having their bug status set to fixed: SF pserver CVS access is currently down, therefore the snapshots are still out of date.

- fix a bunch of bugs
- <!- $Id$ -> is no longer allowed in template (.html) files
- changed layout of private message screens (folders are menu items)
- removed unread mode for private messages
- added new feature to template engine – “jump out of loop” or “loop another loop within my loop” :D (will be documented within the coding guidelines)
- added autologin field to sessions
- check session length checks
- added add_log statement to sessions to track session valid to invalid changes if ip/browser change depending on config settings (only debug)
- added multibyte support for various variables (exception at the moment is usernames which needs some discussion)
- hopefully not broke something. :/

5647 View | Annotate 03/18/2006 07:39 AM davidmj

- Cleaned up some compress stuff
- Replaced deprecated functions in the PostrgreSQL DBAL
- Added an undefined constant during install
- Oh, and we now have backups :D We currently work with all the MySQL flavors, PostgreSQL and SQLite…

5581 View | Annotate 02/24/2006 07:27 PM davidmj

- We only write to the archive ONCE for every file and folder when working with tar files
- Checksum is faster, uses some precomputation to speed things up
- We only needed to pad the end of the archive with 512 nulls, not 1024 :D
- Added some comments regarding the other fields ;-)

5579 View | Annotate 02/24/2006 06:30 AM davidmj

- fseek > rewind
fewer read commands, less ugly array stuff :D
- much cleaner way to deal with the version flag, stored files are now differently labeled than deflated files ( we follow the zip spec better than 7-Zip :D )

5578 View | Annotate 02/24/2006 12:54 AM davidmj

Appending to the string is faster than copying it. Additionally, str_repeat is optimized for strings like ”\0”. This issue only came up with really, really large files to compress ( 150 MB + !)

5521 View | Annotate 02/04/2006 11:29 PM davidmj

- Tar extraction and compression has changed to be more efficent by making fewer read/write commands.

5511 View | Annotate 01/30/2006 02:14 AM davidmj

- We don’t use the extra info because we can extrapolate the only thing of use (attributes) by using logic. Thus, we can skip large amounts of the file without missing any information.

5498 View | Annotate 01/27/2006 07:51 AM davidmj

- More loose definition regarding what gets to be a folder and what does not (More accurate, we lost folders before…)
- Changed some fread()s to fseek()s
- Much faster, single loop ( This might eat up more mem! Please report findings! )

5497 View | Annotate 01/27/2006 05:20 AM davidmj

- Tar extraction is MUCH faster, we parse the archive ONCE and create the directories on the spot instead of reading it twice and playing magic with file pointers. Also removed a potential leak.

- Zip extraction needs a small shot in the arm, files and archive must be handled a little better.

5496 View | Annotate 01/26/2006 10:39 PM davidmj

Fixes in both CAPTCHA and Compress

Compress:
- The “crc bug” is not a bug, it is actually a feature (the function returns an Adler hash, not a crc hash. This is more usefull for PNG files..) and was “fixed” by using the proper function instead of munging a substring
- Zip files that are BZip2’d are now supported for extraction :-)

CAPTCHA:
- PNG generation now returns positive numbers for CRC, length, height and width!
- We generate a variable number of images

5422 View | Annotate 01/04/2006 07:37 AM davidmj

- file_get_contents instead of imploding file()s or fread()ing till the maximum filesize
- language and style properly use compression
- language now prompts user for methods
- functions_compress does not need to eval() to get a hex date, instead calls pack()
- A writing method is defined at the end of tar operations only if data has been sent to the archive
- BBCode parser does not have to eval(), it instead uses the regex to loop around the matches

Hopefully nothing broke :-)

5416 View | Annotate 01/02/2006 06:30 PM acydburn

- install style and style elements
- refresh template and style cache

5385 View | Annotate 12/27/2005 06:21 PM davidmj

- I forgot that we can add and remove prefixes :D
- A small style fix :D

5383 View | Annotate 12/27/2005 03:13 PM davidmj

- Forgot to repair a function ;-)

5377 View | Annotate 12/25/2005 12:12 PM acydburn
  • empty log message *
5351 View | Annotate 12/18/2005 05:35 AM davidmj

This code works. All of it works. At least, it should.

Extraction of TAR files:
– It now works!
– If it could work before (which it couldn’t) , it would create nasty issues with spaces. This is resolved
– If it could work before (which it couldn’t) , it would try to create folders in such a way where some (all) folders could not be created. This is resolved.

Creation of TAR files:
– It now works!
– Before, it created malformed TAR files. This is resolved.

Now, the really really cool code…

Extraction of ZIP files:
– Totally new code
– Fault tolerant
– Very efficient

Need sleep… mumbles the TAR file header

5335 View | Annotate 12/15/2005 01:42 PM davidmj

- Now creates vaild ZIP archives, “Data Descriptor” is not needed and breaks things.

5315 View | Annotate 11/30/2005 06:48 PM acydburn

- added acp_language (language pack management)
- minor adjustments to cope with PHP5.x

5114 View | Annotate 04/09/2005 02:26 PM acydburn

- Documentation related changes
- added resend activation email dialog
- fixed issue in session code
- log failed/successful admin re-authentication/login
- fixed simple forum dropdown box (used in mcp and posting)

5074 View | Annotate 01/24/2005 12:02 AM acydburn

- change registration page language on-the-fly
- added download function to functions_compress as well as tiny bugfixes
- added local_name and author to iso.txt file

4418 View | Annotate 08/22/2003 02:35 AM psotfx

Various updates “discovered” while working on website compression function useage

4399 View | Annotate 08/13/2003 06:43 PM psotfx

Seems some compression applications don’t bother with little things like standards …

4398 View | Annotate 08/13/2003 06:11 PM psotfx

Fix up issues with .tar, .tar.gz and .tar.bz2 archives and directory structure creation

4381 View | Annotate 08/12/2003 03:37 AM psotfx

Don’t write out when closing unless a file actually exists …

4357 View | Annotate 08/09/2003 06:05 PM psotfx

Brain wanted in Room 101, Brain wanted

4356 View | Annotate 08/09/2003 05:30 PM psotfx

It’s amazing what a strategically placed = can do for normal operation …

4355 View | Annotate 08/09/2003 02:36 PM psotfx

Further tidy ups for zip compatibility … still seem to be problems deleting entries via Powerarchiver … works fine under Linux

4353 View | Annotate 08/09/2003 02:30 AM psotfx

Improve compatibility of zip extract method

4315 View | Annotate 07/22/2003 10:06 PM psotfx

Save some mem when decompressing .zip

4309 View | Annotate 07/22/2003 12:54 AM psotfx

Extract .zip … damn gzuncompress

4308 View | Annotate 07/21/2003 07:32 PM psotfx

Extraction of .tar, .tar.gz and .tar.bz2

4307 View | Annotate 07/21/2003 06:10 PM psotfx

argh

4306 View | Annotate 07/21/2003 06:10 PM psotfx

concanetate rather than substr_replace

4305 View | Annotate 07/21/2003 05:44 PM psotfx

add .tar, .tar.gz and .tar.bz2 support, rejiggle source, seperate compress objects extending the base class

4291 View | Annotate 07/20/2003 04:37 PM psotfx

Ignore given list of files

4287 View | Annotate 07/20/2003 04:18 PM psotfx

Compression/decompression “libs” and a change to filelist