From: stronk7 Date: Tue, 29 Aug 2006 21:26:46 +0000 (+0000) Subject: relative+cleaned paths X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fd6a294ff6928a83c29945ee064d7c0c6d843400;p=moodle.git relative+cleaned paths --- diff --git a/admin/xmldb/actions/revert_changes/revert_changes.class.php b/admin/xmldb/actions/revert_changes/revert_changes.class.php index 246ac0089a..0a063a502f 100644 --- a/admin/xmldb/actions/revert_changes/revert_changes.class.php +++ b/admin/xmldb/actions/revert_changes/revert_changes.class.php @@ -63,8 +63,8 @@ class revert_changes extends XMLDBAction { /// Do the job, setting result as needed /// Get the dir containing the file - $dirpath = required_param('dir', PARAM_CLEAN); - $dirpath = stripslashes_safe($dirpath); + $dirpath = required_param('dir', PARAM_PATH); + $dirpath = $CFG->dirroot . stripslashes_safe($dirpath); $confirmed = optional_param('confirmed', false, PARAM_BOOL); @@ -75,7 +75,7 @@ class revert_changes extends XMLDBAction { $o.= '

' . $this->str['confirmrevertchanges'] . '

' . $dirpath . '

'; $o.= '
'; $o.= '
'; - $o.= '
'; + $o.= ' '; $o.= '
'; $o.= '
'; $o.= '
'; diff --git a/admin/xmldb/actions/save_xml_file/save_xml_file.class.php b/admin/xmldb/actions/save_xml_file/save_xml_file.class.php index 7e365d0ae8..aed9b92f4e 100644 --- a/admin/xmldb/actions/save_xml_file/save_xml_file.class.php +++ b/admin/xmldb/actions/save_xml_file/save_xml_file.class.php @@ -61,8 +61,8 @@ class save_xml_file extends XMLDBAction { /// Do the job, setting result as needed /// Get the dir containing the file - $dirpath = required_param('dir', PARAM_CLEAN); - $dirpath = stripslashes_safe($dirpath); + $dirpath = required_param('dir', PARAM_PATH); + $dirpath = $CFG->dirroot . stripslashes_safe($dirpath); /// Get the edited dir if (!empty($XMLDB->editeddirs)) {