aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 39a8dbc880..998c52b7c6 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1046,6 +1046,38 @@ else
}
}
+/**
+* Eliminates useless . and .. components from specified path.
+*
+* Deprecated, use filesystem class instead
+*
+* @param string $path Path to clean
+* @return string Cleaned path
+*
+* @deprecated
+*/
+function phpbb_clean_path($path)
+{
+ global $phpbb_container;
+
+ if ($phpbb_container)
+ {
+ $phpbb_filesystem = new phpbb_filesystem();
+ }
+ else
+ {
+ // The container is not yet loaded, use a new instance
+ if (!class_exists('phpbb_filesystem'))
+ {
+ global $phpbb_root_path, $phpEx;
+ require($phpbb_root_path . 'includes/filesystem.' . $phpEx);
+ }
+ $phpbb_filesystem = new phpbb_filesystem();
+ }
+
+ return $phpbb_filesystem->clean_path($path);
+}
+
// functions used for building option fields
/**