mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
relative+cleaned paths
This commit is contained in:
parent
51b8bebb7a
commit
8f5b5e4f68
4 changed files with 18 additions and 18 deletions
|
@ -63,8 +63,8 @@ class delete_statement 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);
|
||||
$statementparam = required_param('statement', PARAM_CLEAN);
|
||||
|
||||
$confirmed = optional_param('confirmed', false, PARAM_BOOL);
|
||||
|
@ -76,11 +76,11 @@ class delete_statement extends XMLDBAction {
|
|||
$o.= ' <p align="center">' . $this->str['confirmdeletestatement'] . '<br /><br />' . $statementparam . '</p>';
|
||||
$o.= ' <table align="center" cellpadding="20"><tr><td>';
|
||||
$o.= ' <div class="singlebutton">';
|
||||
$o.= ' <form action="index.php?action=delete_statement&confirmed=yes&postaction=edit_xml_file&statement=' . $statementparam . '&dir=' . urlencode($dirpath) . '" method="post">';
|
||||
$o.= ' <form action="index.php?action=delete_statement&confirmed=yes&postaction=edit_xml_file&statement=' . $statementparam . '&dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
|
||||
$o.= ' <input type="submit" value="'. $this->str['yes'] .'" /></form></div>';
|
||||
$o.= ' </td><td>';
|
||||
$o.= ' <div class="singlebutton">';
|
||||
$o.= ' <form action="index.php?action=edit_xml_file&dir=' . urlencode($dirpath) . '" method="post">';
|
||||
$o.= ' <form action="index.php?action=edit_xml_file&dir=' . urlencode(str_replace($CFG->dirroot, '', $dirpath)) . '" method="post">';
|
||||
$o.= ' <input type="submit" value="'. $this->str['no'] .'" /></form></div>';
|
||||
$o.= ' </td></tr>';
|
||||
$o.= ' </table>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue