From fc3221015d321f0c6140dbb21dd78b2f18847b58 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 29 Aug 2006 23:45:08 +0000 Subject: [PATCH] relative+cleaned paths --- .../actions/delete_index/delete_index.class.php | 12 ++++++------ admin/xmldb/actions/delete_key/delete_key.class.php | 12 ++++++------ admin/xmldb/actions/edit_index/edit_index.class.php | 12 ++++++------ admin/xmldb/actions/edit_key/edit_key.class.php | 12 ++++++------ .../move_updown_index/move_updown_index.class.php | 4 ++-- .../move_updown_key/move_updown_key.class.php | 4 ++-- admin/xmldb/actions/new_index/new_index.class.php | 4 ++-- admin/xmldb/actions/new_key/new_key.class.php | 4 ++-- .../actions/view_index_xml/view_index_xml.class.php | 8 ++++---- .../actions/view_key_xml/view_key_xml.class.php | 8 ++++---- 10 files changed, 40 insertions(+), 40 deletions(-) diff --git a/admin/xmldb/actions/delete_index/delete_index.class.php b/admin/xmldb/actions/delete_index/delete_index.class.php index aab33f8aff..772f0fa971 100644 --- a/admin/xmldb/actions/delete_index/delete_index.class.php +++ b/admin/xmldb/actions/delete_index/delete_index.class.php @@ -63,10 +63,10 @@ class delete_index 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); - $tableparam = required_param('table', PARAM_CLEAN); - $indexparam = required_param('index', PARAM_CLEAN); + $dirpath = required_param('dir', PARAM_PATH); + $dirpath = $CFG->dirroot . stripslashes_safe($dirpath); + $tableparam = required_param('table', PARAM_PATH); + $indexparam = required_param('index', PARAM_PATH); $confirmed = optional_param('confirmed', false, PARAM_BOOL); @@ -77,11 +77,11 @@ class delete_index extends XMLDBAction { $o.= '

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

' . $indexparam . '

'; $o.= ' '; $o.= '
'; $o.= '
'; - $o.= '
'; + $o.= ' '; $o.= '
'; $o.= '
'; $o.= '
'; - $o.= '
'; + $o.= ' '; $o.= '
'; $o.= '
'; diff --git a/admin/xmldb/actions/delete_key/delete_key.class.php b/admin/xmldb/actions/delete_key/delete_key.class.php index 462a3c6ab5..142978d6b6 100644 --- a/admin/xmldb/actions/delete_key/delete_key.class.php +++ b/admin/xmldb/actions/delete_key/delete_key.class.php @@ -63,10 +63,10 @@ class delete_key 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); - $tableparam = required_param('table', PARAM_CLEAN); - $keyparam = required_param('key', PARAM_CLEAN); + $dirpath = required_param('dir', PARAM_PATH); + $dirpath = $CFG->dirroot . stripslashes_safe($dirpath); + $tableparam = required_param('table', PARAM_PATH); + $keyparam = required_param('key', PARAM_PATH); $confirmed = optional_param('confirmed', false, PARAM_BOOL); @@ -77,11 +77,11 @@ class delete_key extends XMLDBAction { $o.= '

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

' . $keyparam . '

'; $o.= ' '; $o.= '
'; $o.= '
'; - $o.= '
'; + $o.= ' '; $o.= '
'; $o.= '
'; $o.= '
'; - $o.= '
'; + $o.= ' '; $o.= '
'; $o.= '
'; diff --git a/admin/xmldb/actions/edit_index/edit_index.class.php b/admin/xmldb/actions/edit_index/edit_index.class.php index 61a44f1803..f73dd88426 100644 --- a/admin/xmldb/actions/edit_index/edit_index.class.php +++ b/admin/xmldb/actions/edit_index/edit_index.class.php @@ -65,8 +65,8 @@ class edit_index 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)) { @@ -99,7 +99,7 @@ class edit_index extends XMLDBAction { /// Add the main form $o = '
'; - $o.= ' '; + $o.= ' '; $o.= ' '; $o.= ' '; $o.= ' '; @@ -130,18 +130,18 @@ class edit_index extends XMLDBAction { $b = '

'; /// The view original XML button if ($table->getIndex($indexparam)) { - $b .= ' [' . $this->str['vieworiginal'] . ']'; + $b .= ' [' . $this->str['vieworiginal'] . ']'; } else { $b .= ' [' . $this->str['vieworiginal'] . ']'; } /// The view edited XML button if ($index->hasChanged()) { - $b .= ' [' . $this->str['viewedited'] . ']'; + $b .= ' [' . $this->str['viewedited'] . ']'; } else { $b .= ' [' . $this->str['viewedited'] . ']'; } /// The back to edit table button - $b .= ' [' . $this->str['back'] . ']'; + $b .= ' [' . $this->str['back'] . ']'; $b .= '

'; $o .= $b; diff --git a/admin/xmldb/actions/edit_key/edit_key.class.php b/admin/xmldb/actions/edit_key/edit_key.class.php index 4971be6537..5e2df276ac 100644 --- a/admin/xmldb/actions/edit_key/edit_key.class.php +++ b/admin/xmldb/actions/edit_key/edit_key.class.php @@ -65,8 +65,8 @@ class edit_key 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)) { @@ -99,7 +99,7 @@ class edit_key extends XMLDBAction { /// Add the main form $o = ''; - $o.= ' '; + $o.= ' '; $o.= ' '; $o.= ' '; $o.= ' '; @@ -142,18 +142,18 @@ class edit_key extends XMLDBAction { $b = '

'; /// The view original XML button if ($table->getKey($keyparam)) { - $b .= ' [' . $this->str['vieworiginal'] . ']'; + $b .= ' [' . $this->str['vieworiginal'] . ']'; } else { $b .= ' [' . $this->str['vieworiginal'] . ']'; } /// The view edited XML button if ($key->hasChanged()) { - $b .= ' [' . $this->str['viewedited'] . ']'; + $b .= ' [' . $this->str['viewedited'] . ']'; } else { $b .= ' [' . $this->str['viewedited'] . ']'; } /// The back to edit table button - $b .= ' [' . $this->str['back'] . ']'; + $b .= ' [' . $this->str['back'] . ']'; $b .= '

'; $o .= $b; diff --git a/admin/xmldb/actions/move_updown_index/move_updown_index.class.php b/admin/xmldb/actions/move_updown_index/move_updown_index.class.php index 01d46d1931..b1174ff45a 100644 --- a/admin/xmldb/actions/move_updown_index/move_updown_index.class.php +++ b/admin/xmldb/actions/move_updown_index/move_updown_index.class.php @@ -61,8 +61,8 @@ class move_updown_index 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/move_updown_key/move_updown_key.class.php b/admin/xmldb/actions/move_updown_key/move_updown_key.class.php index 5a0b0c2c2f..5477387f99 100644 --- a/admin/xmldb/actions/move_updown_key/move_updown_key.class.php +++ b/admin/xmldb/actions/move_updown_key/move_updown_key.class.php @@ -61,8 +61,8 @@ class move_updown_key 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/new_index/new_index.class.php b/admin/xmldb/actions/new_index/new_index.class.php index 7c029cbfa2..8417bda4d4 100644 --- a/admin/xmldb/actions/new_index/new_index.class.php +++ b/admin/xmldb/actions/new_index/new_index.class.php @@ -61,8 +61,8 @@ class new_index 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/new_key/new_key.class.php b/admin/xmldb/actions/new_key/new_key.class.php index 8e452b9fa7..ddf0495d96 100644 --- a/admin/xmldb/actions/new_key/new_key.class.php +++ b/admin/xmldb/actions/new_key/new_key.class.php @@ -61,8 +61,8 @@ class new_key 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_index_xml/view_index_xml.class.php b/admin/xmldb/actions/view_index_xml/view_index_xml.class.php index 14e43eb68c..d8c5697774 100644 --- a/admin/xmldb/actions/view_index_xml/view_index_xml.class.php +++ b/admin/xmldb/actions/view_index_xml/view_index_xml.class.php @@ -61,12 +61,12 @@ class view_index_xml extends XMLDBAction { /// Do the job, setting result as needed /// Get the file parameter - $index = required_param('index', PARAM_CLEAN); - $table = required_param('table', PARAM_CLEAN); + $index = required_param('index', PARAM_PATH); + $table = required_param('table', PARAM_PATH); $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') { diff --git a/admin/xmldb/actions/view_key_xml/view_key_xml.class.php b/admin/xmldb/actions/view_key_xml/view_key_xml.class.php index 9e76a754fc..86c3ace7f5 100644 --- a/admin/xmldb/actions/view_key_xml/view_key_xml.class.php +++ b/admin/xmldb/actions/view_key_xml/view_key_xml.class.php @@ -61,12 +61,12 @@ class view_key_xml extends XMLDBAction { /// Do the job, setting result as needed /// Get the file parameter - $key = required_param('key', PARAM_CLEAN); - $table = required_param('table', PARAM_CLEAN); + $key = required_param('key', PARAM_PATH); + $table = required_param('table', PARAM_PATH); $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