Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
ec2e193a
Commit
ec2e193a
authored
11 years ago
by
Florin Peter
Browse files
Options
Downloads
Patches
Plain Diff
removed unused code
parent
5fcb5f3a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/files_encryption/hooks/hooks.php
+0
-38
0 additions, 38 deletions
apps/files_encryption/hooks/hooks.php
apps/files_encryption/lib/helper.php
+1
-2
1 addition, 2 deletions
apps/files_encryption/lib/helper.php
with
1 addition
and
40 deletions
apps/files_encryption/hooks/hooks.php
+
0
−
38
View file @
ec2e193a
...
...
@@ -169,33 +169,6 @@ class Hooks {
}
}
/**
* @brief update the encryption key of the file uploaded by the client
*/
public
static
function
updateKeyfile
(
$params
)
{
if
(
Crypt
::
mode
()
==
'client'
)
{
if
(
isset
(
$params
[
'properties'
][
'key'
]
)
)
{
$view
=
new
\OC_FilesystemView
(
'/'
);
$userId
=
\OCP\User
::
getUser
();
Keymanager
::
setFileKey
(
$view
,
$params
[
'path'
],
$userId
,
$params
[
'properties'
][
'key'
]
);
}
else
{
\OC_Log
::
write
(
'Encryption library'
,
"Client side encryption is enabled but the client doesn't provide a encryption key for the file!"
,
\OC_Log
::
ERROR
);
}
}
}
/*
* @brief check if files can be encrypted to every user.
...
...
@@ -426,17 +399,6 @@ class Hooks {
}
/**
* @brief
*/
public
static
function
postUnshareAll
(
$params
)
{
// NOTE: It appears that this is never called for files, so
// we may not need to implement it
}
/**
* @brief after a file is renamed, rename its keyfile and share-keys also fix the file size and fix also the sharing
* @param array with oldpath and newpath
*
...
...
This diff is collapsed.
Click to expand it.
apps/files_encryption/lib/helper.php
+
1
−
2
View file @
ec2e193a
...
...
@@ -37,7 +37,6 @@ class Helper {
\OCP\Util
::
connectHook
(
'OCP\Share'
,
'pre_shared'
,
'OCA\Encryption\Hooks'
,
'preShared'
);
\OCP\Util
::
connectHook
(
'OCP\Share'
,
'post_shared'
,
'OCA\Encryption\Hooks'
,
'postShared'
);
\OCP\Util
::
connectHook
(
'OCP\Share'
,
'post_unshare'
,
'OCA\Encryption\Hooks'
,
'postUnshare'
);
\OCP\Util
::
connectHook
(
'OCP\Share'
,
'post_unshareAll'
,
'OCA\Encryption\Hooks'
,
'postUnshareAll'
);
}
/**
...
...
@@ -58,7 +57,7 @@ class Helper {
*/
public
static
function
registerWebdavHooks
()
{
\OCP\Util
::
connectHook
(
'OC_Webdav_Properties'
,
'update'
,
'OCA\Encryption\Hooks'
,
'updateKeyfileFromClient'
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment