Commit graph

99 commits

Author SHA1 Message Date
Niklas Laxström
7aa56cf812 * (bug 25708) Update case mappings and normalization to Unicode 6.0.0 2011-01-09 12:04:28 +00:00
Platonides
c037ae23e5 Use constants. Add spacing. 2010-11-30 23:46:14 +00:00
Antoine Musso
cfc49a6883 With PHPUnit 3.5.0, use its autoloader (like r74831).
Fix 'make test' for me.
2010-11-13 12:45:10 +00:00
Sam Reed
7a789626fd Fix minor semi colon fail from r75767 2010-11-01 00:10:00 +00:00
Sam Reed
39c005ca79 bug 25517 Assignment in conditions should be avoided/ http://www.mediawiki.org/wiki/Manual:Coding_conventions#Assignment_expressions 2010-11-01 00:07:17 +00:00
Alexandre Emsenhuber
18cbe55c7b * Standardised file description headers
* Added some descriptions
* Added @file where needed
2010-08-15 07:47:23 +00:00
Platonides
aedae942f9 From globals to parameters: $columns, $exceptions, $verbose
New line after the error messages.
2010-07-28 12:07:53 +00:00
Platonides
53d59a383c From global to parameter. 2010-07-26 21:01:34 +00:00
Platonides
4074968ddf Moved globals $utfCombiningClass, $utfCanonicalComp, $utfCanonicalDecomp, $utfCheckNFC and utfCompatibilityDecomp into UtfNormal class
Regenerated unicode tables
All tests successful
2010-07-26 12:39:44 +00:00
Platonides
e603a4cdd1 Follow up r69643. Remove unused global. 2010-07-25 18:26:44 +00:00
Mark A. Hershberger
4d94621cb4 Added an explanation for the way the code is set up. 2010-07-20 21:24:07 +00:00
Mark A. Hershberger
9a80e48394 Slightly different, but similar to brion's tests. I wrote this before I discovered brion's tests. Maybe they'll be useful to someone some day. 2010-07-20 21:17:22 +00:00
Mark A. Hershberger
104444bbb5 fixes r69333 — remove dependency on iconv, use icu or native only 2010-07-20 16:14:09 +00:00
Mark A. Hershberger
f08147c313 Prefer the intl PECL extension for ICU Unicode 2010-07-20 15:41:24 +00:00
Mark A. Hershberger
6653570e36 revert r69620 2010-07-20 15:12:29 +00:00
Mark A. Hershberger
271c363db1 Admin is required now. 2010-07-20 15:05:34 +00:00
Mark A. Hershberger
af63bc308a * revert r61258
* check if iconv extension is loaded and, if so, use it in UtfNormal::cleanUp()
2010-07-14 17:34:18 +00:00
Domas Mituzas
13f64719b7 fix include path (DifferenceEngine.php has been moved to 'diff' subdir) 2010-02-21 14:28:16 +00:00
Max Semenik
b2772915be Fixed a E_DEPRECATED 2010-02-16 19:04:09 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Max Semenik
a49fee2729 * Removed remaining trailing ?> from core.
* This involved updating of autogenerated Unicode normalisation tables, which are compliant with Unicode 5.2.0 now. All normalization tests pass except for RandomTest.php which have bitrotten to its death from PHP fatals.
* Added a line about r59036 to release notes
2009-11-14 08:12:51 +00:00
Roan Kattouw
ad4a03c316 Fix up r45749: do is_string() check in the caller instead 2009-01-21 09:26:48 +00:00
Roan Kattouw
ef19b747ca Fix regression from r45749: only UTF-8 normalize strings 2009-01-15 10:26:23 +00:00
Alexandre Emsenhuber
3ad85f1a20 Fixed Doxygen warnings 2008-06-02 17:50:59 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Brion Vibber
c012a63d95 * (bug 13615) Update case mappings and normalization to Unicode 5.1.0
Note that case mappings will only be used if mbstring extension is not present.

Normalization data files updated to Unicode 5.1.0; passes the automated tests.

Seem to have long since lost the script I originally used to generate the Utf8Case.php mapping file, which appears not to have been updated since 2002 or so. :)
Made a new one and moved it into the UtfNormal sub-library.

Note a couple limitations:
* Case mapping (still) uses only the 1:1 simple mappings. Any full or locale-specific mappings are ignored.
* These case mappings are not used anyway when the PHP mbstring extension is available; mbstring's case conversion functions are used instead, with whatever version of Unicode support and whatever complex mapping support they may or may not have.
* The generated Utf8Case.php file is not used directly -- you must also regenerate the serialized version in the 'serialized' directory after updating it to a new Unicode version.
2008-05-08 06:28:50 +00:00
Brion Vibber
4b4ae60c52 A bunch of Unicode constants got moved at some point out of the Unicode normalization library into core Defines.php, breaking the data file generation & testing.
Moved them out to a separate file in the library which can be cleanly included from both places for transparent happiness.
A fresh rebuild & test of UtfNormal data via 'make test' now works fine.
2008-05-08 05:34:48 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Tim Starling
ed4303922f Merged filerepo-work branch:
* Added support for configuration of an arbitrary number of commons-style file repositories.
* Split Image.php into filerepo/File.php and filerepo/LocalFile.php
* Renamed Image::getImagePath() to File::getPath()
* Added initial support for timestamp-based file fetching (OldLocalFile), to be expanded upon by aaron.
* Changed the interface for Image/File object creation: use wfFindFile() or wfLocalFile() depending on semantics
* ImageGallery::add() now accepts a title object as the first parameter
* Moved file handling operations on upload from SpecialUpload to File
* Removed path-related functions from ImageFunctions.php. Removed static path accessors from File. 
* Added a Content-Disposition header to thumb.php output
* Improved thumb.php error handling
* Updated the unit test suite to kind of partially work with modern computers. RunTests.php doesn't work just yet. Fixed an actual regression that the test suite detected -- moved some defines to Defines.php where they will be loaded consistently.
2007-05-30 21:02:32 +00:00
Nick Jenkins
bd23ec29c6 Doc tweaks:
* Seems like an opportune time to introduce "@addtogroup Media" documentation tags.
* Merge "@addtogroup Metadata" (used by Exif.php) into "@addtogroup Media".
* Few more moving comment blocks to above classes.
2007-04-24 06:53:31 +00:00
Nick Jenkins
baaee13afc Prevent some unnecessary lstat system calls, generated by include or require directives.
This can be done either by:
* Using explicit full paths, using the $IP global for the installation directory full path, and then working down the tree from there.
* Using explicit full paths, using the "dirname(__FILE__)" directive to get a full directory path for the includer file. 
* Occasionally removing the line altogether, and then for some files the inclusion is handled by the autoloader.

For example, if the "extensions/wikihiero/wh_main.php" file does an include or require on "wh_list.php", then PHP does the following:
* tries to open "wiki/wh_list.php", and fails.
* tries to open "wiki/includes/wh_list.php", and fails.
* tries to open "wiki/languages/wh_list.php", and fails.
* tries to open "wiki/extensions/wikihiero/wh_list.php", and succeeds.

So in this example, the first 3 calls can be prevented if PHP is told where the file is.

Testing Method: On a Linux box, run these commands to attach strace to all the apache2 processes, and log their system calls to a temporary file, then generate some activity, and then stop the strace:
-----------------------------------
rm /tmp/strace-log.txt
strace -tt -o /tmp/strace-log.txt -p `pidof apache2 | sed 's/ / -p /g'` &
php maintenance/fuzz-tester.php --keep-passed-tests --include-binary --max-runtime=3 > /tmp/strace-tests.txt
killall -9 strace
grep "No such file or directory"  /tmp/strace-log.txt | sort -u
-----------------------------------

Any failed file stats will be marked with: "-1 ENOENT (No such file or directory)".

Also:
* Strict Standards: Undefined offset:  230 in includes/normal/UtfNormal.php on line 637
* Strict Standards: iconv() [<a href='function.iconv'>function.iconv</a>]: Detected an illegal character in input string in languages/Language.php on line 776
  [Note: Partial only - despite adding "//IGNORE", it still seems to be possible with some
         messed- up binary input to cause PHP 5.1.2's iconv() function to squeal like a stuck pig].
* Update one $fname variable (method belongs to HistoryBlobStub class).
2007-02-09 05:36:56 +00:00
Brion Vibber
8fab89a6c4 Cleanup from r19742:
* use diffchange class alone for backwards compatibility with old renderings and diff plugins
* set text-decoration: none in diffs in RSS/Atom feeds
* fix bad diff regex in UTF-8 RandomTest script
2007-02-04 18:42:07 +00:00
Antoine Musso
fe7d2d15d4 Fix #6844: Semantically correct tags for diffchanges (<ins> && <del>)
Bumps wgStyleVersion to 55.
Patch by Messi <messias+spam@gmail.com>
2007-02-03 21:47:53 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Brion Vibber
e398816be7 use number_format on bytes/sec in output to make it easier to read 2007-01-13 04:22:47 +00:00
Brion Vibber
f15f0e05bb fix benchmark test data downloads; fix link for english text; find another page for korean text (page was deleted) 2007-01-13 02:57:58 +00:00
Brion Vibber
161d9aee1f * (bug 7250) Updated Unicode normalization tables to Unicode 5.0 2007-01-13 02:30:59 +00:00
Brion Vibber
25a2f1b60a adjust CleanUpTest to run with PHPUnit 3 2007-01-13 02:15:19 +00:00
Nick Jenkins
14c53b728f Code housekeeping stuff (and barring any stuff-ups on my behalf, there should be no changes in behaviour whatsoever after this) -
* removing some unused global declarations.
* removing or commenting out or adding comments for unused local vars.
* Adding one or two local var declarations.
* Declaring $matches array passed to preg_match() / preg_match_all() as array() before using [not required, just have a slight preference for the explicitness].
* remove one or two pass-by-reference function declarations where the value is not modified.
* Adding some braces to if-else blocks.
* In Parser.php, stripstrate is now an object rather than an array as per r17820, so we no longer need ask for a reference to it (as in "$x =& $this->mStripState;"), and in fact it's probably just simpler to get rid of $x altogether.
* Moving some preg regexes from "" quoting to '' quoting to stop static analyzer whinging about bad escape sequences.

... up to "LinksUpdate.php" in the includes/ directory.
2006-11-23 08:25:56 +00:00
Yuri Astrakhan
7b49a7bdda Marked all functions as static 2006-10-21 08:30:48 +00:00
Tim Starling
f3ce9d418d Use absolute path in require_once, errors reported in some configurations due to odd include_path. 2006-10-03 13:06:39 +00:00
Antoine Musso
93154120cc Remove forced dereferencements (new() returns a reference in PHP5) 2006-07-11 14:11:23 +00:00
Antoine Musso
473cd5cbcc unused variables as per #3692 2006-05-01 10:53:59 +00:00
Antoine Musso
69689725c1 Switching from phpdoc to doxygen (use less than 32MB of memory).
Run maintenance/mwdocgen.php to generate doc in ./docs/html/ .
2006-04-19 15:46:24 +00:00
Brion Vibber
3bbf7dcbd2 Remove .cvsignore files 2006-04-05 08:23:27 +00:00
Brion Vibber
f2c29baf9f Update the FSF's address in all these GPL stub headers 2006-04-05 07:43:17 +00:00
Tim Starling
11f0b952f6 Replaced codepointToUtf8 calls with string literals, should save a few milliseconds according to xdebug. Ran unit test. 2006-03-05 03:03:03 +00:00
Brion Vibber
266d41f165 * Added wfDie() wrapper, and some manual die(-1), to force the return code
to the shell to return nonzero when we crap out with an error.
2006-01-14 02:49:43 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00