56 Commits

Author SHA1 Message Date
Petr Škoda
c82d309d07 MDL-34115 fix sorting in blocks admin UI
Comparison of arrays is not locale aware.
2012-06-30 08:33:34 +02:00
Petr Skoda
bc53b4e9d7 MDL-33635 improve collatorlib::ksort() coding style and perf
Thanks Eloy Lafuente for spotting my sloppy coding style!
2012-06-13 16:37:56 +02:00
Petr Skoda
b71d0b43fc MDL-33635 add collatorlib::ksort() support 2012-06-12 10:57:24 +02:00
Petr Skoda
212826853b MDL-33635 improve collatorlib
1/ the sort flag can not use Intl extension constants because they may not be available
2/ add sort flag to all methods
3/ use private constructor instead of abstract - more Java like API to match the textlib
4/ add natural sorting support
5/ consistent bool return type
6/ better non-intl fallback
7/ more tests
2012-06-12 10:57:24 +02:00
Petr Skoda
b29487664d MDL32575 make sure typo3 is not confused by non-string data types 2012-04-23 00:20:47 +02:00
Petr Skoda
bc5c10f69e MDL-32575 import latest Typo3 libs for textlib and other improvements
Includes new textlib reset, new test for faulty integer lower/upper casing.
2012-04-21 21:31:03 +02:00
Petr Skoda
3fed29a792 MDL-31301 move textlib_get_instance() to deprecatedlib 2012-03-03 11:46:33 +01:00
Rajesh Taneja
55d1f2727c MDL-30980 core: Php document updated for string api 2012-02-07 14:35:47 +08:00
Petr Skoda
ca281c51bb MDL-31142 fix textlib::substr() performance, invalid length in iconv_substr; use mbstring by default 2012-01-16 09:16:14 +01:00
Sam Hemelryk
f8adfe6cc0 Merge branch 'w36_MDL-28701_m22_tempcachedir' of git://github.com/skodak/moodle 2011-09-12 18:26:09 +12:00
Tom Lanyon
af9b14446d MDL-28701 Change uses of make_upload_directory(temp) to make_temp_directory(). 2011-09-10 10:43:49 +02:00
Tom Lanyon
7aa06e6ded MDL-28701 Change all uses of $CFG->dataroot/temp to $CFG->tempdir 2011-09-10 10:35:39 +02:00
Eloy Lafuente (stronk7)
7aacd75be4 MDL-29269 textlib - better handling of collation warnings and errors 2011-09-08 13:00:30 +02:00
Eloy Lafuente (stronk7)
20079ee7bc MDL-28599 textlib Capture error message earlier to avoid mixing 2011-09-06 13:45:25 +02:00
Sam Hemelryk
d609d96261 MDL-28599 textlib Separated collator to collatorlib with static methods, and added support for locale aware sorting of objects 2011-09-06 15:39:00 +12:00
Petr Skoda
b25a17142c MDL-29027 support for mail charsets 2011-08-24 18:37:13 +02:00
Petr Skoda
2e0ecae45e MDL-29027 fallback to typo and more tests
Hopefully we now get the same results on all systems.
2011-08-24 17:14:47 +02:00
Petr Skoda
a7a20faf8f MDL-29027 fallback to mb_string on errors if available and simplify charset parsing
This may solve problems with encodings unsupported in iconv and random borked chars are ignored.
2011-08-23 15:21:15 +02:00
Petr Skoda
5a7e4c1158 MDL-29027 improve textlib api and add missing unittests 2011-08-20 17:00:53 +02:00
Petr Skoda
0b661c7d52 MDL-26256 detect missing collator support and use workaround instead 2011-02-06 22:27:25 +01:00
Petr Skoda
3650b83d9e MDL-23899 fixed asort to modify parameter instead of returning array - it now matches standard asort() 2010-09-05 12:57:59 +00:00
Petr Skoda
878bcc7f09 MDL-23899 locale aware asort + unit tests 2010-09-04 21:12:18 +00:00
Petr Skoda
8d3bf3e0cd MDL-23984 setting proper typo3 directory permissions 2010-08-29 14:31:08 +00:00
Petr Skoda
0a31acef78 fixing IDE code completion issue 2010-08-09 13:23:11 +00:00
Tim Hunt
9ffcb38e43 textlib NOBUG improve comment to autocomplete works. 2010-08-05 13:56:37 +00:00
Petr Skoda
78bfb562a0 MDL-21249 improved php docs and adding direct access prevention in core libs 2010-07-25 13:35:05 +00:00
Eloy Lafuente
850ea1eea9 NOBUG: Instructing Typo3 stuff we are curl-enabled always since 2.0 2010-06-24 09:48:31 +00:00
Petr Skoda
bf69b06d1b MDL-22050 removing moodle/langconfig duplicates
AMOS BEGIN
  MOV [locale,core],[locale,core_langconfig]
  MOV [localewin,core],[localewin,core_langconfig]
  MOV [localewincharset,core],[localewincharset,core_langconfig]
  MOV [oldcharset,core],[oldcharset,core_langconfig]
AMOS END
2010-04-10 17:54:39 +00:00
Petr Skoda
117bd74897 MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup 2009-11-01 11:31:16 +00:00
samhemelryk
668564e5b2 lib MDL-19236 Corrected copyright's 2009-05-27 01:56:31 +00:00
samhemelryk
72fb21b65b lib MDL-19236 Added boilerplates and copyrights 2009-05-26 05:18:52 +00:00
skodak
3b09331066 MDL-17458 rewritten installer 2009-02-07 10:20:33 +00:00
nicolasconnault
b7064779f5 Updated copyright notice in header 2007-10-10 05:25:14 +00:00
martinlanghoff
015e19287b Revert "textlib: Don't require_once() class.t3lib_div.php which we never use"
Turns out class.t3lib_cs.php depends on class.t3lib_div.php. Will drop
the two commits before we go into HEAD.

This reverts commit 5768bf6fb4dfa334dc81a80d26111904c4d13abd.
2007-09-19 07:49:49 +00:00
martinlanghoff
0c13a90844 textlib: Don't require_once() class.t3lib_div.php which we never use
The largest of the 2 typo3 libs we ship in Moodle is never used. So
don't even parse it.

This takes Moodle's "default homepage" from 1.8MB to 1.6MB of PHP.
Tiny, but every bit helps...
2007-09-19 07:46:54 +00:00
skodak
8e1ec6be58 MDL-11298 use textlib_get_instance() instead of new textlib() 2007-09-16 18:49:41 +00:00
skodak
e8515774c3 MDL-11048 adding new method to textlib strtotitle() - please note that is may not be usable in all locales, it might also produce different results when mbstring available 2007-09-16 11:45:30 +00:00
moodler
db48c57c3c Merged fix for MDL-10254, thanks Valery! 2007-06-26 09:09:39 +00:00
stronk7
4e2cb0e3f3 Added entities_to_utf8() function to textlib, suitable to convert
any entity (numerical and html) to utf-8, providing a PHP4 and PH5
way to do the work.
Also, added the code2utf8() function to convert Unicode code numbers
to UTF-8 chars.

Merged from MOODLE_18_STABLE
2007-06-13 19:43:56 +00:00
toyomoyo
4d40aa144a grade import temporary buffer tables and encoding/import form changes 2007-06-05 09:28:15 +00:00
skodak
77b4d4be49 MDL-9075 utf-8 bom is now stripped from uploaded users cvs file; merged from MOODLE_18_STABLE 2007-04-10 15:32:37 +00:00
skodak
531468274f MDL-5229 and MDL-6196 adding gb18030 mime header encoding; merged from MOODLE_18_STABLE 2007-03-12 08:41:28 +00:00
skodak
684663f526 MDL-6196 infinite loop in header encoding when using some site charsets (gb18030); merged from MOODLE_18_STABLE 2007-03-08 00:05:58 +00:00
stronk7
e4023a4c20 Normalizing encoding by using textlib synonyms - parse_charset()
Credit goes to Petr.

Merged from MOODLE_18_STABLE
2007-03-05 18:28:33 +00:00
martinlanghoff
e7812e9c62 lib/textlib.class: Cache dir is now created correctly, allowing speed increase (SR# 595)
Previous logic had dir created only when mbstring wasn't used, but the
typo3 lib needs to cache some data regardless, for the specCharsToASCII
function, which uses internal translation tables.


Author: Luke Hudson <luke@catalyst.net.nz>
2006-10-31 05:03:54 +00:00
skodak
9c1cd39de5 Bug #5937 - Fix nonascii chars in graphs:
* text is converted to unicode - no html entities anymore
 * then all nonascii chars are converted to decimal number entites
 * default.ttf is searched in dataroot/lang and local language packs too
 * removed lang_decode() - obsoleded by proper entity converison above
 * updated documentation in lang/en_utf8/fonts/README.txt

merged from MOODLE_16_STABLE
2006-06-29 21:22:16 +00:00
stronk7
c539d6224b Now encode_mimeheader() only encodes the header if it isn't 100% ASCII. 2006-03-19 02:38:21 +00:00
stronk7
3ec5ec15bc Function encode_mimeheader() added. Finally, it seems that we have to
use our own function because phpmailer one doesn't handle multi-byte
characters, breaking them.
2006-03-19 01:09:15 +00:00
skodak
4352f048f5 workaround for some more uninitialized offset warnings 2006-03-12 20:06:12 +00:00
stronk7
e05fc498ea Avoid some minor notices and warnings (reported as bug 2814 to Typo3 team)
(http://bugs.typo3.org/view.php?id=2814)
2006-03-09 17:29:58 +00:00