Commit graph

255 commits

Author SHA1 Message Date
stekkel
628caa9264 sqBodywrap was extreme slow on large messages. The reason for that were the
amount of calls to sq_strpos and sq_substr. Those functions did expensive
in_array calls and a few other things that only need to be done once. By
using static vars I cached the results with as result my compose screen
opens within a second again instead of 10 seconds.
2006-09-30 16:24:00 +00:00
pdontthink
7fb385ed0a Moving sm_print_r back to globals.php; tired of it not being available when developing - that's what it's for, more than being available for actual code use as a string function in a file that's not included high enough. Also new directory parsing fxn. 2006-09-28 14:17:15 +00:00
Thijs Kinkhorst
d12db33c3f kibibyte is with a capital K 2006-09-10 08:30:13 +00:00
Thijs Kinkhorst
37722cf3a4 kilo has a small 'k'. 2006-09-09 18:51:06 +00:00
Thijs Kinkhorst
125af3afaf drop very old and very obsolete function 2006-08-07 18:47:59 +00:00
Thijs Kinkhorst
e703e30bdd Make the base for the SquirrelMail URL configurable. Adds a new variable
config_base_location to config.php and a new option to conf.pl. This is
to prevent problems in installs where our heuristic doesn't work
correctly (#1521299, #1460675, #1110064, #1000850, #1113791)

I believe this is one of the most commonly reported issues in current
stable. That's why I've created the code to be minimally invasive: it only
allows to set the proto+host+port part, because this means all changes
can remain within get_location().

I want to backport this bugfix to stable so I appreciate any feedback
on it. And also of course if you think that this is the wrong way to
solve it :)
2006-07-17 14:42:06 +00:00
tokul
59ae6f3ac2 removing trailing ?> from function scripts 2006-07-15 12:01:32 +00:00
Fredrik Jervfors
339f867fb5 Using IEC standard prefixes. 2006-06-15 16:35:26 +00:00
Thijs Kinkhorst
7392b8753d Take X-Forwarded-Host HTTP header in consideration when constructing
base_uri for redirects; reduces problems with transparent proxies
(#1488590). Also test strcasecmp on literally '0' with respect to
#1047883 although I don't think it's absolutely necessary, it's safest.
2006-05-18 15:09:30 +00:00
Thijs Kinkhorst
5641a73844 Correct references trimming: array_walk can't in all PHP versions use
a callback function that is a member function. Moving the function out
of the class seems the best solution.
2006-05-03 13:37:53 +00:00
stekkel
d971de24d8 Fix for compose in new. Now use the constant SM_BASE_URI.
TODO, move this function to the same place as makeInternalLink.
2006-04-06 11:09:04 +00:00
stekkel
0a70f643f2 Centralized init 2006-04-05 00:22:11 +00:00
jangliss
19e3a7b32a - Security: Possible cookie theft in src/redirect.php if
register_globals is enabled, and malicous site is running
    in same domain.
2006-03-03 03:39:18 +00:00
tokul
7346f9a580 Upping HEAD version number. 1.5.1 scripts are stored in SM-1_5_1 branch. 2006-02-12 16:11:50 +00:00
tokul
83fdb4c332 copyright update 2006-01-23 18:46:41 +00:00
tokul
c126a879c3 adjusting string functions to Japanese translation layout specifics
(#1377622).
2005-12-13 10:53:43 +00:00
jangliss
25fcbd5e8f Test before committing... stops stupid errors :) 2005-12-08 17:13:44 +00:00
pdontthink
a999bf86e3 Include compatibility plugin; no need for patching to use plugin 2005-12-07 10:47:30 +00:00
pdontthink
a1e6cfdb1b Move sqm_baseuri() to strings.php. A file for functions that manipulate strings isn't a good dumping ground for this stuff, but get_location() is already there, and otherwise we'd need more reorg that I'm not doing now. 2005-12-07 05:57:06 +00:00
tokul
2c55a11514 updating since tags 2005-11-06 09:55:54 +00:00
tokul
7bb32e60c7 adding more charsets to sq_mb_list_encodings 2005-11-04 18:31:35 +00:00
tokul
9b38413e94 rearranging global.php layout:
* first list defines, then functions, then run code
* move php_self() function from strings.php to global.php in order to provide
$PHP_SELF to session functions
2005-10-20 17:48:49 +00:00
Fredrik Jervfors
9ed98bb1ec phpDocumentor updates 2005-09-18 10:25:54 +00:00
tokul
5375447f43 adding workaround for encoding of long multibyte headers. Saves my head from
debugging of encodeHeader.

adding information about made changes to changelog.
2005-07-31 13:18:24 +00:00
tokul
ca512784c0 documenting functions and adding some sq_mb_list_encodings updates 2005-07-03 09:55:10 +00:00
tokul
574965eb4f replacing skip_SM_header with two different options. If admins want to shoot
their own foot, they have to do that themselves and remove headers
completely by modifying SquirrelMail scripts.
2005-05-12 08:15:19 +00:00
Fredrik Jervfors
2531f52955 Trimming whitespace and replacing tabs 2005-04-23 12:08:00 +00:00
stekkel
a2a0b64cd1 strings: adapt makeComposeLink to the new js
mailbox_display, retrieve aFetchHeaders.
read_body, behave well when the cache is invalidated
2005-04-16 11:12:22 +00:00
stekkel
24dc4ae0fa Templates 2005-04-14 22:09:03 +00:00
tokul
086e44b92f @since information about sm_print_r 2005-04-14 17:05:18 +00:00
tokul
0fb9a2d2ea preformated text is harder to read, when output is centered. 2005-04-14 16:33:16 +00:00
Thijs Kinkhorst
d492cf60ee When wanting to use mb_strtoupper, test for the existence of that function
(couldn't send any mail anymore because I am lacking that function).
2005-03-29 13:16:05 +00:00
tokul
824d024c73 using mbstring functions for body wrapping, if they are available.
own utf strlen implementation is removed because we need strlen, substr and
strpos implementation in order to use it correctly.
sqbodywrap function is modified to use sq_* functions instead of vanilla
string functions.
function calls that analize string in bytes ($body{$position}) are replaced
with string functions.

closes #1043576 in devel. code is not that complex in stable and it needs only
modified strlen calls.
2005-03-27 09:48:33 +00:00
tokul
c47e97e168 adding is_array() test to output of get_class_methods() 2005-03-06 12:54:24 +00:00
tokul
7bec762f54 print object methods if object is feeded to sm_print_r 2005-03-02 18:19:46 +00:00
tokul
55e7fd2fc8 adding str_pad replacement for multibyte charsets and some documentation fixes 2005-01-27 13:20:56 +00:00
tokul
6b73a2c9b7 Provides some fixes for #1043576 (incorrect wrapping of multibyte texts).
If same code is ported to stable, it could make that bug specific to
devel branch. Devel branch needs more fixes for sqBodyWrap function. I would
like to add Eastern charset support before moving it to 1.4.5
2005-01-10 18:43:44 +00:00
Fredrik Jervfors
9faf3051c1 Changing squirrelmail/Squirrelmail to SquirrelMail in some strings as well as other minor documentation fixes 2004-12-29 15:06:20 +00:00
Thijs Kinkhorst
a73561b911 Increment year in copyright notice. 2004-12-27 15:04:02 +00:00
Fredrik Jervfors
66d6ea252d XHTML fixes 2004-11-12 14:21:31 +00:00
Fredrik Jervfors
8c8ecffa57 Replacing tabs with spaces, trimming white space at EOL and newline at EOF 2004-11-02 22:21:34 +00:00
Jimmy Conner
2cd94f0d75 Removed variables that were initialized, but never actually used
Also remove a few more globals that were unused
Remove a few newlines at the end of files
Hopefully this will help shrink the memory footprint of SM just slightly
2004-11-01 02:05:15 +00:00
Jimmy Conner
69b94b6a1c Minor bug fix, assignment in condition resulting in our seeding function to fail 2004-10-28 06:37:38 +00:00
tokul
232912ec98 adding sq_is8bit and sq_mb_list_encodings functions.
sq_is8bit can be used in decoding functions and read_body.php
sq_mb_list_encodings provides replacement for mb_list_encodings
2004-10-15 09:12:12 +00:00
tokul
34a0b16773 xtra_code updates in strings 2004-08-08 14:59:29 +00:00
stekkel
935fc22b6f Fixed warning.
TODO: look at lines which are longer then the editor size and and theirfor
do not reach the code responsable for the smart wrapping of short lines.
Those lines should also be tested on first words.
2004-06-16 09:48:31 +00:00
stekkel
1fc1409425 Tweaked wrapping a little more. 2004-06-15 18:09:57 +00:00
stekkel
b92481b314 Possible fix for our wrapping problem. Please review it because I might have
did some stupid things bvecause I used the trial and error method for this
one.
2004-06-14 19:29:56 +00:00
tokul
ff6d3d6fe3 rewriting tests after ctype/sm_ctype comparision and reading php manual more creafully.
converted ereg to pcre. It would be better to include function_exist('ctype_space') test
in this function. P.S. reply code is broken if message includes double quotes.
2004-06-07 14:41:52 +00:00
Brian G. Peterson
26f3fc4e59 - add sm_ctype_space and function_exists check to support PHP without ctype
- sm_ctype_space function contributed by Tomas Kuliavas
2004-06-06 18:46:38 +00:00