summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xwww/functions/func_interface.php5
-rwxr-xr-xwww/functions/func_register.php2
-rwxr-xr-xwww/functions/func_rewrite.php2
-rwxr-xr-xwww/index.php3
4 files changed, 6 insertions, 6 deletions
diff --git a/www/functions/func_interface.php b/www/functions/func_interface.php
index 266a24f..0964470 100755
--- a/www/functions/func_interface.php
+++ b/www/functions/func_interface.php
@@ -1,6 +1,6 @@
<?php
-function show($db){
+function collect_content($db){
$owner = user($db, $_GET["name"]);
if(!$owner){
@@ -15,5 +15,6 @@ function show($db){
failure("This folder is empty.");
}
- var_dump($content);
+ return $content;
+ //var_dump($content);
}
diff --git a/www/functions/func_register.php b/www/functions/func_register.php
index bb2a02c..026ac3b 100755
--- a/www/functions/func_register.php
+++ b/www/functions/func_register.php
@@ -61,7 +61,7 @@ function register($db){
BEGIN TRANSACTION;
UPDATE user SET name='" . $safe_name . "', password='" . $hash_password . "', invites=5, status=1, register=(SELECT datetime()) WHERE id=" . $id . ";
INSERT INTO files (id, parent, owner, name, folder, mime, size, share, size, hash) VALUES (NULL, 0, $id, '/', 'DIRECTORY', NULL, NULL, 'PUBLIC', 0, '');
- INSERT INTO log (id, user, login) VALUES (NULL, (SELECT id FROM user WHERE name='" . $safe_name."'), (SELECT datetime()));
+ INSERT INTO log (id, user, login) VALUES (NULL, (SELECT id FROM user WHERE name='" . $safe_name. "'), (SELECT datetime()));
COMMIT;")
){
diff --git a/www/functions/func_rewrite.php b/www/functions/func_rewrite.php
index 5e4284d..1d30982 100755
--- a/www/functions/func_rewrite.php
+++ b/www/functions/func_rewrite.php
@@ -20,10 +20,8 @@ function rewrite($db){
get_404($working_path, $wrong_folder);
return false;
}
- return false;
} else {
return true;
}
-
}
diff --git a/www/index.php b/www/index.php
index c0e6100..7dfb193 100755
--- a/www/index.php
+++ b/www/index.php
@@ -93,7 +93,8 @@ if(empty($_GET)){
/* shows the user content, main function */
if(rewrite($db)){
- show($db);
+ $content = collect_content($db);
+ print_browser($content);
}
}
}