# Some shared sub routines
#
# Author: Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2003-12-02
+# Last modified: 2004-02-24
#
use strict;
@EXPORT = qw(check_path
clean_path
devedit_reload
+ equal_url
file_name
upper_path);
return \$header;
}
+# equal_url()
+#
+# Create URL equal to a file or directory
+#
+# Params: 1. HTTP root
+# 2. Relative path
+#
+# Return: Formatted link (String)
+
+sub equal_url($$)
+{
+ my ($root,$path) = @_;
+ my $url;
+
+ $root =~ s!/$!!;
+ $path =~ s!^/!!;
+ $url = $root."/".$path;
+
+ return $url;
+}
+
# file_name()
#
-# Returns the last path of a path
+# Return the last path of a path
#
# Params: Path
#
# upper_path()
#
-# Cut the last part of a path away
+# Cut away the last part of a path
#
# Params: Path
#