aboutsummaryrefslogtreecommitdiffstats
path: root/php/database.php
diff options
context:
space:
mode:
authorAlex Vitkov <alexvitkov98@gmail.com>2021-02-13 22:48:11 +0200
committerAlex Vitkov <alexvitkov98@gmail.com>2021-02-13 22:48:11 +0200
commit3005c7774d4f32dc857a9b10c4e621f4df2019c4 (patch)
treea7d31726227efa29c502c5d8be6a301c3ca76707 /php/database.php
parentf728595bed304189b27e36b91abf8b5f968436e7 (diff)
downloadfileup-3005c7774d4f32dc857a9b10c4e621f4df2019c4.tar.gz
typo
Diffstat (limited to 'php/database.php')
-rw-r--r--php/database.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/php/database.php b/php/database.php
index 69b4b34..6762a5f 100644
--- a/php/database.php
+++ b/php/database.php
@@ -182,7 +182,7 @@ require_once "node.php";
}
- function get_premissions(int $node_id,int $user_id)
+ function get_permissions(int $node_id,int $user_id)
{
$prep=$this->pdo->prepare("
@@ -194,7 +194,7 @@ require_once "node.php";
$prep->bindParam(':user',$user_id);
if($prep->execute()==false)
{
- error_log("there is an error with the sql statemtent at get_premissions");
+ error_log("there is an error with the sql statemtent at get_permissions");
return NULL;
}
$ret=$prep->fetch(PDO::FETCH_ASSOC);
@@ -207,7 +207,7 @@ require_once "node.php";
$prep->bindParam(':user',$user_id);
if($prep->execute()==false)
{
- error_log("couldnt create access entry in get_premissions2");
+ error_log("couldnt create access entry in get_permissions2");
return NULL;
}
@@ -222,7 +222,7 @@ require_once "node.php";
$prep->bindParam(':user',$user_id);
if($prep->execute()==false)
{
- error_log("there is an error with the sql statemtent at get_premissions3");
+ error_log("there is an error with the sql statemtent at get_permissions3");
return NULL;
}
$ret=$prep->fetch(PDO::FETCH_ASSOC);
@@ -232,9 +232,9 @@ require_once "node.php";
function give_view_access(int $node_id,int $user_id)
{
- $premissions=$this->get_premissions($node_id,$user_id);
- /*this isn't futile because we create access entries in get_premission if there are none*/
- if($premissions["can_view"]==false)
+ $permissions=$this->get_permissions($node_id,$user_id);
+ /*this isn't futile because we create access entries in get_permission if there are none*/
+ if($permissions["can_view"]==false)
{
$prep=$this->pdo->prepare("update node_access
set can_view=true
@@ -252,9 +252,9 @@ require_once "node.php";
function give_edit_access(int $node_id,int $user_id)
{
- $premissions=$this->get_premissions($node_id,$user_id);
- /*this isn't futile because we create access entries in get_premission if there are none*/
- if($premissions["can_edit"]==false)
+ $permissions=$this->get_permissions($node_id,$user_id);
+ /*this isn't futile because we create access entries in get_permission if there are none*/
+ if($permissions["can_edit"]==false)
{
$prep=$this->pdo->prepare("update node_access
set can_edit=true
@@ -351,7 +351,7 @@ require_once "node.php";
error_log("tried to create a dangling directory but sql statement failed. Fatal error!");
exit(1);
}
- /*give premissions*/
+ /*give permissions*/
$id=$this->get_node_with_code($code_name);
if($id==NULL)
@@ -559,7 +559,7 @@ require_once "node.php";
$new_id=$this->get_node_with_code($code);
/*link the node to the directory*/
$this->link_nodes($dir_id,$new_id,$filename,$note);
- /*give premissions to the creator*/
+ /*give permissions to the creator*/
$this->give_view_access($new_id,$user->user_id);
$this->give_edit_access($new_id,$user->user_id);