Commit graph

44 commits

Author SHA1 Message Date
Thijs Kinkhorst
796ddf21ee Implement php_check_version with the PHP version_compare() function which
is available from v4.1.0 (and our minimum is also 4.1.0).
2004-08-03 11:15:53 +00:00
pdontthink
c2d74305a5 Fixed SM version detection bug - wasn't going to hit us until v2.0, but anyway... 2004-07-30 13:10:14 +00:00
Fredrik Jervfors
9d4db8b166 Phpdocumentor update - sed is your friend for these kinds of things ;) 2004-05-21 23:56:53 +00:00
stekkel
35faa69edf Undo my stupidity 2004-04-22 09:09:48 +00:00
stekkel
ad94f2adaa Set the base path before every session_start in case we loose track of the
base_path (couldn't reproduce it myself but in certain configs this fixed a
cookie issue)
2004-04-21 19:14:18 +00:00
tassium
ddc8f6ade3 This segment of code should be left in until at least Squirrelmail 1.7.x, to give plugins a chance to adapt to the $uid_support option being gone. Reversing Thijs's commit. 2004-03-17 18:34:08 +00:00
Thijs Kinkhorst
5a4550f372 Remove almost all left overs of our non-uid-imap-server support. 2004-03-15 20:15:16 +00:00
Thijs Kinkhorst
644750922c We don't support PHP 4.0.x anymore; update the docs to reflect that and
remove 4.0.x legacy code.
2004-03-11 19:34:43 +00:00
Thijs Kinkhorst
cde0377d36 We're living in 2004 now... perl is your friend for these kinds of things :) 2004-02-24 15:51:22 +00:00
Jimmy Conner
9d5770a2ea Back out support for using SM without Frames 2003-12-01 21:56:59 +00:00
Jimmy Conner
742afd5b0e Added support for using Squirrelmail without frames
(With many thanks to Jason Wickers (jwickers at scs.wsu.edu))
----
There are still a few minor things to iron out, but overall
it works fairly well at this point.  Any plugin that calls
DisplayPageHeader() will now have to replace their </body></html>
with a simple call to noframes_bottom() to be compatible...
(Possibly rename that function to DisplayPageFooter in the future)
2003-12-01 18:51:07 +00:00
Thijs Kinkhorst
2751145774 Add phpdoc doc blocks to some files. 2003-10-29 09:35:51 +00:00
tassium
9098cb73e4 Preparation to begin using phpdocumentor.
Added basic @package/@subpackage tags
The decode/ files were documented slightly more thoroughly, although they're almost self-explanatory anyway.

The individual functions in the functions/ files need to be documented though, and now that this commit is in, anyone willing to write docblocks for functions should get cracking ;)
2003-10-28 21:27:47 +00:00
tassium
88bedca137 Made sure $uid_support is forced true for those who didn't use conf.pl to edit their config.
Corrected email address in a comment from ages ago.
2003-09-30 19:24:45 +00:00
jangliss
94a2124bd0 I should have probably added this many months ago when I first found out
about the $_SESSION/$HTTP_SESSION_VAR not being available until a session
was explicitly started.  99% of the time, this shouldn't be needed, but
this function checks for an active session, and starts one if there isn't
an active one.  This should fix the following references for the $_ vars.

Tested, and doesn't seem to break anything
2003-07-27 03:45:25 +00:00
Erin Schnabel
0c9a8003c5 Add check for just FORM data (POST/GET) 2003-06-16 15:00:10 +00:00
Erin Schnabel
1d129bc9fa Correct login issues with PHP < 4.1
Correctly retrieve values from global vars in case where
4.1 superglobals are not defined..
(Problem caused by references made in global scope not existing within
function scope).
2003-04-23 18:13:08 +00:00
pdontthink
0b5881d78f Explicitly define for old php versions when it's undefined 2003-03-13 10:13:17 +00:00
Erin Schnabel
a8b1114405 WOOOPS. darnit.
Missed a debug statement
2003-02-27 04:33:13 +00:00
Erin Schnabel
c1052db2fd Erroneous use of quotes in the switch in sqgetGlobalVar.
Don't know why I listened to whoever told me to add them.. <sighs>
thought it was acting funny whenever you tried to receive
variables outside of the default.
BLARGH.
it works now, so there.
2003-02-27 04:13:52 +00:00
jangliss
f88dec2b0c Silly me, functions require () to work. 2003-02-20 18:18:28 +00:00
jangliss
3edffd0a36 Remove the unnecesary sqextractGlobalVar function, and replace with the new
sqgetGlobalVar.  This should fix the compose error that Ken Brush was having.
2003-02-07 23:09:16 +00:00
Thijs Kinkhorst
3531e21d4d Implement sqextractGlobalVar with sqgetGlobalVar 2003-01-04 18:17:38 +00:00
Erin Schnabel
6e38ee4a74 Thanks shiruken! needed single quotes around switch constants 2003-01-04 05:26:52 +00:00
Erin Schnabel
39496fd3bc added constants to fetch COOKIE and SERVER values 2003-01-04 05:02:40 +00:00
Erin Schnabel
3b6e061082 Added new function:
sqgetGlobalVar($name, $value [, location] );
This function looks for a variable named $name.
If found, it sets the value into $value (in signature, is &$value) and
returns true. If the variable is not found, the function returns false.

The optional constant allows you to pick which location to
check for the variable in. If none is specified, it will check,
in this order, $_SESSION, $_POST, $_GET. These are defined constants
for use with this function:
 SQ_INORDER - same as specifying nothing, check all three.
 SQ_SESSION
 SQ_POST
 SQ_GET

    It is recommended that plugins, all functions use this instead of
    directly accessing $_SESSION/$_POST/$_GET arrays, as we have
    already taken care of scope (global, etc).

    The Administration plugin has been updated to use this function,
    as an example.

    This is an alternative to sqextractGlobalVar($name), which looks
    for a var named $name in the SESSION/GET/POST arrays, and creates
    a global variable if defined.
2003-01-04 01:12:14 +00:00
Thijs Kinkhorst
75de52f258 Getting ready for 1.4.0 RC1 2002-12-31 12:49:43 +00:00
Thijs Kinkhorst
f0fc6b10b3 Session naming in devel. 2002-12-30 19:52:19 +00:00
Erin Schnabel
415b302b6f Wanted to add the SquirrelMail versioning functions we'd talked about before
we split the streams to the new RC for 1.4.

check_sm_version performs similar function to check_php_version, and
will return true if version is >= what is specified.

For Thijs/Jonathan - the check_sm_version will return false if the
constant it checks against is not defined, making the function itself
safe for previous levels,  should you want to roll it back to stable
to allow plugin developers to use the check_sm_version function to
test for 'new' elements like SM_PATH, etc. that are present in 1.3.x
and up.

More info (though not a ton, I'll admit) is in the sm2-planning module
in cvs: cvs co sm2-planning, then pull up sm2-planning/index.php in your
browser.
2002-12-29 19:10:34 +00:00
jangliss
b94ac6f063 Lets see if we can get this cookie thing right this time. 2002-12-17 19:13:51 +00:00
jangliss
f6ac49ac49 And again... need to destroy cookies as they are created 2002-12-16 21:40:28 +00:00
jangliss
facbf3f2cc Sync'ing global.php with stable to fix multi-session merges, and also
start a session when trying to set a value to it vai $_SESSION.
2002-12-14 06:28:03 +00:00
Thijs Kinkhorst
30e1a532a7 Fix by Martin Schulze of Debian. Please note, this is not a solution to the
recently reported xxs problem.
2002-12-05 11:32:27 +00:00
jangliss
caede20756 Session fix ported from stable, should fix DMN plugin, and prev/next links 2002-11-29 20:01:33 +00:00
tassium
108d7b4616 Force magic_quotes_runtime to be off, since SquirrelMail breaks badly if it's on.
If there's a better place to put this, someone let me know.
2002-11-26 14:40:19 +00:00
Thijs Kinkhorst
df76ef5549 Fix check_php_version for versions that contain a patchlevel. 2002-11-07 11:16:33 +00:00
Thijs Kinkhorst
a9ca110033 Fix warnings in sqstripslashes when $array is empty 2002-11-07 09:54:54 +00:00
Thijs Kinkhorst
2133a45cd7 Introduce a new function: check_php_version(4,1,2) which reports if this install
has (e.g.) version 4.1.2 or higher.
2002-10-29 16:57:55 +00:00
Thijs Kinkhorst
2d3d604a6b You must start a session to be able to destroy it. 2002-10-21 11:27:58 +00:00
jmunro
9ab3d97bd7 This should fix the extra quoting when using magic_quotes_gpc. No need to do this in validate, lets do it in global. 2002-10-07 14:08:50 +00:00
jmunro
16542833cd Since changing to rg=0 we make extensive use of $_SESSION and $HTTP_SESSION_VARS. Because of this session_register, session_unregister, and session_is_registered should NOT be used (see the PHP manual at php.net). They are buggy over different PHP versions anyway. Now when changing a session var using the custom 'sq' version of these functions (all located in global.php) the superglobal array is accessed directly. This fixes the problem with corrupted objects in the session. Tested with 4.1.2 rg=0 and 1. 2002-10-06 23:43:02 +00:00
stekkel
3f0a79989b merge from stable: sqsession_destroy 2002-10-06 19:26:56 +00:00
Thijs Kinkhorst
32711b7f1e Start some register_globals = off fixes:
Login, logout, and folder manipulation are now possible with rg=0. More to come.
2002-09-21 14:57:32 +00:00
stekkel
170eab711d start of using SM-stable methods for handling global vars 2002-08-19 12:21:00 +00:00