aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-04-17 17:45:49 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-04-17 17:46:58 +0200
commit869e00a23b0400b9ad81c1130227cc4c29d6a38d (patch)
tree997d3015d0479c0d2186bb6c873e1a2ddd9f0957 /phpBB/includes/functions.php
parent1fd5be859e3fe85e67fe7f5632e4630b96ca3634 (diff)
downloadforums-869e00a23b0400b9ad81c1130227cc4c29d6a38d.tar
forums-869e00a23b0400b9ad81c1130227cc4c29d6a38d.tar.gz
forums-869e00a23b0400b9ad81c1130227cc4c29d6a38d.tar.bz2
forums-869e00a23b0400b9ad81c1130227cc4c29d6a38d.tar.xz
forums-869e00a23b0400b9ad81c1130227cc4c29d6a38d.zip
[ticket/11362] Move phpbb_clean_path into a simple filesystem service
PHPBB3-11362
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php30
1 files changed, 0 insertions, 30 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 98a2c0db79..39a8dbc880 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1046,36 +1046,6 @@ else
}
}
-/**
-* Eliminates useless . and .. components from specified path.
-*
-* @param string $path Path to clean
-* @return string Cleaned path
-*/
-function phpbb_clean_path($path)
-{
- $exploded = explode('/', $path);
- $filtered = array();
- foreach ($exploded as $part)
- {
- if ($part === '.' && !empty($filtered))
- {
- continue;
- }
-
- if ($part === '..' && !empty($filtered) && $filtered[sizeof($filtered) - 1] !== '..')
- {
- array_pop($filtered);
- }
- else
- {
- $filtered[] = $part;
- }
- }
- $path = implode('/', $filtered);
- return $path;
-}
-
// functions used for building option fields
/**