201 Commits

Author SHA1 Message Date
toyomoyo
0856223c50 mechanism to install events 2007-04-19 08:45:30 +00:00
martinlanghoff
cf8133c457 lib/setup moodelib: Introducing moodle_request_shutdown()
Now Moodle will have a 'shutdown_function' function. Right now
registered (and useful) only when running under apache + mod_php.

This initial function checks whether memory usage in this process exceeded
10MiB or $CFG->apachemaxmem (int, in bytes). This is really useful to prevent
using more RAM than we have.
2007-04-05 05:04:06 +00:00
skodak
4eefee9779 MDL-8469 increase memory limit everywhere due to changed calculation of used memory in PHP 5.2.x - the real memory useage is the same, but the reported size of used memory is now more accurate 2007-02-14 20:46:38 +00:00
moodler
ab036ed9ca Feature from Eloy to set the language to whatever the browser suggests (if the user is not logged in) 2007-02-12 14:58:44 +00:00
skodak
6349a3ba48 MDL-8384 debugdisplay does not respect original value of display_errors 2007-02-01 21:11:50 +00:00
moodler
326e563a43 Prevent an rcache-related notice 2007-01-29 06:12:18 +00:00
skodak
8d2b18a886 MDL-8337 has_capability() ignores default roles for $userid and does not detect changed $USER and other minor fixes (this is needed for global $COURSE cleanup and fixed+improved cron.php) 2007-01-28 20:52:57 +00:00
skodak
dcf6d93c9c MDL-8323 Add proper setup of course $CFG variables, fix use of global $COURSE
new function course_setup() thats does proper $CFG-> , locale and themes setup much sooner than print_header() originally (needed for MDL-8067), cleanup of forgotten global $course issues

MDL-8067 Fixed several $HTTPSREQUIRED issues - html editor now loads from https (the old hack did not wotk with IE7, new hack is uglier but works), fixed formlibs images (we can not set them in library global scope, we must wait for httpsrequired() and require_login() and od that in function), fixed links in meta.php, fixed help images

fixed setting of new $USER values in user edit forms
2007-01-27 19:56:08 +00:00
martinlanghoff
bb931a61c6 rcache: cleanup, upgrade path, config options (MDL-8163)
record cache and caching schemes get a little cleanup, faster
if()s and a nice set of config options. Users who've been using
the internal cache get a nice upgrade too.
2007-01-14 23:02:13 +00:00
moodler
d21a5865cf Added CFG->frametarget (defined by frametarget()) MDL-8050 2007-01-04 04:57:50 +00:00
moodler
2533830067 $CFG->debugdisplay now controls PHP errors too 2007-01-03 01:37:20 +00:00
martinlanghoff
2142d4924f $MACHE: add support for eaccelerator/memcached, change the $MCACHE calling convention a bit
- this effectively breaks memcached support for the moment
2006-12-27 22:47:14 +00:00
martinlanghoff
419e1d937e Introducing $MCACHE - Memory-based cache
$MCACHE is initially based on core API that is shared between memcached and
turckmmcache/eaccelerator. The core operations are add(), set() and delete()

This initial implementation uses the PECL-based PHP client. Would be trivial
to add support for a PHP-based client.

The $MCACHE facility can be used for DB cache, text filters cache, and possibly
for sessions.
2006-12-27 22:44:39 +00:00
martinlanghoff
76f3815be9 raise_memory_limit() earlier -- resolves OOM on 64-bit platforms
On 64-bit platforms the in-memory footprint of our libraries is quite a bit
larger than usual, and we hit the 8MB default memory limit before we call
raise_memory_limit(). This patch moves raise_memory_limit() and
get_realsize() to setuplib so we can call them earlier, and moves the
call to _before_ we include the libraries.

On AMD64, for MOODLE_17_STABLE the footprint is about 9.5MB. Diet time? :-)
2006-12-26 22:48:36 +00:00
toyomoyo
323edd4ba4 fixing indenting 2006-11-15 03:15:06 +00:00
skodak
810944af7f we are going 100% unicode now - removed use of $CFG->unicodedb and current_charset(); MDL-7439 - part 2, only hotpot and wiki left 2006-11-11 17:23:20 +00:00
toyomoyo
7ddf8aa59f adding more checks to make sure 1.8 is unicode only MDL-6332 2006-11-09 04:27:44 +00:00
moodler
34bf3d4326 Further fix for MDL-7229 ... should work now. 2006-11-06 17:55:32 +00:00
moodler
2f32eed1ea Merged fixes from stable for MDL-7229 (opentogoogle capabilities) 2006-10-26 14:55:45 +00:00
tjhunt
ad6e05238f MDL-6760 - cannot insert the string 'null' into the database. You can now. Merged from MOODLE_17_STABLE. 2006-10-17 15:58:09 +00:00
skodak
a44091bffe Fixing Theme Config Variables MDL-6784 2006-10-09 10:12:41 +00:00
moodler
df206ef87f Corrected accidental language-changing because of lang in POST 2006-09-24 12:07:44 +00:00
moodler
748390cd30 be a bit more forgiving of lang parameter 2006-09-23 13:14:25 +00:00
skodak
7eb0b60a1f debugging and error reporting level fixes and improvements MDL-6671 2006-09-23 09:38:39 +00:00
stronk7
8e6a09bd2b Updated comment... :-/ 2006-09-20 22:03:45 +00:00
stronk7
1b25502133 Forcing ADODB_FETCH_ASSOC explicity now for any DB. 2006-09-20 22:00:49 +00:00
moodler
ea82d6b638 CHanged a lot of CFG->debug stuff to use the new debuggin() function 2006-09-13 09:45:07 +00:00
skodak
6ec7ca0f07 fixed handling of selected language in installer; fixed selection of session language 2006-09-11 20:41:49 +00:00
skodak
aa893d6b76 fixed several bogus errors and warnings during installation and upgrades, forced logout when upgrading from 1.6 2006-09-10 21:10:48 +00:00
moodler
c4d0753b25 Moving deprecated functions to deprecatedlib.php from moodlelib.php and
some cleanups around the place.

Many of the functions in deprecatedlib.php have been rewritten to work with
the new roles and capabilities so that they can still work as well as possible.
2006-09-03 08:10:10 +00:00
skodak
35a518c5de fixed admin defaults, some warnings during install and added trmporary hack to make $CFG->notloggedinroleid work 2006-09-02 10:03:30 +00:00
skodak
647a256616 db sessions are now using the newer session handler adodb-session2.php 2006-08-29 22:45:54 +00:00
gustav_delius
e57d9d69f7 Small correction in the documentation for the $CFG global 2006-08-28 09:00:38 +00:00
skodak
a2b0c57b0a debug off level is now 5 instead of 7 to prevent E_WARNING on production sites SC#294; merged from MOODLE_16_STABLE 2006-08-22 22:25:30 +00:00
stronk7
73bb7f8db0 Setting some ADOdb variables properly and calling to the new
configure_dbconnection() function to set DB encoding and other
preliminar settings.
2006-08-20 18:22:48 +00:00
stronk7
7e13be0887 Splitting datalib.php in three libraries:
- ddllib.php: Where all the DDL (install/upgrade) functions will be.
  - dmllib.php: Where all the DML (select...) functions will be.
  - datalib.php: Legacy lib. Its contents should go to other libraries soon.
For more info see: http://docs.moodle.org/en/XMLDB_Roadmap (point 1)
2006-08-18 22:56:08 +00:00
skodak
284ac70210 $CFG->debug=0 from config.php is not overriden by setup.php anymore SC#293; merged from MOODLE_16_STABLE 2006-08-14 20:57:18 +00:00
toyomoyo
0c23b59c9b merfed fix for 6178 2006-08-01 05:12:13 +00:00
skodak
be933850a7 Bug #6176 - locale setting on config variables page not functioning correctly; merged from MOODLE_16_STABLE 2006-07-30 10:39:21 +00:00
skodak
9bbb40d631 healthcenter fixes - new extra whitespace detection, fixed automatic slasharguments detection; merged from MOODLE_16_STABLE 2006-07-05 07:44:20 +00:00
skodak
508b76d94f fixed warning from clone($SITE) during site setup; merged from MOODLE_16_STABLE 2006-05-29 20:33:12 +00:00
moodler
45fc1f759e Make $COURSE a full object for later use 2006-05-29 07:31:22 +00:00
stronk7
6ed15ea50a Now get_config() is executed after "set names", so textual data retrieved
from the config table has the proper encoding. Bug 5043.
(http://moodle.org/bugs/bug.php?op=show&bugid=5043)
2006-04-07 23:57:38 +00:00
stronk7
820743c5b1 Moving $CFG->ostype and $CFG->os setting, because
report_session_error() was being executed before setting
such variables and moodle_setlocale() need them.
(http://moodle.org/mod/forum/discuss.php?d=43466)
2006-04-07 22:58:07 +00:00
stronk7
391f527040 Hehe, setup itself was using register_globals hack! ;-)
Now the lang menu is working again.

Note: I've used the PARAM_SAFEDIR flag because it's the
only one supporting alpha+digits+underscore. Its name
doesn't seem to be perfect for this. Perhaps we should
create some alias?
2006-04-05 23:29:46 +00:00
moodler
cb342045ec The globals hack is history! 2006-04-05 02:44:33 +00:00
stronk7
475e9de86f SITE and SITEID were calculated *before* 'set names' so they weren't
fetched properly from DB. Moving such block of code from datalib.php
to setup.php to execute it *after* 'set names'. Credit goes to Skodak B-)
2006-03-29 23:38:46 +00:00
stronk7
7104d80dbc Now setup.php detects is CFG->unicode is not set and examines
DB to detect such value dinamically. Useful for installations
not using the standard installer but manually edited config.php
files.
Little TODO: modify a bit the initial config tables insets to
insert this value, avoiding to call it for each request. Coming
soon (although not mandatory for 1.6beta). Tested against both
MySQL and PostgreSQL with unicode and non-unicode DBs.
2006-03-27 11:24:14 +00:00
moodler
a33c4e5a84 Added support for Yahoo and MSN Search 2006-03-25 07:09:40 +00:00
stronk7
b8770bc0a5 Two new $CFG runtime variables created $CFG->ostype (WINDOWS, UNIX) and
$CFG->os (= PHP_OS) to handle it centrally. Also, although not critical,
it should be recommended to replace all the current uses of PHP_OS to the
new variables. See bug 4968.
(http://moodle.org/bugs/bug.php?op=show&bugid=4968)
2006-03-23 17:54:33 +00:00