From 9914f09319991a1a20daef892f6df7687d807bf5 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Wed, 31 May 2006 17:54:58 +0000 Subject: [PATCH] Prevent doubleslashes once and again in paths. Also prevent them when writing config.php Merged from MOODLE_16_STABLE --- install.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install.php b/install.php index 8be0933285..67dbab7131 100644 --- a/install.php +++ b/install.php @@ -478,10 +478,10 @@ if ($nextstage == SAVE) { $str .= '$CFG->prefix = \''.$INSTALL['prefix']."';\r\n"; $str .= "\r\n"; - $str .= '$CFG->wwwroot = \''.$INSTALL['wwwrootform']."';\r\n"; - $str .= '$CFG->dirroot = \''.$INSTALL['dirrootform']."';\r\n"; - $str .= '$CFG->dataroot = \''.$INSTALL['dataroot']."';\r\n"; - $str .= '$CFG->admin = \''.$INSTALL['admindirname']."';\r\n"; + $str .= '$CFG->wwwroot = \''.s($INSTALL['wwwrootform'],true)."';\r\n"; + $str .= '$CFG->dirroot = \''.s($INSTALL['dirrootform'],true)."';\r\n"; + $str .= '$CFG->dataroot = \''.s($INSTALL['dataroot'],true)."';\r\n"; + $str .= '$CFG->admin = \''.s($INSTALL['admindirname'],true)."';\r\n"; $str .= "\r\n"; $str .= '$CFG->directorypermissions = 00777; // try 02777 on a server in Safe Mode'."\r\n"; @@ -701,19 +701,19 @@ function form_table($nextstage = WELCOME, $formaction = "install.php") {

- +

- +

- + -- 2.39.5