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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
2e2cf28d
Commit
2e2cf28d
authored
12 years ago
by
Bernhard Posselt
Browse files
Options
Downloads
Plain Diff
Merge pull request #2005 from owncloud/trash_add_signals
add post_moveToTrash and post_restore signals to the trash bin
parents
87c8fff2
df2a9a3c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files_trashbin/lib/trash.php
+6
-0
6 additions, 0 deletions
apps/files_trashbin/lib/trash.php
with
6 additions
and
0 deletions
apps/files_trashbin/lib/trash.php
+
6
−
0
View file @
2e2cf28d
...
...
@@ -71,6 +71,9 @@ class Trashbin {
\OC_Log
::
write
(
'files_trashbin'
,
'trash bin database couldn\'t be updated'
,
\OC_log
::
ERROR
);
return
;
}
\OCP\Util
::
emitHook
(
'\OCA\Files_Trashbin\Trashbin'
,
'post_moveToTrash'
,
array
(
'filePath'
=>
\OC\Files\Filesystem
::
normalizePath
(
$file_path
),
'trashPath'
=>
\OC\Files\Filesystem
::
normalizePath
(
$deleted
.
'.d'
.
$timestamp
)));
// Take care of file versions
if
(
\OCP\App
::
isEnabled
(
'files_versions'
)
)
{
...
...
@@ -173,6 +176,9 @@ class Trashbin {
$mtime
=
$view
->
filemtime
(
$source
);
if
(
$view
->
rename
(
$source
,
$target
.
$ext
)
)
{
$view
->
touch
(
$target
.
$ext
,
$mtime
);
\OCP\Util
::
emitHook
(
'\OCA\Files_Trashbin\Trashbin'
,
'post_restore'
,
array
(
'filePath'
=>
\OC\Files\Filesystem
::
normalizePath
(
'/'
.
$location
.
'/'
.
$filename
.
$ext
),
'trashPath'
=>
\OC\Files\Filesystem
::
normalizePath
(
$file
)));
if
(
$view
->
is_dir
(
$target
.
$ext
))
{
$trashbinSize
-=
self
::
calculateSize
(
new
\OC\Files\View
(
'/'
.
$user
.
'/'
.
$target
.
$ext
));
}
else
{
...
...
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