diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-04-25 15:22:28 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-04-26 10:45:52 +0200 |
commit | 38a90130ce425d531a804dff591df4a883de3154 (patch) | |
tree | d579e7442832672ab2987f9c9ecf62e79ca09a8d /apps/files_trashbin/ajax | |
parent | 12c5db90322f61d4d48e1bb534bb94382d17e317 (diff) | |
download | nextcloud-server-38a90130ce425d531a804dff591df4a883de3154.tar.gz nextcloud-server-38a90130ce425d531a804dff591df4a883de3154.zip |
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/files_trashbin/ajax')
-rw-r--r-- | apps/files_trashbin/ajax/delete.php | 5 | ||||
-rw-r--r-- | apps/files_trashbin/ajax/undelete.php | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php index 149bbbd94ff..5fb69d7f2ee 100644 --- a/apps/files_trashbin/ajax/delete.php +++ b/apps/files_trashbin/ajax/delete.php @@ -24,6 +24,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + +use OCP\ILogger; + \OC_JSON::checkLoggedIn(); \OC_JSON::callCheck(); \OC::$server->getSession()->close(); @@ -66,7 +69,7 @@ foreach ($list as $file) { OCA\Files_Trashbin\Trashbin::delete($filename, \OCP\User::getUser(), $timestamp); if (OCA\Files_Trashbin\Trashbin::file_exists($filename, $timestamp)) { $error[] = $filename; - \OCP\Util::writeLog('trashbin','can\'t delete ' . $filename . ' permanently.', \OCP\Util::ERROR); + \OCP\Util::writeLog('trashbin','can\'t delete ' . $filename . ' permanently.', ILogger::ERROR); } // only list deleted files if not deleting everything else if (!$deleteAll) { diff --git a/apps/files_trashbin/ajax/undelete.php b/apps/files_trashbin/ajax/undelete.php index 5fb042aa1c4..348148b03bc 100644 --- a/apps/files_trashbin/ajax/undelete.php +++ b/apps/files_trashbin/ajax/undelete.php @@ -26,6 +26,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ + +use OCP\ILogger; + \OC_JSON::checkLoggedIn(); \OC_JSON::callCheck(); \OC::$server->getSession()->close(); @@ -72,7 +75,7 @@ foreach ($list as $file) { if ( !OCA\Files_Trashbin\Trashbin::restore($path, $filename, $timestamp) ) { $error[] = $filename; - \OCP\Util::writeLog('trashbin', 'can\'t restore ' . $filename, \OCP\Util::ERROR); + \OCP\Util::writeLog('trashbin', 'can\'t restore ' . $filename, ILogger::ERROR); } else { $success[$i]['filename'] = $file; $success[$i]['timestamp'] = $timestamp; |