Commit graph

730 commits

Author SHA1 Message Date
defacer
dddb014acf 1. make_timestamp: It's easy to be a fool, but to do it like me requires innate talent.
2. usertime: I think that the way Moodle is written, if this compensates for DST lots
   of things are going to break. I found a few myself and decided to revert the behavior
   until such time as a proper code review can be made.
2005-04-10 09:41:46 +00:00
defacer
c9e55a2583 LIMIT 1 was already being introduced by get_record_sql, and GMT offsets weren't working due to the bad query. 2005-04-10 09:31:21 +00:00
defacer
989585e933 Major step forward once more: calculate_user_dst_table() now always sees the
user's effective timezone correctly using get_user_timezone(). It also remembers
which timezone was in effect when it cached its calculations, so if the user's
effective timezone changes for any reason the table is automatically re-computed.

******
NOTICE
******

From this point onward, DST support should be working again, and there are no more
visible hurdles in the way. This means it should STAY working correctly until 1.5.
2005-04-09 10:12:30 +00:00
defacer
6dc8dddc62 Removed another unnecessary get_user_timezone_offset() call. 2005-04-09 09:50:08 +00:00
defacer
13e5588de8 Removed unneeded get_user_timezone_offset() call; usertime() does it anyway. 2005-04-09 09:47:01 +00:00
moodler
7b9e355e43 Fixed an error in the timezones 2005-04-09 08:44:49 +00:00
defacer
e8904995f0 Introduce the "new" get_user_timezone, and implement get_user_timezone_offset in terms of it. 2005-04-08 20:32:40 +00:00
moodler
494b9296e9 Renamed get_user_timezone to get_user_timezone_offset, because Jon has
plans for that function name
2005-04-08 07:42:50 +00:00
defacer
2665e47afc usertime() now compensates for DST. 2005-04-08 05:39:53 +00:00
defacer
43b59916f6 get_user_timezone() should now be working for users with new-style timezone settings.
get_timezone_record() function added to cache some db queries.

I haven't been able to test this yet, will do later.
2005-04-08 05:28:39 +00:00
defacer
b86e6ba918 is_executable() doesn't exist in PHP/Win < 5.0.0 2005-04-08 05:01:09 +00:00
martinlanghoff
853df85e56 Performance/footprint profiling patch complete -- is enabled by CFG->default>7 or by a few defines in your config.php. 2005-04-07 00:11:28 +00:00
martinlanghoff
c2fd9e955a Improved performance info reporting and logging. Needs some work on the configuration front still. 2005-04-06 07:34:05 +00:00
moodler
ddd7a47ac1 Removed a notice from isteacheredit 2005-04-06 06:26:38 +00:00
moodler
dcc17b63b1 More improvements to isteacher() logic (and isadmin now uses $USER->admin too) 2005-04-06 06:20:59 +00:00
moodler
5e04ee0c4f More efficient logic for isteacher() 2005-04-06 05:53:24 +00:00
moodler
b8cea9b2de Added some performance monitoring functions into the core 2005-04-01 10:00:18 +00:00
moodler
fcaff7ffcd Updated formatting in getremoteaddr, and made add_to_log use it 2005-04-01 07:40:07 +00:00
defacer
830a2bbd82 Yay! Major DST support progress!
1. calculate_user_dst_table() works correctly and offers many features:

Can create or extend on-the-fly a table of pre-computed timestamps on which
DST changes happen, keeps track of these changes and the current computed year
range in $USER->dstoffsets and $USER->dstrange. Initially the computation is
done in a current year +/- 3 years range, to keep the amount of serialized
data small and to make traversals of $USER->dstoffsets faster.

2. dst_offset_on() works correctly, and can dynamically instruct the above
function to extend the pre-calculated region on demand (i.e., when it's called
for a timestamp which falls outside said region).

3. Some other improvements.



I have made a few preliminary tests on my dev machine and It Works(tm!) :D
2005-03-26 18:43:58 +00:00
defacer
3bba1e6ef1 Fixing a regression. 2005-03-23 14:43:32 +00:00
defacer
5c5dfee259 Duh. More spurious output squashed. 2005-03-23 04:03:50 +00:00
defacer
9532c34e00 I had left some uncommented debug output in there. Comments back on. 2005-03-23 04:02:21 +00:00
defacer
e789650d41 Piles of timezone-related changes. 2005-03-23 03:03:43 +00:00
defacer
0c478e1085 Killing dst_offset_for_year(). 2005-03-23 02:13:00 +00:00
defacer
0ed442f85c DST presets -> timezones 2005-03-23 01:54:45 +00:00
defacer
0bd7322e30 Going forward to timezones ever so slightly. 2005-03-23 01:26:34 +00:00
defacer
28902d99c8 find_day_in_month now working with the latest convention of $startday, $weekday 2005-03-18 04:38:30 +00:00
gustav_delius
cd8d4471c8 Print course in footer 2005-03-17 15:12:07 +00:00
gustav_delius
f52d48db38 Added clone function to get around the differences in object handling between php4 and php5. 2005-03-16 22:15:36 +00:00
moodler
322344bb6b get_string will now also check inside block directories, which means
Blocks can be self-contained    (thanks Eloy for the idea!)
2005-03-14 13:08:16 +00:00
moodler
7ff9860db0 This change will break themes for sideblock, but now all the main TH cells that use
the standard kind of look (eg gradient) have a consistent class "th.header"
2005-03-13 13:50:23 +00:00
moodler
1ac7ee24d7 CFG->nofixday can override the ficing of day format in userdate 2005-03-10 14:10:21 +00:00
moodler
211ea3e9d3 COnsistent use of readdir 2005-03-10 06:04:29 +00:00
moodler
7d56fe1077 Use real tabs in the error_log call because \t doesn't seem to work 2005-03-10 05:05:12 +00:00
martinlanghoff
de6fa62a56 Fixes from Dan Marsden to getremoteaddr() and address_in_subnet() -- getenv() isn't supported under ISAPI (IIS) so we use _SERVER instead. address_in_subnet() had a loop control error. 2005-03-10 02:36:51 +00:00
moodler
f1e0649c1c Removed files/mimetype.php and put it into lib/filelib.php instead
where it always should have been.
2005-03-07 11:32:03 +00:00
defacer
59556d4833 Switching < to <= which is the correct operator 2005-03-05 23:57:19 +00:00
defacer
c9e72798d4 Changing the way that the DST offset is retrieved, given a timestamp.
This is a nightmare issue, as far as I can think of this is "the" solution.
2005-03-05 22:23:08 +00:00
stronk7
433c8b2e72 Added support to priority in email_to_user(). Bug 2647
(http://moodle.org/bugs/bug.php?op=show&bugid=2647)
2005-03-02 17:56:46 +00:00
moodler
0afedf684d Fixed the link for the confirmation email ... the &amp; was breaking in some
mail  ... see also bug 2502 for something similar
2005-03-01 07:06:42 +00:00
defacer
251af423cd Err... course block instances weren't being deleted along with the course? 2005-02-28 04:35:32 +00:00
defacer
8dc3f6cf5e Changing find_day_in_month() to conform with the new definitions of DST presets.
Adding function dayofweek (centralization, this might also be helpful in fixing a bug).
2005-02-26 06:26:04 +00:00
moodler
2ae281532b New PARAM type called PARAM_CLEANHTML which knows how to clean up HTML properly 2005-02-25 13:10:24 +00:00
gustav_delius
d2a9f7cc69 removed &amp; from url in password change confirmation email, see bug 2502 2005-02-25 06:08:40 +00:00
moodler
e9df755235 Robustness check 2005-02-23 16:29:00 +00:00
moodler
e76ae26489 Fix for erroneous checkin of CVS confict markers ... bug 2626 2005-02-23 12:10:02 +00:00
martinlanghoff
ccb3585fdc Merged from MOODLE_14_HEAD - Bug fix. Using external auth, the user account fails to be created on login if currently logged-in as guest. Credits go to Dan Marsden for the fix. 2005-02-23 02:11:59 +00:00
skodak
fd05dffed6 SC#98 protection of uploaded files in resources, please review and test 2005-02-22 23:36:20 +00:00
moodler
ed1f69b0cf Er ... copy/paste typo 2005-02-22 06:52:42 +00:00
moodler
e34d817e66 Tidying up some timezone stuff 2005-02-21 08:55:40 +00:00