|
@@ 96-102 (lines=7) @@
|
| 93 |
|
* This function is connected to the rename signal of OC_Filesystem and adjust the name and location |
| 94 |
|
* of the stored versions along the actual file |
| 95 |
|
*/ |
| 96 |
|
public static function rename_hook($params) { |
| 97 |
|
$oldpath = $params['oldpath']; |
| 98 |
|
$newpath = $params['newpath']; |
| 99 |
|
if($oldpath !== '' && $newpath !== '') { |
| 100 |
|
Storage::renameOrCopy($oldpath, $newpath, 'rename'); |
| 101 |
|
} |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
/** |
| 105 |
|
* copy versions of copied files |
|
@@ 111-117 (lines=7) @@
|
| 108 |
|
* This function is connected to the copy signal of OC_Filesystem and copies the |
| 109 |
|
* the stored versions to the new location |
| 110 |
|
*/ |
| 111 |
|
public static function copy_hook($params) { |
| 112 |
|
$oldpath = $params['oldpath']; |
| 113 |
|
$newpath = $params['newpath']; |
| 114 |
|
if($oldpath !== '' && $newpath !== '') { |
| 115 |
|
Storage::renameOrCopy($oldpath, $newpath, 'copy'); |
| 116 |
|
} |
| 117 |
|
} |
| 118 |
|
|
| 119 |
|
/** |
| 120 |
|
* Remember owner and the owner path of the source file. |