aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Vitkov <alexvitkov98@gmail.com>2021-02-12 14:07:48 +0200
committerAlex Vitkov <alexvitkov98@gmail.com>2021-02-12 14:07:48 +0200
commit10d7e23ca54ca0003e548922d1202f39c841a0db (patch)
tree1b51e10c4f919034c7ec32395770e5c6a6ce3931
parent1c5476e68cc0d43b534521ea3e647bbe0d7e86df (diff)
parent76970dca67894917bdbc4213f4c5df60d0c8dec3 (diff)
downloadfileup-10d7e23ca54ca0003e548922d1202f39c841a0db.tar.gz
Merge branch 'master' of https://github.com/alexvitkov/india
-rw-r--r--php/configuration.php4
-rw-r--r--php/node.php3
-rw-r--r--php/readdir.php0
-rw-r--r--sql/fileshare.sql4
4 files changed, 6 insertions, 5 deletions
diff --git a/php/configuration.php b/php/configuration.php
index 1ee0a99..313f0ad 100644
--- a/php/configuration.php
+++ b/php/configuration.php
@@ -17,8 +17,8 @@ $database_name="fileup_testing";
$database_username="outsider";
$database_password="parola123";
$database_location="localhost";
-
- $storage_root = "/srv/apache/testing/project/files/";
+/*storage root must be in the webroot*/
+$storage_root = "/srv/apache/testing/project/files/";
}
diff --git a/php/node.php b/php/node.php
index 3c18519..062da90 100644
--- a/php/node.php
+++ b/php/node.php
@@ -14,7 +14,8 @@ require_once "database.php";
$this->node_id=$node_id;
}
}
- class Current_Directory
+
+ class Current_Directory extends Node
{
/*an array of the dir_ids taken to reach here*/
public $path;
diff --git a/php/readdir.php b/php/readdir.php
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/php/readdir.php
diff --git a/sql/fileshare.sql b/sql/fileshare.sql
index 0742538..e3d9520 100644
--- a/sql/fileshare.sql
+++ b/sql/fileshare.sql
@@ -12,7 +12,6 @@ create table nodes (
is_directory boolean default false,
relative_path varchar(500) not null,
type varchar(20) not null default 'data',
- name varchar(100) not null default 'no name',
note varchar(200) not null default "",
code varchar(100) not null default "error",
primary key (node_id)
@@ -39,10 +38,11 @@ create table node_access (
foreign key (node_id) references nodes(node_id),
foreign key (user_id) references users(user_id)
);
-
+/*we can name a node in many different ways */
create table node_links (
directory_id int not null,
node_id int not null,
+ name varchar(100) not null default 'no name',
check (directory_id != node_id),
foreign key (directory_id) references nodes(node_id),
foreign key (node_id) references nodes(node_id)