This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: chunked upload and event logging
- Loading branch information
Theodor Truffer
committed
Feb 10, 2021
1 parent
fa7c29a
commit 6e331cc
Showing
104 changed files
with
210 additions
and
7,952 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
use srag\Plugins\OneDrive\EventLog\EventLogger; | ||
use srag\Plugins\OneDrive\EventLog\ObjectType; | ||
|
||
/** | ||
* Class ilOneDriveDeleteGUI | ||
* @author Theodor Truffer <[email protected]> | ||
*/ | ||
class ilOneDriveDeleteGUI extends ilCloudPluginDeleteGUI | ||
{ | ||
public function deleteItem() | ||
{ | ||
global $DIC; | ||
$tpl = $DIC['tpl']; | ||
$lng = $DIC['lng']; | ||
|
||
$response = new stdClass(); | ||
$response->success = null; | ||
$response->message = null; | ||
|
||
if (true) { | ||
try { | ||
$file_tree = ilCloudFileTree::getFileTreeFromSession(); | ||
$node = $file_tree->getNodeFromId($_POST["id"]); | ||
$file_tree->deleteFromService($node->getId()); | ||
$response->message = $tpl->getMessageHTML($lng->txt("cld_file_deleted"), "success"); | ||
$response->success = true; | ||
EventLogger::logObjectDeleted( | ||
$DIC->user()->getId(), | ||
$node->getPath(), | ||
ObjectType::fromExodItem(exodItemCache::get($node->getId())) | ||
); | ||
} catch (Exception $e) { | ||
$response->message = $tpl->getMessageHTML($e->getMessage(), "failure"); | ||
} | ||
} | ||
echo "<script language='javascript' type='text/javascript'>window.parent.il.CloudFileList.afterDeleteItem(" . ilJsonUtil::encode($response) | ||
. ");</script>"; | ||
exit; } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.