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 | |
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')
-rw-r--r-- | apps/files_trashbin/ajax/delete.php | 5 | ||||
-rw-r--r-- | apps/files_trashbin/ajax/undelete.php | 5 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Storage.php | 2 |
3 files changed, 9 insertions, 3 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; diff --git a/apps/files_trashbin/lib/Storage.php b/apps/files_trashbin/lib/Storage.php index 64b6a086271..54b47a6a19e 100644 --- a/apps/files_trashbin/lib/Storage.php +++ b/apps/files_trashbin/lib/Storage.php @@ -132,7 +132,7 @@ class Storage extends Wrapper { // do nothing, in this case we just disable the trashbin and continue \OC::$server->getLogger()->logException($e, [ 'message' => 'Trashbin storage could not check if a file was moved out of a shared folder.', - 'level' => \OCP\Util::DEBUG, + 'level' => ILogger::DEBUG, 'app' => 'files_trashbin', ]); } |