From 8f5b5e4f685e9d11f1d67ad214b5ece50add2172 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 29 Aug 2006 23:20:03 +0000 Subject: [PATCH] relative+cleaned paths --- .../delete_statement.class.php | 8 ++++---- .../edit_statement/edit_statement.class.php | 20 +++++++++---------- .../move_updown_statement.class.php | 4 ++-- .../view_statement_xml.class.php | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/admin/xmldb/actions/delete_statement/delete_statement.class.php b/admin/xmldb/actions/delete_statement/delete_statement.class.php index 51d54c1964..f5232d917e 100644 --- a/admin/xmldb/actions/delete_statement/delete_statement.class.php +++ b/admin/xmldb/actions/delete_statement/delete_statement.class.php @@ -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.= '

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

' . $statementparam . '

'; $o.= ' '; $o.= '
'; $o.= '
'; - $o.= '
'; + $o.= ' '; $o.= '
'; $o.= '
'; $o.= '
'; - $o.= '
'; + $o.= ' '; $o.= '
'; $o.= '
'; diff --git a/admin/xmldb/actions/edit_statement/edit_statement.class.php b/admin/xmldb/actions/edit_statement/edit_statement.class.php index 03a601a860..c47d59e4fc 100644 --- a/admin/xmldb/actions/edit_statement/edit_statement.class.php +++ b/admin/xmldb/actions/edit_statement/edit_statement.class.php @@ -68,8 +68,8 @@ class edit_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); /// Get the correct dirs if (!empty($XMLDB->dbdirs)) { @@ -103,7 +103,7 @@ class edit_statement extends XMLDBAction { /// Add the main form $o = '
'; - $o.= ' '; + $o.= ' '; $o.= ' '; $o.= ' '; $o.= ' '; @@ -117,20 +117,20 @@ class edit_statement extends XMLDBAction { $b = '

'; /// The view original XML button if ($origstructure->getStatement($statementparam)) { - $b .= ' [' . $this->str['vieworiginal'] . ']'; + $b .= ' [' . $this->str['vieworiginal'] . ']'; } else { $b .= ' [' . $this->str['vieworiginal'] . ']'; } /// The view edited XML button if ($statement->hasChanged()) { - $b .= ' [' . $this->str['viewedited'] . ']'; + $b .= ' [' . $this->str['viewedited'] . ']'; } else { $b .= ' [' . $this->str['viewedited'] . ']'; } /// The new sentence button - $b .= ' [' . $this->str['newsentence'] . ']'; + $b .= ' [' . $this->str['newsentence'] . ']'; /// The back to edit xml file button - $b .= ' [' . $this->str['back'] . ']'; + $b .= ' [' . $this->str['back'] . ']'; $b .= '

'; $o .= $b; @@ -153,13 +153,13 @@ class edit_statement extends XMLDBAction { /// Calculate buttons $b = ''; /// The edit button - $b .= '[' . $this->str['edit'] . ']'; + $b .= '[' . $this->str['edit'] . ']'; $b .= ''; /// The duplicate button - $b .= '[' . $this->str['duplicate'] . ']'; + $b .= '[' . $this->str['duplicate'] . ']'; $b .= ''; /// The delete button - $b .= '[' . $this->str['delete'] . ']'; + $b .= '[' . $this->str['delete'] . ']'; $b .= ''; /// Print table row $o .= '' . $p . $sentence . $b . ''; diff --git a/admin/xmldb/actions/move_updown_statement/move_updown_statement.class.php b/admin/xmldb/actions/move_updown_statement/move_updown_statement.class.php index 9b9cdf9cb5..15116bfa18 100644 --- a/admin/xmldb/actions/move_updown_statement/move_updown_statement.class.php +++ b/admin/xmldb/actions/move_updown_statement/move_updown_statement.class.php @@ -61,8 +61,8 @@ class move_updown_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); /// Get the correct dirs if (!empty($XMLDB->dbdirs)) { diff --git a/admin/xmldb/actions/view_statement_xml/view_statement_xml.class.php b/admin/xmldb/actions/view_statement_xml/view_statement_xml.class.php index 6a50faeddf..6332b221c1 100644 --- a/admin/xmldb/actions/view_statement_xml/view_statement_xml.class.php +++ b/admin/xmldb/actions/view_statement_xml/view_statement_xml.class.php @@ -64,8 +64,8 @@ class view_statement_xml extends XMLDBAction { $statement = required_param('statement', PARAM_CLEAN); $select = required_param('select', PARAM_ALPHA); //original/edited /// 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 correct dir if ($select == 'original') { -- 2.39.5