Commit graph

14 commits

Author SHA1 Message Date
Alexandre Emsenhuber
1082c71e9b Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ibe7815124d6915792dcbb150d01df21d9b22b0b0
2012-05-21 21:56:39 +02:00
Aaron Schulz
ac2cf6e44a Delete the temp cdb file when an exception is thrown so they don't take up /tmp space 2012-02-15 20:24:15 +00:00
Aaron Schulz
11a46551e7 Put the filename in more of the exceptions thrown 2012-02-15 20:06:47 +00:00
Sam Reed
b7d68a8716 Documentation and whitespace 2012-02-09 01:06:57 +00:00
Sam Reed
52cd34acf5 More documentation 2011-10-29 01:53:28 +00:00
Sam Reed
4c29198850 And some more.... 2011-05-28 17:51:33 +00:00
Sam Reed
3614ecfffb And more documentation. Yaaaay 2011-05-28 17:18:50 +00:00
Max Semenik
a01f75245c CDB support: never refer to it as just "DB" in messages, it confuses people 2010-11-03 17:04:56 +00:00
Alexandre Emsenhuber
7b79d94515 * Standardised file description headers
* Added some descriptions
* Added @file where needed
2010-08-14 17:42:40 +00:00
Aaron Schulz
77486d4c65 Sanity check $this->handle on close() 2009-08-13 20:42:19 +00:00
Brion Vibber
edb3e45825 64-bit host compatibility for hash function in pure-PHP implementation of CDB reader/writer.
This fixes the problem where localization cache files generated under command-line and web were incompatible on Mac OS X when using $wgCacheDirectory instead of l10n_cache table in database.
(Apple ships a 64-bit Apache+mod_php but only a 32-bit CLI php binary, and neither has the cda extension present by default.)

Confirmed hash compatibility with native cda extension by running Tim's maintenance/cdb-test.php on 32-bit and 64-bit Ubuntu installs:

32 bit before patch:
brion@bribuntu:~/src/phase3$ php maintenance/cdb-test.php 
Write test...
e5d9cbbcd0137b281da400bb213820fa  php.cdb
e5d9cbbcd0137b281da400bb213820fa  dba.cdb
Read test...
Done.


32-bit after patch:
brion@bribuntu:~/src/phase3$ php maintenance/cdb-test.php 
Write test...
84108f6dab5c34823333169ca05eb5c3  php.cdb
84108f6dab5c34823333169ca05eb5c3  dba.cdb
Read test...
Done.
brion@bribuntu:~/src/phase3$ 


64-bit before patch:
brion@bribuntu64:~/src/phase3$ php maintenance/cdb-test.php 
Write test...
188d06832d321b20e88e9d0200242efc  php.cdb
14e0225466464003d21496204f12d20c  dba.cdb <- note mismatch!
Read test...
Done.


64-bit after patch:
brion@bribuntu64:~/src/phase3$ php maintenance/cdb-test.php 
Write test...
d244a877c9639e27c79aa1bdbcaee3c2  php.cdb
d244a877c9639e27c79aa1bdbcaee3c2  dba.cdb <- now matches!
Read test...
Done.

YESSSS
2009-07-24 22:15:23 +00:00
Aaron Schulz
6f265ace06 Avoid some silly unlink notices 2009-07-24 09:22:51 +00:00
Tim Starling
0cbc00e3ef Optimised the CDB hash function, now roughly twice as fast for large strings. Most of the saving came from removing the function calls. Retested. 2009-06-22 06:41:48 +00:00
Tim Starling
d93ea4874e Added PHP port of CDB, with abstraction layer. Tested for correctness with a differential fuzz tester, not yet benchmarked. The idea is to open up new applications for CDB, and benefit both shell and shared hosting users.
Ported existing uses of CDB to the new abstraction layer.
2009-06-20 15:59:56 +00:00