mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Solving double addslashes to DB when the site is running with
magic_quotes_gpc() disabled (because Moodle addslashes to everything). Not a pretty hack, but it seems to work. (http://moodle.org/mod/forum/discuss.php?d=38127) Merged from MOODLE_15_STABLE
This commit is contained in:
parent
00a354a2da
commit
13ca56cf52
2 changed files with 14 additions and 9 deletions
|
@ -111,10 +111,12 @@
|
|||
|
||||
define("EWIKI_INIT_PAGES", wiki_content_dir($wiki));
|
||||
|
||||
/// # fix broken PHP setup
|
||||
if (!function_exists("get_magic_quotes_gpc") || get_magic_quotes_gpc()) {
|
||||
include($CFG->dirroot."/mod/wiki/ewiki/fragments/strip_wonderful_slashes.php");
|
||||
}
|
||||
/// # Moodle always addslashes to everything so we are going to strip them always
|
||||
/// # to allow wiki itself to add them again. It's a triple add-strip-add but
|
||||
/// # was the only way to solve the problem without modifying how the rest of
|
||||
/// # the module works.
|
||||
include($CFG->dirroot."/mod/wiki/ewiki/fragments/strip_wonderful_slashes.php");
|
||||
|
||||
if (ini_get("register_globals")) {
|
||||
# include($CFG->dirroot."/mod/wiki/ewiki/fragments/strike_register_globals.php");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue