summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rwxr-xr-xwww/functions/func_interface.php5
-rwxr-xr-xwww/functions/func_rewrite.php8
2 files changed, 11 insertions, 2 deletions
diff --git a/www/functions/func_interface.php b/www/functions/func_interface.php
index 0964470..2a8ef34 100755
--- a/www/functions/func_interface.php
+++ b/www/functions/func_interface.php
@@ -16,5 +16,8 @@ function collect_content($db){
}
return $content;
- //var_dump($content);
+}
+
+function print_browser($content){
+ var_dump($content);
}
diff --git a/www/functions/func_rewrite.php b/www/functions/func_rewrite.php
index 1d30982..8e8e45f 100755
--- a/www/functions/func_rewrite.php
+++ b/www/functions/func_rewrite.php
@@ -9,8 +9,14 @@ function rewrite($db){
/* if first argument wasn't valid, rewrite the URL to include the username */
+ $folder = $_GET["folder"];
+
+ if(preg_match("/\/$/", $_GET["folder"])){
+ $folder = substr($_GET["folder"], 0, -1);
+ }
+
if($_SESSION["login"]){
- header("Refresh: 0; /" . $_SESSION['username'] . "/" . $_GET["name"] . "/" . $_GET["folder"] . "");
+ header("Refresh: 0; /" . $_SESSION['username'] . "/" . $_GET["name"] . "/" . $folder . "");
return false;
} else {